diff --git a/www/apps/api-reference/app/layout.tsx b/www/apps/api-reference/app/layout.tsx index 962557a1e0..ca269efdce 100644 --- a/www/apps/api-reference/app/layout.tsx +++ b/www/apps/api-reference/app/layout.tsx @@ -58,9 +58,6 @@ export default function RootLayout({ gaId={process.env.NEXT_PUBLIC_GA_ID} > const H2 = ({ children, ...props }: H2Props) => { const headingRef = useRef(null) - const { activePath, addItems, removeItems } = useSidebar() + const { activePath, addItems, removeItems, shownSidebar } = useSidebar() const { scrollableElement, scrollToElement } = useScrollController() const [scrolledFirstTime, setScrolledFirstTime] = useState(false) @@ -29,7 +29,10 @@ const H2 = ({ children, ...props }: H2Props) => { }, [scrollableElement, headingRef, id]) useEffect(() => { - const item: SidebarItem[] = [ + if (!shownSidebar) { + return + } + const items: Sidebar.SidebarItem[] = [ { type: "link", path: `${id}`, @@ -37,12 +40,17 @@ const H2 = ({ children, ...props }: H2Props) => { loaded: true, }, ] - addItems(item) + addItems(items, { + sidebar_id: shownSidebar.sidebar_id, + }) return () => { - removeItems(item) + removeItems({ + items, + sidebar_id: shownSidebar.sidebar_id, + }) } - }, [id]) + }, [id, shownSidebar?.sidebar_id]) return ( diff --git a/www/apps/api-reference/components/Tags/Operation/index.tsx b/www/apps/api-reference/components/Tags/Operation/index.tsx index 02ef1ca8a8..c25c0c93cd 100644 --- a/www/apps/api-reference/components/Tags/Operation/index.tsx +++ b/www/apps/api-reference/components/Tags/Operation/index.tsx @@ -60,11 +60,12 @@ const TagOperation = ({ }, [isBrowser, scrollableElement]) const scrollIntoView = useCallback(() => { - if (!isBrowser) { + if (!isBrowser || !nodeRef.current) { + // repeat timeout + setTimeout(scrollIntoView, 200) return } - - if (nodeRef.current && !checkElementInViewport(nodeRef.current, 0)) { + if (!checkElementInViewport(nodeRef.current, 0)) { const elm = nodeRef.current as HTMLElement scrollToTop( elm.offsetTop + (elm.offsetParent as HTMLElement)?.offsetTop, diff --git a/www/apps/api-reference/components/Tags/Paths/index.tsx b/www/apps/api-reference/components/Tags/Paths/index.tsx index 2549c1683c..f4a0472317 100644 --- a/www/apps/api-reference/components/Tags/Paths/index.tsx +++ b/www/apps/api-reference/components/Tags/Paths/index.tsx @@ -1,8 +1,7 @@ "use client" -import type { OpenAPIV3 } from "openapi-types" -import type { Operation, PathsObject } from "@/types/openapi" -import { useSidebar } from "docs-ui" +import type { Operation, PathsObject, TagObject } from "@/types/openapi" +import { findSidebarItem, useSidebar } from "docs-ui" import { Fragment, Suspense, useEffect } from "react" import dynamic from "next/dynamic" import type { TagOperationProps } from "../Operation" @@ -10,32 +9,41 @@ import clsx from "clsx" import getTagChildSidebarItems from "@/utils/get-tag-child-sidebar-items" import { useLoading } from "@/providers/loading" import DividedLoading from "@/components/DividedLoading" -import { SidebarItemSections, SidebarItem, SidebarItemCategory } from "types" +import { Sidebar } from "types" const TagOperation = dynamic( async () => import("../Operation") ) as React.FC export type TagPathsProps = { - tag: OpenAPIV3.TagObject + tag: TagObject paths: PathsObject } & React.HTMLAttributes const TagPaths = ({ tag, className, paths }: TagPathsProps) => { - const { items, addItems, findItemInSection } = useSidebar() + const { shownSidebar, addItems } = useSidebar() const { loading } = useLoading() useEffect(() => { + if (!shownSidebar) { + return + } + if (paths) { - const parentItem = findItemInSection( - items[SidebarItemSections.DEFAULT], - { title: tag.name }, - false - ) as SidebarItemCategory - const pathItems: SidebarItem[] = getTagChildSidebarItems(paths) - if ((parentItem?.children?.length || 0) < pathItems.length) { + const parentItem = findSidebarItem({ + sidebarItems: + "items" in shownSidebar + ? shownSidebar.items + : shownSidebar.children || [], + item: { title: tag.name, type: "category" }, + checkChildren: false, + }) as Sidebar.SidebarItemCategory + const pathItems: Sidebar.SidebarItem[] = getTagChildSidebarItems(paths) + const targetLength = + pathItems.length + (tag["x-associatedSchema"] ? 1 : 0) + if ((parentItem.children?.length || 0) < targetLength) { addItems(pathItems, { - section: SidebarItemSections.DEFAULT, + sidebar_id: shownSidebar.sidebar_id, parent: { type: "category", title: tag.name, @@ -46,7 +54,7 @@ const TagPaths = ({ tag, className, paths }: TagPathsProps) => { } } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [paths]) + }, [paths, shownSidebar?.sidebar_id]) return ( diff --git a/www/apps/api-reference/components/Tags/Section/Schema/index.tsx b/www/apps/api-reference/components/Tags/Section/Schema/index.tsx index f2e908a160..8043ffe327 100644 --- a/www/apps/api-reference/components/Tags/Section/Schema/index.tsx +++ b/www/apps/api-reference/components/Tags/Section/Schema/index.tsx @@ -1,6 +1,6 @@ "use client" -import { Suspense, useEffect, useMemo, useRef } from "react" +import { Suspense, useEffect, useMemo } from "react" import { SchemaObject } from "../../../../types/openapi" import TagOperationParameters from "../../Operation/Parameters" import { @@ -13,7 +13,6 @@ import { useScrollController, useSidebar, } from "docs-ui" -import { SidebarItemSections } from "types" import getSectionId from "../../../../utils/get-section-id" import DividedLayout from "../../../../layouts/Divided" import SectionContainer from "../../../Section/Container" @@ -30,7 +29,7 @@ export type TagSectionSchemaProps = { } const TagSectionSchema = ({ schema, tagName }: TagSectionSchemaProps) => { - const { addItems, setActivePath, activePath } = useSidebar() + const { addItems, setActivePath, activePath, shownSidebar } = useSidebar() const { displayedArea } = useArea() const formattedName = useMemo( () => singular(tagName).replaceAll(" ", ""), @@ -58,6 +57,9 @@ const TagSectionSchema = ({ schema, tagName }: TagSectionSchemaProps) => { }, [isBrowser, scrollableElement]) useEffect(() => { + if (!shownSidebar) { + return + } addItems( [ { @@ -69,7 +71,7 @@ const TagSectionSchema = ({ schema, tagName }: TagSectionSchemaProps) => { }, ], { - section: SidebarItemSections.DEFAULT, + sidebar_id: shownSidebar.sidebar_id, parent: { type: "category", title: tagName, @@ -80,7 +82,7 @@ const TagSectionSchema = ({ schema, tagName }: TagSectionSchemaProps) => { } ) // eslint-disable-next-line react-hooks/exhaustive-deps - }, [formattedName]) + }, [formattedName, shownSidebar?.sidebar_id]) useEffect(() => { if (!isBrowser) { diff --git a/www/apps/api-reference/components/Tags/Section/index.tsx b/www/apps/api-reference/components/Tags/Section/index.tsx index ac17dc0255..587eecb0f6 100644 --- a/www/apps/api-reference/components/Tags/Section/index.tsx +++ b/www/apps/api-reference/components/Tags/Section/index.tsx @@ -85,23 +85,24 @@ const TagSectionComponent = ({ tag }: TagSectionProps) => { ) useEffect(() => { - if (!isBrowser) { + if (!isBrowser || !activePath || !activePath.includes(slugTagName)) { return } - if (activePath && activePath.includes(slugTagName)) { - const tagName = activePath.split("_") - if (tagName.length === 1 && tagName[0] === slugTagName) { - const elm = document.getElementById(tagName[0]) - if (elm && !checkElementInViewport(elm, 0)) { - scrollToTop( - elm.offsetTop + (elm.offsetParent as HTMLElement)?.offsetTop, - 0 - ) - } - } else if (tagName.length > 1 && tagName[0] === slugTagName) { - setLoadData(true) + const tagName = activePath.split("_") + if (tagName[0] !== slugTagName) { + return + } + if (tagName.length === 1) { + const elm = document.getElementById(tagName[0]) + if (elm && !checkElementInViewport(elm, 0)) { + scrollToTop( + elm.offsetTop + (elm.offsetParent as HTMLElement)?.offsetTop, + 0 + ) } + } else if (tagName.length > 1) { + setLoadData(true) } }, [slugTagName, activePath, isBrowser]) diff --git a/www/apps/api-reference/config/index.ts b/www/apps/api-reference/config/index.ts index a9f53ea7d3..ea33d86448 100644 --- a/www/apps/api-reference/config/index.ts +++ b/www/apps/api-reference/config/index.ts @@ -8,17 +8,20 @@ export const config: DocsConfig = { baseUrl, basePath: process.env.NEXT_PUBLIC_BASE_PATH, // sidebar is auto generated - sidebar: { - default: [ - { - type: "link", - title: "Introduction", - path: "introduction", - loaded: true, - }, - ], - mobile: [], - }, + sidebars: [ + { + sidebar_id: "api-ref", + title: "API Reference", + items: [ + { + type: "link", + title: "Introduction", + path: "introduction", + loaded: true, + }, + ], + }, + ], project: { title: "API Reference", key: "api-reference", diff --git a/www/apps/api-reference/providers/base-specs.tsx b/www/apps/api-reference/providers/base-specs.tsx index a175f79fde..ff7363987b 100644 --- a/www/apps/api-reference/providers/base-specs.tsx +++ b/www/apps/api-reference/providers/base-specs.tsx @@ -2,7 +2,7 @@ import { ExpandedDocument, SecuritySchemeObject } from "@/types/openapi" import { ReactNode, createContext, useContext, useEffect, useMemo } from "react" -import { SidebarItem, SidebarItemSections } from "types" +import { Sidebar } from "types" import getSectionId from "../utils/get-section-id" import getTagChildSidebarItems from "../utils/get-tag-child-sidebar-items" import { useRouter } from "next/navigation" @@ -22,7 +22,8 @@ type BaseSpecsProviderProps = { const BaseSpecsProvider = ({ children, baseSpecs }: BaseSpecsProviderProps) => { const router = useRouter() - const { activePath, addItems, setActivePath, resetItems } = useSidebar() + const { activePath, addItems, setActivePath, resetItems, shownSidebar } = + useSidebar() const getSecuritySchema = ( securityName: string @@ -48,7 +49,7 @@ const BaseSpecsProvider = ({ children, baseSpecs }: BaseSpecsProviderProps) => { return [] } - const itemsToAdd: SidebarItem[] = [ + const itemsToAdd: Sidebar.SidebarItem[] = [ { type: "separator", }, @@ -67,6 +68,7 @@ const BaseSpecsProvider = ({ children, baseSpecs }: BaseSpecsProviderProps) => { children: childItems, loaded: childItems.length > 0, showLoadingIfEmpty: true, + initialOpen: false, onOpen: () => { if (location.hash !== tagPathName) { router.push(`#${tagPathName}`, { @@ -84,14 +86,14 @@ const BaseSpecsProvider = ({ children, baseSpecs }: BaseSpecsProviderProps) => { }, [baseSpecs]) useEffect(() => { - if (!itemsToAdd.length) { + if (!itemsToAdd.length || !shownSidebar) { return } addItems(itemsToAdd, { - section: SidebarItemSections.DEFAULT, + sidebar_id: shownSidebar.sidebar_id, }) - }, [itemsToAdd]) + }, [itemsToAdd, shownSidebar?.sidebar_id]) useEffect(() => { return () => { diff --git a/www/apps/api-reference/providers/page-title.tsx b/www/apps/api-reference/providers/page-title.tsx index 776b88a219..5b40e0200a 100644 --- a/www/apps/api-reference/providers/page-title.tsx +++ b/www/apps/api-reference/providers/page-title.tsx @@ -3,7 +3,7 @@ import { createContext, useEffect } from "react" import { useSidebar } from "docs-ui" import { useArea } from "./area" -import { SidebarItemLink } from "types" +import { Sidebar } from "types" const PageTitleContext = createContext(null) @@ -27,7 +27,7 @@ const PageTitleProvider = ({ children }: PageTitleProviderProps) => { // find the child that matches the active path const item = activeItem?.children?.find( (i) => i.type === "link" && i.path === activePath - ) as SidebarItemLink + ) as Sidebar.SidebarItemLink if (item) { document.title = `${item.title} - ${titleSuffix}` } diff --git a/www/apps/api-reference/providers/sidebar.tsx b/www/apps/api-reference/providers/sidebar.tsx index 59c6a662c5..6a4bb4de9f 100644 --- a/www/apps/api-reference/providers/sidebar.tsx +++ b/www/apps/api-reference/providers/sidebar.tsx @@ -20,10 +20,12 @@ const SidebarProvider = ({ children }: SidebarProviderProps) => { isLoading={isLoading} setIsLoading={setIsLoading} shouldHandleHashChange={true} + shouldHandlePathChange={false} scrollableElement={scrollableElement} - initialItems={config.sidebar} - persistState={false} - projectName="api" + sidebars={config.sidebars} + persistCategoryState={false} + disableActiveTransition={false} + isSidebarStatic={false} > {children} diff --git a/www/apps/api-reference/utils/get-tag-child-sidebar-items.tsx b/www/apps/api-reference/utils/get-tag-child-sidebar-items.tsx index 5cbdebc1a0..b5e4f15a5d 100644 --- a/www/apps/api-reference/utils/get-tag-child-sidebar-items.tsx +++ b/www/apps/api-reference/utils/get-tag-child-sidebar-items.tsx @@ -1,9 +1,9 @@ -import type { SidebarItem } from "types" import type { Operation, PathsObject } from "@/types/openapi" import type { OpenAPIV3 } from "openapi-types" import dynamic from "next/dynamic" import type { MethodLabelProps } from "@/components/MethodLabel" import getSectionId from "./get-section-id" +import { Sidebar } from "types" const MethodLabel = dynamic( async () => import("../components/MethodLabel") @@ -11,8 +11,8 @@ const MethodLabel = dynamic( export default function getTagChildSidebarItems( paths: PathsObject -): SidebarItem[] { - const items: SidebarItem[] = [] +): Sidebar.SidebarItem[] { + const items: Sidebar.SidebarItem[] = [] Object.entries(paths).forEach(([, operations]) => { Object.entries(operations).map(([method, operation]) => { const definedOperation = operation as Operation diff --git a/www/apps/book/app/learn/layout.tsx b/www/apps/book/app/learn/layout.tsx index 6d78aca13e..e5a0cf6f69 100644 --- a/www/apps/book/app/learn/layout.tsx +++ b/www/apps/book/app/learn/layout.tsx @@ -8,13 +8,7 @@ export default function RootLayout({ children: React.ReactNode }) { return ( - } - > + }> {children} ) diff --git a/www/apps/book/app/not-found.tsx b/www/apps/book/app/not-found.tsx index ac688a7972..2a51ed6abd 100644 --- a/www/apps/book/app/not-found.tsx +++ b/www/apps/book/app/not-found.tsx @@ -6,13 +6,7 @@ import Footer from "../components/Footer" const NotFoundPage = () => { return ( - } - ProvidersComponent={Providers} - > + } ProvidersComponent={Providers}> {/* @ts-ignore React v19 doesn't recognize MDX import as component */} diff --git a/www/apps/book/config/index.ts b/www/apps/book/config/index.ts index 4ebe563d05..3547e9ec87 100644 --- a/www/apps/book/config/index.ts +++ b/www/apps/book/config/index.ts @@ -1,6 +1,6 @@ -import { DocsConfig } from "types" -import { sidebarConfig } from "./sidebar" +import { DocsConfig, Sidebar } from "types" import { globalConfig } from "docs-ui" +import { generatedSidebars } from "../generated/sidebar.mjs" const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000" @@ -9,10 +9,18 @@ export const config: DocsConfig = { titleSuffix: "Medusa v2 Documentation", baseUrl, basePath: process.env.NEXT_PUBLIC_BASE_PATH, - sidebar: sidebarConfig, + sidebars: generatedSidebars as Sidebar.Sidebar[], project: { title: "Documentation", key: "book", }, logo: `${process.env.NEXT_PUBLIC_BASE_PATH}/images/logo.png`, + breadcrumbOptions: { + startItems: [ + { + title: "Documentation", + link: "/", + }, + ], + }, } diff --git a/www/apps/book/config/sidebar.tsx b/www/apps/book/config/sidebar.tsx deleted file mode 100644 index 599f04de64..0000000000 --- a/www/apps/book/config/sidebar.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import type { SidebarConfig } from "@/types" -import { generatedSidebar } from "../generated/sidebar.mjs" -import { SidebarItem } from "types" - -export const sidebarConfig: SidebarConfig = { - default: generatedSidebar as SidebarItem[], - mobile: [], -} diff --git a/www/apps/book/generated/sidebar.mjs b/www/apps/book/generated/sidebar.mjs index 81b6b24219..25e0351797 100644 --- a/www/apps/book/generated/sidebar.mjs +++ b/www/apps/book/generated/sidebar.mjs @@ -1,1246 +1,1260 @@ -export const generatedSidebar = [ +export const generatedSidebars = [ { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "1. Get Started", - "children": [ + "sidebar_id": "docs", + "title": "Get Started", + "items": [ { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/learn", - "title": "Introduction", - "children": [], - "chapterTitle": "1.1. Introduction", - "number": "1.1." + "initialOpen": false, + "type": "category", + "title": "1. Get Started", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn", + "title": "Introduction", + "children": [], + "chapterTitle": "1.1. Introduction", + "number": "1.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/installation", + "title": "Installation", + "children": [], + "chapterTitle": "1.2. Installation", + "number": "1.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Architecture", + "path": "/learn/introduction/architecture", + "children": [], + "chapterTitle": "1.3. Architecture", + "number": "1.3." + } + ], + "chapterTitle": "1. Get Started", + "number": "1." }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/learn/installation", - "title": "Installation", - "children": [], - "chapterTitle": "1.2. Installation", - "number": "1.2." + "initialOpen": false, + "type": "category", + "title": "2. Customization Tutorial", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Build Custom Features", + "path": "/learn/customization/custom-features", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Brand Module", + "path": "/learn/customization/custom-features/module", + "children": [], + "chapterTitle": "2.1.1. Brand Module", + "number": "2.1.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Brand Workflow", + "path": "/learn/customization/custom-features/workflow", + "children": [], + "chapterTitle": "2.1.2. Brand Workflow", + "number": "2.1.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Brand API Route", + "path": "/learn/customization/custom-features/api-route", + "children": [], + "chapterTitle": "2.1.3. Brand API Route", + "number": "2.1.3." + } + ], + "chapterTitle": "2.1. Build Custom Features", + "number": "2.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Extend Features", + "path": "/learn/customization/extend-features", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Link Brands and Products", + "path": "/learn/customization/extend-features/define-link", + "children": [], + "chapterTitle": "2.2.1. Link Brands and Products", + "number": "2.2.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Extend Core Flow", + "path": "/learn/customization/extend-features/extend-create-product", + "children": [], + "chapterTitle": "2.2.2. Extend Core Flow", + "number": "2.2.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Query Linked Records", + "path": "/learn/customization/extend-features/query-linked-records", + "children": [], + "chapterTitle": "2.2.3. Query Linked Records", + "number": "2.2.3." + } + ], + "chapterTitle": "2.2. Extend Features", + "number": "2.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Customize Admin", + "path": "/learn/customization/customize-admin", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Add Widget", + "path": "/learn/customization/customize-admin/widget", + "children": [], + "chapterTitle": "2.3.1. Add Widget", + "number": "2.3.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Add UI Route", + "path": "/learn/customization/customize-admin/route", + "children": [], + "chapterTitle": "2.3.2. Add UI Route", + "number": "2.3.2." + } + ], + "chapterTitle": "2.3. Customize Admin", + "number": "2.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Integrate Systems", + "path": "/learn/customization/integrate-systems", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "CMS Module", + "path": "/learn/customization/integrate-systems/service", + "children": [], + "chapterTitle": "2.4.1. CMS Module", + "number": "2.4.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Sync to CMS", + "path": "/learn/customization/integrate-systems/handle-event", + "children": [], + "chapterTitle": "2.4.2. Sync to CMS", + "number": "2.4.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Schedule Syncing", + "path": "/learn/customization/integrate-systems/schedule-task", + "children": [], + "chapterTitle": "2.4.3. Schedule Syncing", + "number": "2.4.3." + } + ], + "chapterTitle": "2.4. Integrate Systems", + "number": "2.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Re-Use Customizations", + "path": "/learn/customization/reuse-customizations", + "children": [], + "chapterTitle": "2.5. Re-Use Customizations", + "number": "2.5." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Next Steps", + "path": "/learn/customization/next-steps", + "children": [], + "chapterTitle": "2.6. Next Steps", + "number": "2.6." + } + ], + "chapterTitle": "2. Customization Tutorial", + "number": "2." }, { "loaded": true, "isPathHref": true, - "type": "link", - "title": "Architecture", - "path": "/learn/introduction/architecture", - "children": [], - "chapterTitle": "1.3. Architecture", - "number": "1.3." + "initialOpen": false, + "type": "category", + "title": "3. Framework", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/medusa-container", + "title": "Medusa Container", + "children": [], + "chapterTitle": "3.1. Medusa Container", + "number": "3.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules", + "title": "Modules", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/modules-directory-structure", + "title": "Directory Structure", + "children": [], + "chapterTitle": "3.2.1. Directory Structure", + "number": "3.2.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/loaders", + "title": "Loaders", + "children": [], + "chapterTitle": "3.2.2. Loaders", + "number": "3.2.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/isolation", + "title": "Module Isolation", + "children": [], + "chapterTitle": "3.2.3. Module Isolation", + "number": "3.2.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/container", + "title": "Module Container", + "children": [], + "chapterTitle": "3.2.4. Module Container", + "number": "3.2.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/options", + "title": "Module Options", + "children": [], + "chapterTitle": "3.2.5. Module Options", + "number": "3.2.5." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/service-factory", + "title": "Service Factory", + "children": [], + "chapterTitle": "3.2.6. Service Factory", + "number": "3.2.6." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/service-constraints", + "title": "Service Constraints", + "children": [], + "chapterTitle": "3.2.7. Service Constraints", + "number": "3.2.7." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/db-operations", + "title": "Database Operations", + "children": [], + "chapterTitle": "3.2.8. Database Operations", + "number": "3.2.8." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/multiple-services", + "title": "Multiple Services", + "children": [], + "chapterTitle": "3.2.9. Multiple Services", + "number": "3.2.9." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/commerce-modules", + "title": "Commerce Modules", + "children": [], + "chapterTitle": "3.2.10. Commerce Modules", + "number": "3.2.10." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/modules/architectural-modules", + "title": "Architectural Modules", + "children": [], + "chapterTitle": "3.2.11. Architectural Modules", + "number": "3.2.11." + } + ], + "chapterTitle": "3.2. Modules", + "number": "3.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/module-links", + "title": "Module Links", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/module-links/directions", + "title": "Module Link Direction", + "children": [], + "chapterTitle": "3.3.1. Module Link Direction", + "number": "3.3.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/module-links/link", + "title": "Link", + "children": [], + "chapterTitle": "3.3.2. Link", + "number": "3.3.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/module-links/query", + "title": "Query", + "children": [], + "chapterTitle": "3.3.3. Query", + "number": "3.3.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/module-links/custom-columns", + "title": "Custom Columns", + "children": [], + "chapterTitle": "3.3.4. Custom Columns", + "number": "3.3.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/module-links/query-context", + "title": "Query Context", + "children": [], + "chapterTitle": "3.3.5. Query Context", + "number": "3.3.5." + } + ], + "chapterTitle": "3.3. Module Links", + "number": "3.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models", + "title": "Data Models", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/infer-type", + "title": "Infer Type", + "children": [], + "chapterTitle": "3.4.1. Infer Type", + "number": "3.4.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/property-types", + "title": "Property Types", + "children": [], + "chapterTitle": "3.4.2. Property Types", + "number": "3.4.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/primary-key", + "title": "Primary Key", + "children": [], + "chapterTitle": "3.4.3. Primary Key", + "number": "3.4.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/default-properties", + "title": "Default Properties", + "children": [], + "chapterTitle": "3.4.4. Default Properties", + "number": "3.4.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/configure-properties", + "title": "Configure Properties", + "children": [], + "chapterTitle": "3.4.5. Configure Properties", + "number": "3.4.5." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/relationships", + "title": "Relationships", + "children": [], + "chapterTitle": "3.4.6. Relationships", + "number": "3.4.6." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/manage-relationships", + "title": "Manage Relationships", + "children": [], + "chapterTitle": "3.4.7. Manage Relationships", + "number": "3.4.7." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/index", + "title": "Define Index", + "children": [], + "chapterTitle": "3.4.8. Define Index", + "number": "3.4.8." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/check-constraints", + "title": "Check Constraints", + "children": [], + "chapterTitle": "3.4.9. Check Constraints", + "number": "3.4.9." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/searchable-property", + "title": "Searchable Property", + "children": [], + "chapterTitle": "3.4.10. Searchable Property", + "number": "3.4.10." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/data-models/write-migration", + "title": "Write Migration", + "children": [], + "chapterTitle": "3.4.11. Write Migration", + "number": "3.4.11." + } + ], + "chapterTitle": "3.4. Data Models", + "number": "3.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "API Routes", + "path": "/learn/fundamentals/api-routes", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/http-methods", + "title": "HTTP Methods", + "children": [], + "chapterTitle": "3.5.1. HTTP Methods", + "number": "3.5.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/parameters", + "title": "Parameters", + "children": [], + "chapterTitle": "3.5.2. Parameters", + "number": "3.5.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/responses", + "title": "Response", + "children": [], + "chapterTitle": "3.5.3. Response", + "number": "3.5.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/middlewares", + "title": "Middlewares", + "children": [], + "chapterTitle": "3.5.4. Middlewares", + "number": "3.5.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/parse-body", + "title": "Body Parsing", + "children": [], + "chapterTitle": "3.5.5. Body Parsing", + "number": "3.5.5." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/validation", + "title": "Validation", + "children": [], + "chapterTitle": "3.5.6. Validation", + "number": "3.5.6." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/protected-routes", + "title": "Protected Routes", + "children": [], + "chapterTitle": "3.5.7. Protected Routes", + "number": "3.5.7." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/errors", + "title": "Errors", + "children": [], + "chapterTitle": "3.5.8. Errors", + "number": "3.5.8." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/cors", + "title": "Handling CORS", + "children": [], + "chapterTitle": "3.5.9. Handling CORS", + "number": "3.5.9." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/api-routes/additional-data", + "title": "Additional Data", + "children": [], + "chapterTitle": "3.5.10. Additional Data", + "number": "3.5.10." + } + ], + "chapterTitle": "3.5. API Routes", + "number": "3.5." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/constructor-constraints", + "title": "Constructor Constraints", + "children": [], + "chapterTitle": "3.6.1. Constructor Constraints", + "number": "3.6.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/variable-manipulation", + "title": "Transform Variables", + "children": [], + "chapterTitle": "3.6.2. Transform Variables", + "number": "3.6.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/conditions", + "title": "When-Then Conditions", + "children": [], + "chapterTitle": "3.6.3. When-Then Conditions", + "number": "3.6.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/compensation-function", + "title": "Compensation Function", + "children": [], + "chapterTitle": "3.6.4. Compensation Function", + "number": "3.6.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/workflow-hooks", + "title": "Workflow Hooks", + "children": [], + "chapterTitle": "3.6.5. Workflow Hooks", + "number": "3.6.5." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/add-workflow-hook", + "title": "Expose a Hook", + "children": [], + "chapterTitle": "3.6.6. Expose a Hook", + "number": "3.6.6." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/access-workflow-errors", + "title": "Access Workflow Errors", + "children": [], + "chapterTitle": "3.6.7. Access Workflow Errors", + "number": "3.6.7." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/retry-failed-steps", + "title": "Retry Failed Steps", + "children": [], + "chapterTitle": "3.6.8. Retry Failed Steps", + "number": "3.6.8." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/parallel-steps", + "title": "Run Steps in Parallel", + "children": [], + "chapterTitle": "3.6.9. Run Steps in Parallel", + "number": "3.6.9." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/workflow-timeout", + "title": "Workflow Timeout", + "children": [], + "chapterTitle": "3.6.10. Workflow Timeout", + "number": "3.6.10." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/store-executions", + "title": "Store Workflow Executions", + "children": [], + "chapterTitle": "3.6.11. Store Workflow Executions", + "number": "3.6.11." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/long-running-workflow", + "title": "Long-Running Workflow", + "children": [], + "chapterTitle": "3.6.12. Long-Running Workflow", + "number": "3.6.12." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/execute-another-workflow", + "title": "Execute Another Workflow", + "children": [], + "chapterTitle": "3.6.13. Execute Another Workflow", + "number": "3.6.13." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/workflows/multiple-step-usage", + "title": "Multiple Step Usage", + "children": [], + "chapterTitle": "3.6.14. Multiple Step Usage", + "number": "3.6.14." + } + ], + "chapterTitle": "3.6. Workflows", + "number": "3.6." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/events-and-subscribers", + "title": "Events and Subscribers", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/events-and-subscribers/data-payload", + "title": "Events Data Payload", + "children": [], + "chapterTitle": "3.7.1. Events Data Payload", + "number": "3.7.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/events-and-subscribers/emit-event", + "title": "Emit Event", + "children": [], + "chapterTitle": "3.7.2. Emit Event", + "number": "3.7.2." + } + ], + "chapterTitle": "3.7. Events and Subscribers", + "number": "3.7." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/scheduled-jobs", + "title": "Scheduled Jobs", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/scheduled-jobs/execution-number", + "title": "Execution Number", + "children": [], + "chapterTitle": "3.8.1. Execution Number", + "number": "3.8.1." + } + ], + "chapterTitle": "3.8. Scheduled Jobs", + "number": "3.8." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/plugins", + "title": "Plugins", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/plugins/create", + "title": "Create Plugin", + "children": [], + "chapterTitle": "3.9.1. Create Plugin", + "number": "3.9.1." + } + ], + "chapterTitle": "3.9. Plugins", + "number": "3.9." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/custom-cli-scripts", + "title": "Custom CLI Scripts", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/custom-cli-scripts/seed-data", + "title": "Seed Data", + "children": [], + "chapterTitle": "3.10.1. Seed Data", + "number": "3.10.1." + } + ], + "chapterTitle": "3.10. Custom CLI Scripts", + "number": "3.10." + } + ], + "chapterTitle": "3. Framework", + "number": "3." + }, + { + "loaded": true, + "isPathHref": true, + "initialOpen": false, + "type": "category", + "title": "4. Admin Development", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/admin", + "title": "Overview", + "children": [], + "chapterTitle": "4.1. Overview", + "number": "4.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/admin/widgets", + "title": "Admin Widgets", + "children": [], + "chapterTitle": "4.2. Admin Widgets", + "number": "4.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/admin/ui-routes", + "title": "Admin UI Routes", + "children": [], + "chapterTitle": "4.3. Admin UI Routes", + "number": "4.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/admin/environment-variables", + "title": "Environment Variables", + "children": [], + "chapterTitle": "4.4. Environment Variables", + "number": "4.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/admin/routing", + "title": "Routing Customizations", + "children": [], + "chapterTitle": "4.5. Routing Customizations", + "number": "4.5." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/admin/constraints", + "title": "Constraints", + "children": [], + "chapterTitle": "4.6. Constraints", + "number": "4.6." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/fundamentals/admin/tips", + "title": "Tips", + "children": [], + "chapterTitle": "4.7. Tips", + "number": "4.7." + } + ], + "chapterTitle": "4. Admin Development", + "number": "4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "5. Storefront", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/storefront-development", + "title": "Storefront Development", + "chapterTitle": "5. Storefront", + "children": [], + "number": "5." + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "initialOpen": false, + "type": "category", + "title": "6. Configurations", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Environment Variables", + "path": "/learn/fundamentals/environment-variables", + "children": [], + "chapterTitle": "6.1. Environment Variables", + "number": "6.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Type Aliases", + "path": "/learn/conventions/ts-aliases", + "children": [], + "chapterTitle": "6.2. Type Aliases", + "number": "6.2." + } + ], + "chapterTitle": "6. Configurations", + "number": "6." + }, + { + "loaded": true, + "isPathHref": true, + "initialOpen": false, + "type": "category", + "title": "7. Debugging & Testing", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/debugging-and-testing/testing-tools", + "title": "Testing Tools", + "children": [], + "chapterTitle": "7.1. Testing Tools", + "number": "7.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/debugging-and-testing/testing-tools/integration-tests", + "title": "Integration Tests", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/debugging-and-testing/testing-tools/integration-tests/api-routes", + "title": "Example: API Routes Tests", + "children": [], + "chapterTitle": "7.2.1. Example: API Routes Tests", + "number": "7.2.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/debugging-and-testing/testing-tools/integration-tests/workflows", + "title": "Example: Workflows Tests", + "children": [], + "chapterTitle": "7.2.2. Example: Workflows Tests", + "number": "7.2.2." + } + ], + "chapterTitle": "7.2. Integration Tests", + "number": "7.2." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/debugging-and-testing/testing-tools/modules-tests", + "title": "Modules Tests", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/debugging-and-testing/testing-tools/modules-tests/module-example", + "title": "Example", + "children": [], + "chapterTitle": "7.3.1. Example", + "number": "7.3.1." + } + ], + "chapterTitle": "7.3. Modules Tests", + "number": "7.3." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/debugging-and-testing/instrumentation", + "title": "Instrumentation", + "children": [], + "chapterTitle": "7.4. Instrumentation", + "number": "7.4." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/debugging-and-testing/logging", + "title": "Logging", + "children": [], + "chapterTitle": "7.5. Logging", + "number": "7.5." + } + ], + "chapterTitle": "7. Debugging & Testing", + "number": "7." + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "8. Production", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/build", + "title": "Build", + "chapterTitle": "8. Production", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/deployment", + "title": "Deployment Overview", + "children": [], + "chapterTitle": "8.1. Deployment Overview", + "number": "8.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/deployment/general", + "title": "General Deployment", + "children": [], + "chapterTitle": "8.2. General Deployment", + "number": "8.2." + } + ], + "number": "8." + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "initialOpen": false, + "type": "category", + "title": "9. Upgrade", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/update", + "title": "Update Medusa", + "children": [], + "chapterTitle": "9.1. Update Medusa", + "number": "9.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "external", + "path": "https://github.com/medusajs/medusa/releases", + "title": "Release Notes", + "children": [], + "chapterTitle": "9.2. Release Notes", + "number": "9.2." + } + ], + "chapterTitle": "9. Upgrade", + "number": "9." + }, + { + "loaded": true, + "isPathHref": true, + "initialOpen": false, + "type": "category", + "title": "10. Resources", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Contribution Guidelines", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/resources/contribution-guidelines/docs", + "title": "Docs", + "children": [], + "chapterTitle": "10.1.1. Docs", + "number": "10.1.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/resources//contribution-guidelines/admin-translations", + "title": "Admin Translations", + "children": [], + "chapterTitle": "10.1.2. Admin Translations", + "number": "10.1.2." + } + ], + "chapterTitle": "10.1. Contribution Guidelines", + "number": "10.1." + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/learn/resources/usage", + "title": "Usage", + "children": [], + "chapterTitle": "10.2. Usage", + "number": "10.2." + } + ], + "chapterTitle": "10. Resources", + "number": "10." } - ], - "chapterTitle": "1. Get Started", - "number": "1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "2. Customization Tutorial", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Build Custom Features", - "path": "/learn/customization/custom-features", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Brand Module", - "path": "/learn/customization/custom-features/module", - "children": [], - "chapterTitle": "2.1.1. Brand Module", - "number": "2.1.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Brand Workflow", - "path": "/learn/customization/custom-features/workflow", - "children": [], - "chapterTitle": "2.1.2. Brand Workflow", - "number": "2.1.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Brand API Route", - "path": "/learn/customization/custom-features/api-route", - "children": [], - "chapterTitle": "2.1.3. Brand API Route", - "number": "2.1.3." - } - ], - "chapterTitle": "2.1. Build Custom Features", - "number": "2.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Extend Features", - "path": "/learn/customization/extend-features", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Link Brands and Products", - "path": "/learn/customization/extend-features/define-link", - "children": [], - "chapterTitle": "2.2.1. Link Brands and Products", - "number": "2.2.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Extend Core Flow", - "path": "/learn/customization/extend-features/extend-create-product", - "children": [], - "chapterTitle": "2.2.2. Extend Core Flow", - "number": "2.2.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Query Linked Records", - "path": "/learn/customization/extend-features/query-linked-records", - "children": [], - "chapterTitle": "2.2.3. Query Linked Records", - "number": "2.2.3." - } - ], - "chapterTitle": "2.2. Extend Features", - "number": "2.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Customize Admin", - "path": "/learn/customization/customize-admin", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Add Widget", - "path": "/learn/customization/customize-admin/widget", - "children": [], - "chapterTitle": "2.3.1. Add Widget", - "number": "2.3.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Add UI Route", - "path": "/learn/customization/customize-admin/route", - "children": [], - "chapterTitle": "2.3.2. Add UI Route", - "number": "2.3.2." - } - ], - "chapterTitle": "2.3. Customize Admin", - "number": "2.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Integrate Systems", - "path": "/learn/customization/integrate-systems", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "CMS Module", - "path": "/learn/customization/integrate-systems/service", - "children": [], - "chapterTitle": "2.4.1. CMS Module", - "number": "2.4.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Sync to CMS", - "path": "/learn/customization/integrate-systems/handle-event", - "children": [], - "chapterTitle": "2.4.2. Sync to CMS", - "number": "2.4.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Schedule Syncing", - "path": "/learn/customization/integrate-systems/schedule-task", - "children": [], - "chapterTitle": "2.4.3. Schedule Syncing", - "number": "2.4.3." - } - ], - "chapterTitle": "2.4. Integrate Systems", - "number": "2.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Re-Use Customizations", - "path": "/learn/customization/reuse-customizations", - "children": [], - "chapterTitle": "2.5. Re-Use Customizations", - "number": "2.5." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Next Steps", - "path": "/learn/customization/next-steps", - "children": [], - "chapterTitle": "2.6. Next Steps", - "number": "2.6." - } - ], - "chapterTitle": "2. Customization Tutorial", - "number": "2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "3. Framework", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/medusa-container", - "title": "Medusa Container", - "children": [], - "chapterTitle": "3.1. Medusa Container", - "number": "3.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules", - "title": "Modules", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/modules-directory-structure", - "title": "Directory Structure", - "children": [], - "chapterTitle": "3.2.1. Directory Structure", - "number": "3.2.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/loaders", - "title": "Loaders", - "children": [], - "chapterTitle": "3.2.2. Loaders", - "number": "3.2.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/isolation", - "title": "Module Isolation", - "children": [], - "chapterTitle": "3.2.3. Module Isolation", - "number": "3.2.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/container", - "title": "Module Container", - "children": [], - "chapterTitle": "3.2.4. Module Container", - "number": "3.2.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/options", - "title": "Module Options", - "children": [], - "chapterTitle": "3.2.5. Module Options", - "number": "3.2.5." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/service-factory", - "title": "Service Factory", - "children": [], - "chapterTitle": "3.2.6. Service Factory", - "number": "3.2.6." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/service-constraints", - "title": "Service Constraints", - "children": [], - "chapterTitle": "3.2.7. Service Constraints", - "number": "3.2.7." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/db-operations", - "title": "Database Operations", - "children": [], - "chapterTitle": "3.2.8. Database Operations", - "number": "3.2.8." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/multiple-services", - "title": "Multiple Services", - "children": [], - "chapterTitle": "3.2.9. Multiple Services", - "number": "3.2.9." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/commerce-modules", - "title": "Commerce Modules", - "children": [], - "chapterTitle": "3.2.10. Commerce Modules", - "number": "3.2.10." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/modules/architectural-modules", - "title": "Architectural Modules", - "children": [], - "chapterTitle": "3.2.11. Architectural Modules", - "number": "3.2.11." - } - ], - "chapterTitle": "3.2. Modules", - "number": "3.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/module-links", - "title": "Module Links", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/module-links/directions", - "title": "Module Link Direction", - "children": [], - "chapterTitle": "3.3.1. Module Link Direction", - "number": "3.3.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/module-links/link", - "title": "Link", - "children": [], - "chapterTitle": "3.3.2. Link", - "number": "3.3.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/module-links/query", - "title": "Query", - "children": [], - "chapterTitle": "3.3.3. Query", - "number": "3.3.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/module-links/custom-columns", - "title": "Custom Columns", - "children": [], - "chapterTitle": "3.3.4. Custom Columns", - "number": "3.3.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/module-links/query-context", - "title": "Query Context", - "children": [], - "chapterTitle": "3.3.5. Query Context", - "number": "3.3.5." - } - ], - "chapterTitle": "3.3. Module Links", - "number": "3.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models", - "title": "Data Models", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/infer-type", - "title": "Infer Type", - "children": [], - "chapterTitle": "3.4.1. Infer Type", - "number": "3.4.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/property-types", - "title": "Property Types", - "children": [], - "chapterTitle": "3.4.2. Property Types", - "number": "3.4.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/primary-key", - "title": "Primary Key", - "children": [], - "chapterTitle": "3.4.3. Primary Key", - "number": "3.4.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/default-properties", - "title": "Default Properties", - "children": [], - "chapterTitle": "3.4.4. Default Properties", - "number": "3.4.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/configure-properties", - "title": "Configure Properties", - "children": [], - "chapterTitle": "3.4.5. Configure Properties", - "number": "3.4.5." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/relationships", - "title": "Relationships", - "children": [], - "chapterTitle": "3.4.6. Relationships", - "number": "3.4.6." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/manage-relationships", - "title": "Manage Relationships", - "children": [], - "chapterTitle": "3.4.7. Manage Relationships", - "number": "3.4.7." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/index", - "title": "Define Index", - "children": [], - "chapterTitle": "3.4.8. Define Index", - "number": "3.4.8." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/check-constraints", - "title": "Check Constraints", - "children": [], - "chapterTitle": "3.4.9. Check Constraints", - "number": "3.4.9." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/searchable-property", - "title": "Searchable Property", - "children": [], - "chapterTitle": "3.4.10. Searchable Property", - "number": "3.4.10." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/data-models/write-migration", - "title": "Write Migration", - "children": [], - "chapterTitle": "3.4.11. Write Migration", - "number": "3.4.11." - } - ], - "chapterTitle": "3.4. Data Models", - "number": "3.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "API Routes", - "path": "/learn/fundamentals/api-routes", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/http-methods", - "title": "HTTP Methods", - "children": [], - "chapterTitle": "3.5.1. HTTP Methods", - "number": "3.5.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/parameters", - "title": "Parameters", - "children": [], - "chapterTitle": "3.5.2. Parameters", - "number": "3.5.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/responses", - "title": "Response", - "children": [], - "chapterTitle": "3.5.3. Response", - "number": "3.5.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/middlewares", - "title": "Middlewares", - "children": [], - "chapterTitle": "3.5.4. Middlewares", - "number": "3.5.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/parse-body", - "title": "Body Parsing", - "children": [], - "chapterTitle": "3.5.5. Body Parsing", - "number": "3.5.5." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/validation", - "title": "Validation", - "children": [], - "chapterTitle": "3.5.6. Validation", - "number": "3.5.6." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/protected-routes", - "title": "Protected Routes", - "children": [], - "chapterTitle": "3.5.7. Protected Routes", - "number": "3.5.7." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/errors", - "title": "Errors", - "children": [], - "chapterTitle": "3.5.8. Errors", - "number": "3.5.8." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/cors", - "title": "Handling CORS", - "children": [], - "chapterTitle": "3.5.9. Handling CORS", - "number": "3.5.9." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/api-routes/additional-data", - "title": "Additional Data", - "children": [], - "chapterTitle": "3.5.10. Additional Data", - "number": "3.5.10." - } - ], - "chapterTitle": "3.5. API Routes", - "number": "3.5." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/constructor-constraints", - "title": "Constructor Constraints", - "children": [], - "chapterTitle": "3.6.1. Constructor Constraints", - "number": "3.6.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/variable-manipulation", - "title": "Transform Variables", - "children": [], - "chapterTitle": "3.6.2. Transform Variables", - "number": "3.6.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/conditions", - "title": "When-Then Conditions", - "children": [], - "chapterTitle": "3.6.3. When-Then Conditions", - "number": "3.6.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/compensation-function", - "title": "Compensation Function", - "children": [], - "chapterTitle": "3.6.4. Compensation Function", - "number": "3.6.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/workflow-hooks", - "title": "Workflow Hooks", - "children": [], - "chapterTitle": "3.6.5. Workflow Hooks", - "number": "3.6.5." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/add-workflow-hook", - "title": "Expose a Hook", - "children": [], - "chapterTitle": "3.6.6. Expose a Hook", - "number": "3.6.6." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/access-workflow-errors", - "title": "Access Workflow Errors", - "children": [], - "chapterTitle": "3.6.7. Access Workflow Errors", - "number": "3.6.7." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/retry-failed-steps", - "title": "Retry Failed Steps", - "children": [], - "chapterTitle": "3.6.8. Retry Failed Steps", - "number": "3.6.8." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/parallel-steps", - "title": "Run Steps in Parallel", - "children": [], - "chapterTitle": "3.6.9. Run Steps in Parallel", - "number": "3.6.9." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/workflow-timeout", - "title": "Workflow Timeout", - "children": [], - "chapterTitle": "3.6.10. Workflow Timeout", - "number": "3.6.10." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/store-executions", - "title": "Store Workflow Executions", - "children": [], - "chapterTitle": "3.6.11. Store Workflow Executions", - "number": "3.6.11." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/long-running-workflow", - "title": "Long-Running Workflow", - "children": [], - "chapterTitle": "3.6.12. Long-Running Workflow", - "number": "3.6.12." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/execute-another-workflow", - "title": "Execute Another Workflow", - "children": [], - "chapterTitle": "3.6.13. Execute Another Workflow", - "number": "3.6.13." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/workflows/multiple-step-usage", - "title": "Multiple Step Usage", - "children": [], - "chapterTitle": "3.6.14. Multiple Step Usage", - "number": "3.6.14." - } - ], - "chapterTitle": "3.6. Workflows", - "number": "3.6." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/events-and-subscribers", - "title": "Events and Subscribers", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/events-and-subscribers/data-payload", - "title": "Events Data Payload", - "children": [], - "chapterTitle": "3.7.1. Events Data Payload", - "number": "3.7.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/events-and-subscribers/emit-event", - "title": "Emit Event", - "children": [], - "chapterTitle": "3.7.2. Emit Event", - "number": "3.7.2." - } - ], - "chapterTitle": "3.7. Events and Subscribers", - "number": "3.7." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/scheduled-jobs", - "title": "Scheduled Jobs", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/scheduled-jobs/execution-number", - "title": "Execution Number", - "children": [], - "chapterTitle": "3.8.1. Execution Number", - "number": "3.8.1." - } - ], - "chapterTitle": "3.8. Scheduled Jobs", - "number": "3.8." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/plugins", - "title": "Plugins", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/plugins/create", - "title": "Create Plugin", - "children": [], - "chapterTitle": "3.9.1. Create Plugin", - "number": "3.9.1." - } - ], - "chapterTitle": "3.9. Plugins", - "number": "3.9." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/custom-cli-scripts", - "title": "Custom CLI Scripts", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/custom-cli-scripts/seed-data", - "title": "Seed Data", - "children": [], - "chapterTitle": "3.10.1. Seed Data", - "number": "3.10.1." - } - ], - "chapterTitle": "3.10. Custom CLI Scripts", - "number": "3.10." - } - ], - "chapterTitle": "3. Framework", - "number": "3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "4. Admin Development", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/admin", - "title": "Overview", - "children": [], - "chapterTitle": "4.1. Overview", - "number": "4.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/admin/widgets", - "title": "Admin Widgets", - "children": [], - "chapterTitle": "4.2. Admin Widgets", - "number": "4.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/admin/ui-routes", - "title": "Admin UI Routes", - "children": [], - "chapterTitle": "4.3. Admin UI Routes", - "number": "4.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/admin/environment-variables", - "title": "Environment Variables", - "children": [], - "chapterTitle": "4.4. Environment Variables", - "number": "4.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/admin/routing", - "title": "Routing Customizations", - "children": [], - "chapterTitle": "4.5. Routing Customizations", - "number": "4.5." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/admin/constraints", - "title": "Constraints", - "children": [], - "chapterTitle": "4.6. Constraints", - "number": "4.6." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/fundamentals/admin/tips", - "title": "Tips", - "children": [], - "chapterTitle": "4.7. Tips", - "number": "4.7." - } - ], - "chapterTitle": "4. Admin Development", - "number": "4." - }, - { - "type": "category", - "title": "5. Storefront", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/storefront-development", - "title": "Storefront Development", - "chapterTitle": "5. Storefront", - "children": [], - "childrenSameLevel": true, - "number": "5." - } - ], - "loaded": true, - "initialOpen": false - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "6. Configurations", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Environment Variables", - "path": "/learn/fundamentals/environment-variables", - "children": [], - "chapterTitle": "6.1. Environment Variables", - "number": "6.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Type Aliases", - "path": "/learn/conventions/ts-aliases", - "children": [], - "chapterTitle": "6.2. Type Aliases", - "number": "6.2." - } - ], - "chapterTitle": "6. Configurations", - "number": "6." - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "7. Debugging & Testing", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/debugging-and-testing/testing-tools", - "title": "Testing Tools", - "children": [], - "chapterTitle": "7.1. Testing Tools", - "number": "7.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/debugging-and-testing/testing-tools/integration-tests", - "title": "Integration Tests", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/debugging-and-testing/testing-tools/integration-tests/api-routes", - "title": "Example: API Routes Tests", - "children": [], - "chapterTitle": "7.2.1. Example: API Routes Tests", - "number": "7.2.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/debugging-and-testing/testing-tools/integration-tests/workflows", - "title": "Example: Workflows Tests", - "children": [], - "chapterTitle": "7.2.2. Example: Workflows Tests", - "number": "7.2.2." - } - ], - "chapterTitle": "7.2. Integration Tests", - "number": "7.2." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/debugging-and-testing/testing-tools/modules-tests", - "title": "Modules Tests", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/debugging-and-testing/testing-tools/modules-tests/module-example", - "title": "Example", - "children": [], - "chapterTitle": "7.3.1. Example", - "number": "7.3.1." - } - ], - "chapterTitle": "7.3. Modules Tests", - "number": "7.3." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/debugging-and-testing/instrumentation", - "title": "Instrumentation", - "children": [], - "chapterTitle": "7.4. Instrumentation", - "number": "7.4." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/debugging-and-testing/logging", - "title": "Logging", - "children": [], - "chapterTitle": "7.5. Logging", - "number": "7.5." - } - ], - "chapterTitle": "7. Debugging & Testing", - "number": "7." - }, - { - "type": "category", - "title": "8. Production", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/build", - "title": "Build", - "chapterTitle": "8. Production", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/deployment", - "title": "Deployment Overview", - "children": [], - "chapterTitle": "8.1. Deployment Overview", - "number": "8.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/deployment/general", - "title": "General Deployment", - "children": [], - "chapterTitle": "8.2. General Deployment", - "number": "8.2." - } - ], - "childrenSameLevel": true, - "number": "8." - } - ], - "loaded": true, - "initialOpen": false - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "9. Upgrade", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/learn/update", - "title": "Update Medusa", - "children": [], - "chapterTitle": "9.1. Update Medusa", - "number": "9.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "external", - "path": "https://github.com/medusajs/medusa/releases", - "title": "Release Notes", - "children": [], - "chapterTitle": "9.2. Release Notes", - "number": "9.2." - } - ], - "chapterTitle": "9. Upgrade", - "number": "9." - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "10. Resources", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Contribution Guidelines", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/resources/contribution-guidelines/docs", - "title": "Docs", - "children": [], - "chapterTitle": "10.1.1. Docs", - "number": "10.1.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/resources//contribution-guidelines/admin-translations", - "title": "Admin Translations", - "children": [], - "chapterTitle": "10.1.2. Admin Translations", - "number": "10.1.2." - } - ], - "chapterTitle": "10.1. Contribution Guidelines", - "number": "10.1." - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/resources/usage", - "title": "Usage", - "children": [], - "chapterTitle": "10.2. Usage", - "number": "10.2." - } - ], - "chapterTitle": "10. Resources", - "number": "10." + ] } ] \ No newline at end of file diff --git a/www/apps/book/next.config.mjs b/www/apps/book/next.config.mjs index 108ebb89ee..7986372d2b 100644 --- a/www/apps/book/next.config.mjs +++ b/www/apps/book/next.config.mjs @@ -10,7 +10,7 @@ import { } from "remark-rehype-plugins" import path from "path" import redirects from "./utils/redirects.mjs" -import { generatedSidebar } from "./generated/sidebar.mjs" +import { generatedSidebars } from "./generated/sidebar.mjs" const withMDX = mdx({ extension: /\.mdx?$/, @@ -82,7 +82,7 @@ const withMDX = mdx({ [ pageNumberRehypePlugin, { - sidebar: generatedSidebar, + sidebar: generatedSidebars[0].items, }, ], ], diff --git a/www/apps/book/providers/sidebar.tsx b/www/apps/book/providers/sidebar.tsx index 3393d7b349..7b39f0587e 100644 --- a/www/apps/book/providers/sidebar.tsx +++ b/www/apps/book/providers/sidebar.tsx @@ -15,13 +15,8 @@ const SidebarProvider = ({ children }: SidebarProviderProps) => { return ( {children} diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index 55276b4631..4a60673853 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -312,6 +312,28 @@ Refer to [this documentation](https://docs.medusajs.com/learn/update/index.html. In the next chapters, you'll learn about the architecture of your Medusa application, then learn how to customize your application to build custom features. +# Storefront Development + +The Medusa application is made up of a Node.js server and an admin dashboard. Storefronts are installed, built, and hosted separately from the Medusa application, giving you the flexibility to choose the frontend tech stack that you and your team are proficient in, and implement unique design systems and user experience. + +You can build your storefront from scratch with your preferred tech stack, or start with our Next.js Starter storefront. The Next.js Starter storefront provides rich commerce features and a sleek design. Developers and businesses can use it as-is or build on top of it to tailor it for the business's unique use case, design, and customer experience. + +- [Install Next.js Starter Storefront](https://docs.medusajs.com/resources/nextjs-starter/index.html.md) +- [Build Custom Storefront](https://docs.medusajs.com/resources/storefront-development/index.html.md) + +*** + +## Passing a Publishable API Key in Storefront Requests + +When sending a request to an API route starting with `/store`, you must include a publishable API key in the header of your request. + +A publishable API key sets the scope of your request to one or more sales channels. + +Then, when you retrieve products, only products of those sales channels are retrieved. This also ensures you retrieve correct inventory data, and associate created orders with the scoped sales channel. + +Learn more about passing the publishable API key in [this storefront development guide](https://docs.medusajs.com/resources/storefront-development/publishable-api-keys/index.html.md). + + # Updating Medusa In this chapter, you'll learn about updating your Medusa application and packages. @@ -418,234 +440,6 @@ npm install ``` -# Storefront Development - -The Medusa application is made up of a Node.js server and an admin dashboard. Storefronts are installed, built, and hosted separately from the Medusa application, giving you the flexibility to choose the frontend tech stack that you and your team are proficient in, and implement unique design systems and user experience. - -You can build your storefront from scratch with your preferred tech stack, or start with our Next.js Starter storefront. The Next.js Starter storefront provides rich commerce features and a sleek design. Developers and businesses can use it as-is or build on top of it to tailor it for the business's unique use case, design, and customer experience. - -- [Install Next.js Starter Storefront](https://docs.medusajs.com/resources/nextjs-starter/index.html.md) -- [Build Custom Storefront](https://docs.medusajs.com/resources/storefront-development/index.html.md) - -*** - -## Passing a Publishable API Key in Storefront Requests - -When sending a request to an API route starting with `/store`, you must include a publishable API key in the header of your request. - -A publishable API key sets the scope of your request to one or more sales channels. - -Then, when you retrieve products, only products of those sales channels are retrieved. This also ensures you retrieve correct inventory data, and associate created orders with the scoped sales channel. - -Learn more about passing the publishable API key in [this storefront development guide](https://docs.medusajs.com/resources/storefront-development/publishable-api-keys/index.html.md). - - -# Configure Instrumentation - -In this chapter, you'll learn about observability in Medusa and how to configure instrumentation with OpenTelemetry. - -## Observability with OpenTelemtry - -Medusa uses [OpenTelemetry](https://opentelemetry.io/) for instrumentation and reporting. When configured, it reports traces for: - -- HTTP requests -- Workflow executions -- Query usages -- Database queries and operations - -*** - -## How to Configure Instrumentation in Medusa? - -### Prerequisites - -- [An exporter to visualize your application's traces, such as Zipkin.](https://zipkin.io/pages/quickstart.html) - -### Install Dependencies - -Start by installing the following OpenTelemetry dependencies in your Medusa project: - -```bash npm2yarn -npm install @opentelemetry/sdk-node @opentelemetry/resources @opentelemetry/sdk-trace-node @opentelemetry/instrumentation-pg -``` - -Also, install the dependencies relevant for the exporter you use. If you're using Zipkin, install the following dependencies: - -```bash npm2yarn -npm install @opentelemetry/exporter-zipkin -``` - -### Add instrumentation.ts - -Next, create the file `instrumentation.ts` with the following content: - -```ts title="instrumentation.ts" -import { registerOtel } from "@medusajs/medusa" -import { ZipkinExporter } from "@opentelemetry/exporter-zipkin" - -// If using an exporter other than Zipkin, initialize it here. -const exporter = new ZipkinExporter({ - serviceName: "my-medusa-project", -}) - -export function register() { - registerOtel({ - serviceName: "medusajs", - // pass exporter - exporter, - instrument: { - http: true, - workflows: true, - query: true, - }, - }) -} -``` - -In the `instrumentation.ts` file, you export a `register` function that uses Medusa's `registerOtel` utility function. You also initialize an instance of the exporter, such as Zipkin, and pass it to the `registerOtel` function. - -`registerOtel` accepts an object where you can pass any [NodeSDKConfiguration](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_sdk_node.NodeSDKConfiguration.html) property along with the following properties: - -The `NodeSDKConfiguration` properties are accepted since Medusa v2.5.1. - -- serviceName: (\`string\`) The name of the service traced. -- exporter: (\[SpanExporter]\(https://open-telemetry.github.io/opentelemetry-js/interfaces/\_opentelemetry\_sdk\_trace\_base.SpanExporter.html)) An instance of an exporter, such as Zipkin. -- instrument: (\`object\`) Options specifying what to trace. - - - http: (\`boolean\`) Whether to trace HTTP requests. - - - query: (\`boolean\`) Whether to trace Query usages. - - - workflows: (\`boolean\`) Whether to trace Workflow executions. - - - db: (\`boolean\`) Whether to trace database queries and operations. -- instrumentations: (\[Instrumentation\[]]\(https://open-telemetry.github.io/opentelemetry-js/interfaces/\_opentelemetry\_instrumentation.Instrumentation.html)) Additional instrumentation options that OpenTelemetry accepts. - -*** - -## Test it Out - -To test it out, start your exporter, such as Zipkin. - -Then, start your Medusa application: - -```bash npm2yarn -npm run dev -``` - -Try to open the Medusa Admin or send a request to an API route. - -If you check traces in your exporter, you'll find new traces reported. - -### Trace Span Names - -Trace span names start with the following keywords based on what it's reporting: - -- `{methodName} {URL}` when reporting HTTP requests, where `{methodName}` is the HTTP method, and `{URL}` is the URL the request is sent to. -- `route:` when reporting route handlers running on an HTTP request. -- `middleware:` when reporting a middleware running on an HTTP request. -- `workflow:` when reporting a workflow execution. -- `step:` when reporting a step in a workflow execution. -- `query.graph:` when reporting Query usages. -- `pg.query:` when reporting database queries and operations. - - -# Medusa Testing Tools - -In this chapter, you'll learn about Medusa's testing tools and how to install and configure them. - -## @medusajs/test-utils Package - -Medusa provides a Testing Framework to create integration tests for your custom API routes, modules, or other Medusa customizations. - -To use the Testing Framework, install `@medusajs/test-utils` as a `devDependency`: - -```bash npm2yarn -npm install --save-dev @medusajs/test-utils@latest -``` - -*** - -## Install and Configure Jest - -Writing tests with `@medusajs/test-utils`'s tools requires installing and configuring Jest in your project. - -Run the following command to install the required Jest dependencies: - -```bash npm2yarn -npm install --save-dev jest @types/jest @swc/jest -``` - -Then, create the file `jest.config.js` with the following content: - -```js title="jest.config.js" -const { loadEnv } = require("@medusajs/framework/utils") -loadEnv("test", process.cwd()) - -module.exports = { - transform: { - "^.+\\.[jt]s$": [ - "@swc/jest", - { - jsc: { - parser: { syntax: "typescript", decorators: true }, - }, - }, - ], - }, - testEnvironment: "node", - moduleFileExtensions: ["js", "ts", "json"], - modulePathIgnorePatterns: ["dist/"], - setupFiles: ["./integration-tests/setup.js"], -} - -if (process.env.TEST_TYPE === "integration:http") { - module.exports.testMatch = ["**/integration-tests/http/*.spec.[jt]s"] -} else if (process.env.TEST_TYPE === "integration:modules") { - module.exports.testMatch = ["**/src/modules/*/__tests__/**/*.[jt]s"] -} else if (process.env.TEST_TYPE === "unit") { - module.exports.testMatch = ["**/src/**/__tests__/**/*.unit.spec.[jt]s"] -} -``` - -Next, create the `integration-tests/setup.js` file with the following content: - -```js title="integration-tests/setup.js" -const { MetadataStorage } = require("@mikro-orm/core") - -MetadataStorage.clear() -``` - -*** - -## Add Test Commands - -Finally, add the following scripts to `package.json`: - -```json title="package.json" -"scripts": { - // ... - "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit", - "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit", - "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit" -}, -``` - -You now have two commands: - -- `test:integration:http` to run integration tests (for example, for API routes and workflows) available under the `integration-tests/http` directory. -- `test:integration:modules` to run integration tests for modules available in any `__tests__` directory under `src/modules`. -- `test:unit` to run unit tests in any `__tests__` directory under the `src` directory. - -Medusa's Testing Framework works for integration tests only. You can write unit tests using Jest. - -*** - -## Test Tools and Writing Tests - -The next chapters explain how to use the testing tools provided by `@medusajs/test-utils` to write tests. - - # Using TypeScript Aliases By default, Medusa doesn't support TypeScript aliases in production. @@ -690,167 +484,6 @@ import { BrandModuleService } from "@/modules/brand/service" ``` -# Logging - -In this chapter, you’ll learn how to use Medusa’s logging utility. - -## Logger Class - -Medusa provides a `Logger` class with advanced logging functionalities. This includes configuring logging levels or saving logs to a file. - -The Medusa application registers the `Logger` class in the Medusa container and each module's container as `logger`. - -*** - -## How to Log a Message - -Resolve the `logger` using the Medusa container to log a message in your resource. - -For example, create the file `src/jobs/log-message.ts` with the following content: - -```ts title="src/jobs/log-message.ts" highlights={highlights} -import { MedusaContainer } from "@medusajs/framework/types" -import { ContainerRegistrationKeys } from "@medusajs/framework/utils" - -export default async function myCustomJob( - container: MedusaContainer -) { - const logger = container.resolve(ContainerRegistrationKeys.LOGGER) - - logger.info("I'm using the logger!") -} - -export const config = { - name: "test-logger", - // execute every minute - schedule: "* * * * *", -} -``` - -This creates a scheduled job that resolves the `logger` from the Medusa container and uses it to log a message. - -### Test the Scheduled Job - -To test out the above scheduled job, start the Medusa application: - -```bash npm2yarn -npm run dev -``` - -After a minute, you'll see the following message as part of the logged messages: - -```text -info: I'm using the logger! -``` - -*** - -## Log Levels - -The `Logger` class has the following methods: - -- `info`: The message is logged with level `info`. -- `warn`: The message is logged with level `warn`. -- `error`: The message is logged with level `error`. -- `debug`: The message is logged with level `debug`. - -Each of these methods accepts a string parameter to log in the terminal with the associated level. - -*** - -## Logging Configurations - -### Log Level - -The available log levels, from lowest to highest levels, are: - -1. `silly` (default, meaning messages of all levels are logged) -2. `debug` -3. `info` -4. `warn` -5. `error` - -You can change that by setting the `LOG_LEVEL` environment variable to the minimum level you want to be logged. - -For example: - -```bash -LOG_LEVEL=error -``` - -This logs `error` messages only. - -The environment variable must be set as a system environment variable and not in `.env`. - -### Save Logs in a File - -Aside from showing the logs in the terminal, you can save the logs in a file by setting the `LOG_FILE` environment variable to the path of the file relative to the Medusa server’s root directory. - -For example: - -```bash -LOG_FILE=all.log -``` - -Your logs are now saved in the `all.log` file at the root of your Medusa application. - -The environment variable must be set as a system environment variable and not in `.env`. - -*** - -## Show Log with Progress - -The `Logger` class has an `activity` method used to log a message of level `info`. If the Medusa application is running in a development environment, a spinner starts to show the activity's progress. - -For example: - -```ts title="src/jobs/log-message.ts" -import { MedusaContainer } from "@medusajs/framework/types" -import { ContainerRegistrationKeys } from "@medusajs/framework/utils" - -export default async function myCustomJob( - container: MedusaContainer -) { - const logger = container.resolve(ContainerRegistrationKeys.LOGGER) - - const activityId = logger.activity("First log message") - - logger.progress(activityId, `Second log message`) - - logger.success(activityId, "Last log message") -} -``` - -The `activity` method returns the ID of the started activity. This ID can then be passed to one of the following methods of the `Logger` class: - -- `progress`: Log a message of level `info` that indicates progress within that same activity. -- `success`: Log a message of level `info` that indicates that the activity has succeeded. This also ends the associated activity. -- `failure`: Log a message of level `error` that indicates that the activity has failed. This also ends the associated activity. - -If you configured the `LOG_LEVEL` environment variable to a level higher than those associated with the above methods, their messages won’t be logged. - - -# Customize Medusa Admin Dashboard - -In the previous chapters, you've customized your Medusa application to [add brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md), [expose an API route to create brands](https://docs.medusajs.com/learn/customization/custom-features/api-route/index.html.md), and [linked brands to products](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md). - -After customizing and extending your application with new features, you may need to provide an interface for admin users to utilize these features. The Medusa Admin dashboard is extendable, allowing you to: - -- Insert components, called [widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md), on existing pages. -- Add new pages, called [UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md). - -From these customizations, you can send requests to custom API routes, allowing admin users to manage custom resources on the dashboard - -*** - -## Next Chapters: View Brands in Dashboard - -In the next chapters, you'll continue with the brands example to: - -- Add a new section to the product details page that shows the product's brand. -- Add a new page in the dashboard that shows all brands in the store. - - # Build Custom Features In the upcoming chapters, you'll follow step-by-step guides to build custom features in Medusa. These guides gradually introduce Medusa's concepts to help you understand what they are and how to use them. @@ -876,6 +509,27 @@ The next chapters will guide you to: 3. Expose an API route that allows admin users to create a brand using the workflow. +# Customize Medusa Admin Dashboard + +In the previous chapters, you've customized your Medusa application to [add brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md), [expose an API route to create brands](https://docs.medusajs.com/learn/customization/custom-features/api-route/index.html.md), and [linked brands to products](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md). + +After customizing and extending your application with new features, you may need to provide an interface for admin users to utilize these features. The Medusa Admin dashboard is extendable, allowing you to: + +- Insert components, called [widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md), on existing pages. +- Add new pages, called [UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md). + +From these customizations, you can send requests to custom API routes, allowing admin users to manage custom resources on the dashboard + +*** + +## Next Chapters: View Brands in Dashboard + +In the next chapters, you'll continue with the brands example to: + +- Add a new section to the product details page that shows the product's brand. +- Add a new page in the dashboard that shows all brands in the store. + + # Extend Core Commerce Features In the upcoming chapters, you'll learn about the concepts and tools to extend Medusa's core commerce features. @@ -899,29 +553,6 @@ The next chapters explain how to use the tools mentioned above with step-by-step - Retrieve a product's associated brand's details. -# Integrate Third-Party Systems - -Commerce applications often connect to third-party systems that provide additional or specialized features. For example, you may integrate a Content-Management System (CMS) for rich content features, a payment provider to process credit-card payments, and a notification service to send emails. - -Medusa's framework facilitates integrating these systems and orchestrating operations across them, saving you the effort of managing them yourself. You won't find those capabilities in other commerce platforms that in these scenarios become a bottleneck to building customizations and iterating quickly. - -In Medusa, you integrate a third-party system by: - -1. Creating a module whose service provides the methods to connect to and perform operations in the third-party system. -2. Building workflows that complete tasks spanning across systems. You use the module that integrates a third-party system in the workflow's steps. -3. Executing the workflows you built in an [API route](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md), at a scheduled time, or when an event is emitted. - -*** - -## Next Chapters: Sync Brands Example - -In the previous chapters, you've [added brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) to your Medusa application. In the next chapters, you will: - -1. Integrate a dummy third-party CMS in the Brand Module. -2. Sync brands to the CMS when a brand is created. -3. Sync brands from the CMS at a daily schedule. - - # Customizations Next Steps: Learn the Fundamentals The previous guides introduced Medusa's different concepts and how you can use them to customize Medusa for a realistic use case, You added brands to your application, linked them to products, customized the admin dashboard, and integrated a third-party CMS. @@ -961,6 +592,29 @@ Medusa provides the tooling to create a plugin package, test it in a local Medus To learn more about plugins and how to create them, refer to [this chapter](https://docs.medusajs.com/learn/fundamentals/plugins/index.html.md). +# Integrate Third-Party Systems + +Commerce applications often connect to third-party systems that provide additional or specialized features. For example, you may integrate a Content-Management System (CMS) for rich content features, a payment provider to process credit-card payments, and a notification service to send emails. + +Medusa's framework facilitates integrating these systems and orchestrating operations across them, saving you the effort of managing them yourself. You won't find those capabilities in other commerce platforms that in these scenarios become a bottleneck to building customizations and iterating quickly. + +In Medusa, you integrate a third-party system by: + +1. Creating a module whose service provides the methods to connect to and perform operations in the third-party system. +2. Building workflows that complete tasks spanning across systems. You use the module that integrates a third-party system in the workflow's steps. +3. Executing the workflows you built in an [API route](https://docs.medusajs.com/learn/fundamentals/api-routes/index.html.md), at a scheduled time, or when an event is emitted. + +*** + +## Next Chapters: Sync Brands Example + +In the previous chapters, you've [added brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) to your Medusa application. In the next chapters, you will: + +1. Integrate a dummy third-party CMS in the Brand Module. +2. Sync brands to the CMS when a brand is created. +3. Sync brands from the CMS at a daily schedule. + + # General Medusa Application Deployment Guide In this document, you'll learn the general steps to deploy your Medusa application. How you apply these steps depend on your chosen hosting provider or platform. @@ -1320,74 +974,350 @@ The following diagram illustrates Medusa's architecture over the three layers. ![Full diagram illustrating Medusa's architecture](https://res.cloudinary.com/dza7lstvk/image/upload/v1727174897/Medusa%20Book/architectural-diagram-full.jpg) -# Custom CLI Scripts +# Configure Instrumentation -In this chapter, you'll learn how to create and execute custom scripts from Medusa's CLI tool. +In this chapter, you'll learn about observability in Medusa and how to configure instrumentation with OpenTelemetry. -## What is a Custom CLI Script? +## Observability with OpenTelemtry -A custom CLI script is a function to execute through Medusa's CLI tool. This is useful when creating custom Medusa tooling to run through the CLI. +Medusa uses [OpenTelemetry](https://opentelemetry.io/) for instrumentation and reporting. When configured, it reports traces for: + +- HTTP requests +- Workflow executions +- Query usages +- Database queries and operations *** -## How to Create a Custom CLI Script? +## How to Configure Instrumentation in Medusa? -To create a custom CLI script, create a TypeScript or JavaScript file under the `src/scripts` directory. The file must default export a function. +### Prerequisites -For example, create the file `src/scripts/my-script.ts` with the following content: +- [An exporter to visualize your application's traces, such as Zipkin.](https://zipkin.io/pages/quickstart.html) -```ts title="src/scripts/my-script.ts" -import { - ExecArgs, - IProductModuleService, -} from "@medusajs/framework/types" -import { Modules } from "@medusajs/framework/utils" +### Install Dependencies -export default async function myScript({ container }: ExecArgs) { - const productModuleService: IProductModuleService = container.resolve( - Modules.PRODUCT - ) +Start by installing the following OpenTelemetry dependencies in your Medusa project: - const [, count] = await productModuleService - .listAndCountProducts() +```bash npm2yarn +npm install @opentelemetry/sdk-node @opentelemetry/resources @opentelemetry/sdk-trace-node @opentelemetry/instrumentation-pg +``` - console.log(`You have ${count} product(s)`) +Also, install the dependencies relevant for the exporter you use. If you're using Zipkin, install the following dependencies: + +```bash npm2yarn +npm install @opentelemetry/exporter-zipkin +``` + +### Add instrumentation.ts + +Next, create the file `instrumentation.ts` with the following content: + +```ts title="instrumentation.ts" +import { registerOtel } from "@medusajs/medusa" +import { ZipkinExporter } from "@opentelemetry/exporter-zipkin" + +// If using an exporter other than Zipkin, initialize it here. +const exporter = new ZipkinExporter({ + serviceName: "my-medusa-project", +}) + +export function register() { + registerOtel({ + serviceName: "medusajs", + // pass exporter + exporter, + instrument: { + http: true, + workflows: true, + query: true, + }, + }) } ``` -The function receives as a parameter an object having a `container` property, which is an instance of the Medusa Container. Use it to resolve resources in your Medusa application. +In the `instrumentation.ts` file, you export a `register` function that uses Medusa's `registerOtel` utility function. You also initialize an instance of the exporter, such as Zipkin, and pass it to the `registerOtel` function. + +`registerOtel` accepts an object where you can pass any [NodeSDKConfiguration](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_sdk_node.NodeSDKConfiguration.html) property along with the following properties: + +The `NodeSDKConfiguration` properties are accepted since Medusa v2.5.1. + +- serviceName: (\`string\`) The name of the service traced. +- exporter: (\[SpanExporter]\(https://open-telemetry.github.io/opentelemetry-js/interfaces/\_opentelemetry\_sdk\_trace\_base.SpanExporter.html)) An instance of an exporter, such as Zipkin. +- instrument: (\`object\`) Options specifying what to trace. + + - http: (\`boolean\`) Whether to trace HTTP requests. + + - query: (\`boolean\`) Whether to trace Query usages. + + - workflows: (\`boolean\`) Whether to trace Workflow executions. + + - db: (\`boolean\`) Whether to trace database queries and operations. +- instrumentations: (\[Instrumentation\[]]\(https://open-telemetry.github.io/opentelemetry-js/interfaces/\_opentelemetry\_instrumentation.Instrumentation.html)) Additional instrumentation options that OpenTelemetry accepts. *** -## How to Run Custom CLI Script? +## Test it Out -To run the custom CLI script, run the Medusa CLI's `exec` command: +To test it out, start your exporter, such as Zipkin. -```bash -npx medusa exec ./src/scripts/my-script.ts +Then, start your Medusa application: + +```bash npm2yarn +npm run dev +``` + +Try to open the Medusa Admin or send a request to an API route. + +If you check traces in your exporter, you'll find new traces reported. + +### Trace Span Names + +Trace span names start with the following keywords based on what it's reporting: + +- `{methodName} {URL}` when reporting HTTP requests, where `{methodName}` is the HTTP method, and `{URL}` is the URL the request is sent to. +- `route:` when reporting route handlers running on an HTTP request. +- `middleware:` when reporting a middleware running on an HTTP request. +- `workflow:` when reporting a workflow execution. +- `step:` when reporting a step in a workflow execution. +- `query.graph:` when reporting Query usages. +- `pg.query:` when reporting database queries and operations. + + +# Medusa Testing Tools + +In this chapter, you'll learn about Medusa's testing tools and how to install and configure them. + +## @medusajs/test-utils Package + +Medusa provides a Testing Framework to create integration tests for your custom API routes, modules, or other Medusa customizations. + +To use the Testing Framework, install `@medusajs/test-utils` as a `devDependency`: + +```bash npm2yarn +npm install --save-dev @medusajs/test-utils@latest ``` *** -## Custom CLI Script Arguments +## Install and Configure Jest -Your script can accept arguments from the command line. Arguments are passed to the function's object parameter in the `args` property. +Writing tests with `@medusajs/test-utils`'s tools requires installing and configuring Jest in your project. + +Run the following command to install the required Jest dependencies: + +```bash npm2yarn +npm install --save-dev jest @types/jest @swc/jest +``` + +Then, create the file `jest.config.js` with the following content: + +```js title="jest.config.js" +const { loadEnv } = require("@medusajs/framework/utils") +loadEnv("test", process.cwd()) + +module.exports = { + transform: { + "^.+\\.[jt]s$": [ + "@swc/jest", + { + jsc: { + parser: { syntax: "typescript", decorators: true }, + }, + }, + ], + }, + testEnvironment: "node", + moduleFileExtensions: ["js", "ts", "json"], + modulePathIgnorePatterns: ["dist/"], + setupFiles: ["./integration-tests/setup.js"], +} + +if (process.env.TEST_TYPE === "integration:http") { + module.exports.testMatch = ["**/integration-tests/http/*.spec.[jt]s"] +} else if (process.env.TEST_TYPE === "integration:modules") { + module.exports.testMatch = ["**/src/modules/*/__tests__/**/*.[jt]s"] +} else if (process.env.TEST_TYPE === "unit") { + module.exports.testMatch = ["**/src/**/__tests__/**/*.unit.spec.[jt]s"] +} +``` + +Next, create the `integration-tests/setup.js` file with the following content: + +```js title="integration-tests/setup.js" +const { MetadataStorage } = require("@mikro-orm/core") + +MetadataStorage.clear() +``` + +*** + +## Add Test Commands + +Finally, add the following scripts to `package.json`: + +```json title="package.json" +"scripts": { + // ... + "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit", + "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit", + "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit" +}, +``` + +You now have two commands: + +- `test:integration:http` to run integration tests (for example, for API routes and workflows) available under the `integration-tests/http` directory. +- `test:integration:modules` to run integration tests for modules available in any `__tests__` directory under `src/modules`. +- `test:unit` to run unit tests in any `__tests__` directory under the `src` directory. + +Medusa's Testing Framework works for integration tests only. You can write unit tests using Jest. + +*** + +## Test Tools and Writing Tests + +The next chapters explain how to use the testing tools provided by `@medusajs/test-utils` to write tests. + + +# Logging + +In this chapter, you’ll learn how to use Medusa’s logging utility. + +## Logger Class + +Medusa provides a `Logger` class with advanced logging functionalities. This includes configuring logging levels or saving logs to a file. + +The Medusa application registers the `Logger` class in the Medusa container and each module's container as `logger`. + +*** + +## How to Log a Message + +Resolve the `logger` using the Medusa container to log a message in your resource. + +For example, create the file `src/jobs/log-message.ts` with the following content: + +```ts title="src/jobs/log-message.ts" highlights={highlights} +import { MedusaContainer } from "@medusajs/framework/types" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" + +export default async function myCustomJob( + container: MedusaContainer +) { + const logger = container.resolve(ContainerRegistrationKeys.LOGGER) + + logger.info("I'm using the logger!") +} + +export const config = { + name: "test-logger", + // execute every minute + schedule: "* * * * *", +} +``` + +This creates a scheduled job that resolves the `logger` from the Medusa container and uses it to log a message. + +### Test the Scheduled Job + +To test out the above scheduled job, start the Medusa application: + +```bash npm2yarn +npm run dev +``` + +After a minute, you'll see the following message as part of the logged messages: + +```text +info: I'm using the logger! +``` + +*** + +## Log Levels + +The `Logger` class has the following methods: + +- `info`: The message is logged with level `info`. +- `warn`: The message is logged with level `warn`. +- `error`: The message is logged with level `error`. +- `debug`: The message is logged with level `debug`. + +Each of these methods accepts a string parameter to log in the terminal with the associated level. + +*** + +## Logging Configurations + +### Log Level + +The available log levels, from lowest to highest levels, are: + +1. `silly` (default, meaning messages of all levels are logged) +2. `debug` +3. `info` +4. `warn` +5. `error` + +You can change that by setting the `LOG_LEVEL` environment variable to the minimum level you want to be logged. For example: -```ts -import { ExecArgs } from "@medusajs/framework/types" +```bash +LOG_LEVEL=error +``` -export default async function myScript({ args }: ExecArgs) { - console.log(`The arguments you passed: ${args}`) +This logs `error` messages only. + +The environment variable must be set as a system environment variable and not in `.env`. + +### Save Logs in a File + +Aside from showing the logs in the terminal, you can save the logs in a file by setting the `LOG_FILE` environment variable to the path of the file relative to the Medusa server’s root directory. + +For example: + +```bash +LOG_FILE=all.log +``` + +Your logs are now saved in the `all.log` file at the root of your Medusa application. + +The environment variable must be set as a system environment variable and not in `.env`. + +*** + +## Show Log with Progress + +The `Logger` class has an `activity` method used to log a message of level `info`. If the Medusa application is running in a development environment, a spinner starts to show the activity's progress. + +For example: + +```ts title="src/jobs/log-message.ts" +import { MedusaContainer } from "@medusajs/framework/types" +import { ContainerRegistrationKeys } from "@medusajs/framework/utils" + +export default async function myCustomJob( + container: MedusaContainer +) { + const logger = container.resolve(ContainerRegistrationKeys.LOGGER) + + const activityId = logger.activity("First log message") + + logger.progress(activityId, `Second log message`) + + logger.success(activityId, "Last log message") } ``` -Then, pass the arguments in the `exec` command after the file path: +The `activity` method returns the ID of the started activity. This ID can then be passed to one of the following methods of the `Logger` class: -```bash -npx medusa exec ./src/scripts/my-script.ts arg1 arg2 -``` +- `progress`: Log a message of level `info` that indicates progress within that same activity. +- `success`: Log a message of level `info` that indicates that the activity has succeeded. This also ends the associated activity. +- `failure`: Log a message of level `error` that indicates that the activity has failed. This also ends the associated activity. + +If you configured the `LOG_LEVEL` environment variable to a level higher than those associated with the above methods, their messages won’t be logged. # Admin Development @@ -1473,6 +1403,19 @@ curl http://localhost:9000/hello-world You're exposing custom functionality to be used by a storefront, admin dashboard, or any external application. +# Data Models Advanced Guides + +Data models are created and managed in a module. To learn how to create a data model in a custom module, refer to the [Modules chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). + +In the next chapters, you'll learn about defining data models in more details. You'll learn about: + +- The different property types available. +- How to set a property as a primary key. +- How to create and manage relationships. +- How to configure properties, such as making them nullable or searchable. +- How to manually write migrations. + + # Environment Variables In this chapter, you'll learn how environment variables are loaded in Medusa. @@ -1552,17 +1495,74 @@ You should opt for setting configurations in `medusa-config.ts` where possible. ||Whether to disable analytics data collection. Learn more in || -# Data Models Advanced Guides +# Custom CLI Scripts -Data models are created and managed in a module. To learn how to create a data model in a custom module, refer to the [Modules chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). +In this chapter, you'll learn how to create and execute custom scripts from Medusa's CLI tool. -In the next chapters, you'll learn about defining data models in more details. You'll learn about: +## What is a Custom CLI Script? -- The different property types available. -- How to set a property as a primary key. -- How to create and manage relationships. -- How to configure properties, such as making them nullable or searchable. -- How to manually write migrations. +A custom CLI script is a function to execute through Medusa's CLI tool. This is useful when creating custom Medusa tooling to run through the CLI. + +*** + +## How to Create a Custom CLI Script? + +To create a custom CLI script, create a TypeScript or JavaScript file under the `src/scripts` directory. The file must default export a function. + +For example, create the file `src/scripts/my-script.ts` with the following content: + +```ts title="src/scripts/my-script.ts" +import { + ExecArgs, + IProductModuleService, +} from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" + +export default async function myScript({ container }: ExecArgs) { + const productModuleService: IProductModuleService = container.resolve( + Modules.PRODUCT + ) + + const [, count] = await productModuleService + .listAndCountProducts() + + console.log(`You have ${count} product(s)`) +} +``` + +The function receives as a parameter an object having a `container` property, which is an instance of the Medusa Container. Use it to resolve resources in your Medusa application. + +*** + +## How to Run Custom CLI Script? + +To run the custom CLI script, run the Medusa CLI's `exec` command: + +```bash +npx medusa exec ./src/scripts/my-script.ts +``` + +*** + +## Custom CLI Script Arguments + +Your script can accept arguments from the command line. Arguments are passed to the function's object parameter in the `args` property. + +For example: + +```ts +import { ExecArgs } from "@medusajs/framework/types" + +export default async function myScript({ args }: ExecArgs) { + console.log(`The arguments you passed: ${args}`) +} +``` + +Then, pass the arguments in the `exec` command after the file path: + +```bash +npx medusa exec ./src/scripts/my-script.ts arg1 arg2 +``` # Events and Subscribers @@ -2633,6 +2633,72 @@ You can now execute this workflow in a custom API route, scheduled job, or subsc Find a full list of the registered resources in the Medusa container and their registration key in [this reference](https://docs.medusajs.com/resources/medusa-container-resources/index.html.md). You can use these resources in your custom workflows. +# Next.js Starter Storefront + +The Medusa application is made up of a Node.js server and an admin dashboard. The storefront is installed and hosted separately from the Medusa application, giving you the flexibility to choose the frontend tech stack that you and your team are proficient in, and implement unique design systems and user experience. + +The Next.js Starter storefront provides rich commerce features and a sleek design. Developers and businesses can use it as-is or build on top of it to tailor it for the business's unique use case, design, and customer experience. + +In this chapter, you’ll learn how to install the Next.js Starter storefront separately from the Medusa application. You can also install it while installing the Medusa application as explained in [the installation chapter](https://docs.medusajs.com/learn/installation/index.html.md). + +## Install Next.js Starter + +### Prerequisites + +- [Node.js v20+](https://nodejs.org/en/download) +- [Git CLI tool](https://git-scm.com/downloads) + +If you already have a Medusa application installed with at least one region, you can install the Next.js Starter storefront with the following steps: + +1. Clone the [Next.js Starter](https://github.com/medusajs/nextjs-starter-medusa): + +```bash +git clone https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront +``` + +2. Change to the `my-medusa-storefront` directory, install the dependencies, and rename the template environment variable file: + +```bash npm2yarn +cd my-medusa-storefront +npm install +mv .env.template .env.local +``` + +3. Set the Medusa application's publishable API key in the `NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY` environment variable. You can retrieve the publishable API key in on the Medusa Admin dashboard by going to Settings -> Publishable API Keys + +```bash +NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY=pk_123... +``` + +4. While the Medusa application is running, start the Next.js Starter storefront: + +```bash npm2yarn +npm run dev +``` + +Your Next.js Starter storefront is now running at `http://localhost:8000`. + +*** + +## Customize Storefront + +To customize the storefront, refer to the following directories: + +- `src/app`: The storefront’s pages. +- `src/modules`: The storefront’s components. +- `src/styles`: The storefront’s styles. + +You can learn more about development with Next.js through [their documentation](https://nextjs.org/docs/getting-started). + +*** + +## Configurations and Integrations + +The Next.js Starter is compatible with some Medusa integrations out-of-the-box, such as the Stripe provider module. You can also change some of its configurations if necessary. + +Refer to the [Next.js Starter reference](https://docs.medusajs.com/resources/nextjs-starter/index.html.md) for more details. + + # Usage Information At Medusa, we strive to provide the best experience for developers using our platform. For that reason, Medusa collects anonymous and non-sensitive data that provides a global understanding of how users are using Medusa. @@ -2723,427 +2789,6 @@ MEDUSA_FF_ANALYTICS=false ``` -# Next.js Starter Storefront - -The Medusa application is made up of a Node.js server and an admin dashboard. The storefront is installed and hosted separately from the Medusa application, giving you the flexibility to choose the frontend tech stack that you and your team are proficient in, and implement unique design systems and user experience. - -The Next.js Starter storefront provides rich commerce features and a sleek design. Developers and businesses can use it as-is or build on top of it to tailor it for the business's unique use case, design, and customer experience. - -In this chapter, you’ll learn how to install the Next.js Starter storefront separately from the Medusa application. You can also install it while installing the Medusa application as explained in [the installation chapter](https://docs.medusajs.com/learn/installation/index.html.md). - -## Install Next.js Starter - -### Prerequisites - -- [Node.js v20+](https://nodejs.org/en/download) -- [Git CLI tool](https://git-scm.com/downloads) - -If you already have a Medusa application installed with at least one region, you can install the Next.js Starter storefront with the following steps: - -1. Clone the [Next.js Starter](https://github.com/medusajs/nextjs-starter-medusa): - -```bash -git clone https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront -``` - -2. Change to the `my-medusa-storefront` directory, install the dependencies, and rename the template environment variable file: - -```bash npm2yarn -cd my-medusa-storefront -npm install -mv .env.template .env.local -``` - -3. Set the Medusa application's publishable API key in the `NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY` environment variable. You can retrieve the publishable API key in on the Medusa Admin dashboard by going to Settings -> Publishable API Keys - -```bash -NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY=pk_123... -``` - -4. While the Medusa application is running, start the Next.js Starter storefront: - -```bash npm2yarn -npm run dev -``` - -Your Next.js Starter storefront is now running at `http://localhost:8000`. - -*** - -## Customize Storefront - -To customize the storefront, refer to the following directories: - -- `src/app`: The storefront’s pages. -- `src/modules`: The storefront’s components. -- `src/styles`: The storefront’s styles. - -You can learn more about development with Next.js through [their documentation](https://nextjs.org/docs/getting-started). - -*** - -## Configurations and Integrations - -The Next.js Starter is compatible with some Medusa integrations out-of-the-box, such as the Stripe provider module. You can also change some of its configurations if necessary. - -Refer to the [Next.js Starter reference](https://docs.medusajs.com/resources/nextjs-starter/index.html.md) for more details. - - -# Write Tests for Modules - -In this chapter, you'll learn about `moduleIntegrationTestRunner` from Medusa's Testing Framework and how to use it to write integration tests for a module's main service. - -### Prerequisites - -- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) - -## moduleIntegrationTestRunner Utility - -`moduleIntegrationTestRunner` creates integration tests for a module. The integration tests run on a test Medusa application with only the specified module enabled. - -For example, assuming you have a `hello` module, create a test file at `src/modules/hello/__tests__/service.spec.ts`: - -```ts title="src/modules/hello/__tests__/service.spec.ts" -import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import { HELLO_MODULE } from ".." -import HelloModuleService from "../service" -import MyCustom from "../models/my-custom" - -moduleIntegrationTestRunner({ - moduleName: HELLO_MODULE, - moduleModels: [MyCustom], - resolve: "./src/modules/hello", - testSuite: ({ service }) => { - // TODO write tests - }, -}) - -jest.setTimeout(60 * 1000) -``` - -The `moduleIntegrationTestRunner` function accepts as a parameter an object with the following properties: - -- `moduleName`: The name of the module. -- `moduleModels`: An array of models in the module. Refer to [this section](#write-tests-for-modules-without-data-models) if your module doesn't have data models. -- `resolve`: The path to the model. -- `testSuite`: A function that defines the tests to run. - -The `testSuite` function accepts as a parameter an object having the `service` property, which is an instance of the module's main service. - -The type argument provided to the `moduleIntegrationTestRunner` function is used as the type of the `service` property. - -The tests in the `testSuite` function are written using [Jest](https://jestjs.io/). - -*** - -## Run Tests - -Run the following command to run your module integration tests: - -```bash npm2yarn -npm run test:integration:modules -``` - -If you don't have a `test:integration:modules` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). - -This runs your Medusa application and runs the tests available in any `__tests__` directory under the `src/modules` directory. - -*** - -## Pass Module Options - -If your module accepts options, you can set them using the `moduleOptions` property of the `moduleIntegrationTestRunner`'s parameter. - -For example: - -```ts -import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import HelloModuleService from "../service" - -moduleIntegrationTestRunner({ - moduleOptions: { - apiKey: "123", - }, - // ... -}) -``` - -*** - -## Write Tests for Modules without Data Models - -If your module doesn't have a data model, pass a dummy model in the `moduleModels` property. - -For example: - -```ts -import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import HelloModuleService from "../service" -import { model } from "@medusajs/framework/utils" - -const DummyModel = model.define("dummy_model", { - id: model.id().primaryKey(), -}) - -moduleIntegrationTestRunner({ - moduleModels: [DummyModel], - // ... -}) - -jest.setTimeout(60 * 1000) -``` - -*** - -### Other Options and Inputs - -Refer to [this reference in the Development Resources documentation](https://docs.medusajs.com/resources/test-tools-reference/moduleIntegrationTestRunner/index.html.md) for other available parameter options and inputs of the `testSuite` function. - -*** - -## Database Used in Tests - -The `moduleIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end. - -To manage that database, such as changing its name or perform operations on it in your tests, refer to the [references in the Development Resources documentation](https://docs.medusajs.com/resources/test-tools-reference/moduleIntegrationTestRunner/index.html.md). - - -# Write Integration Tests - -In this chapter, you'll learn about `medusaIntegrationTestRunner` from Medusa's Testing Framework and how to use it to write integration tests. - -### Prerequisites - -- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) - -## medusaIntegrationTestRunner Utility - -The `medusaIntegrationTestRunner` is from Medusa's Testing Framework and it's used to create integration tests in your Medusa project. It runs a full Medusa application, allowing you test API routes, workflows, or other customizations. - -For example: - -```ts title="integration-tests/http/test.spec.ts" highlights={highlights} -import { medusaIntegrationTestRunner } from "@medusajs/test-utils" - -medusaIntegrationTestRunner({ - testSuite: ({ api, getContainer }) => { - // TODO write tests... - }, -}) - -jest.setTimeout(60 * 1000) -``` - -The `medusaIntegrationTestRunner` function accepts an object as a parameter. The object has a required property `testSuite`. - -`testSuite`'s value is a function that defines the tests to run. The function accepts as a parameter an object that has the following properties: - -- `api`: a set of utility methods used to send requests to the Medusa application. It has the following methods: - - `get`: Send a `GET` request to an API route. - - `post`: Send a `POST` request to an API route. - - `delete`: Send a `DELETE` request to an API route. -- `getContainer`: a function that retrieves the Medusa Container. Use the `getContainer().resolve` method to resolve resources from the Medusa Container. - -The tests in the `testSuite` function are written using [Jest](https://jestjs.io/). - -### Jest Timeout - -Since your tests connect to the database and perform actions that require more time than the typical tests, make sure to increase the timeout in your test: - -```ts title="integration-tests/http/test.spec.ts" -// in your test's file -jest.setTimeout(60 * 1000) -``` - -*** - -### Run Tests - -Run the following command to run your tests: - -```bash npm2yarn -npm run test:integration -``` - -If you don't have a `test:integration` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). - -This runs your Medusa application and runs the tests available under the `src/integrations/http` directory. - -*** - -## Other Options and Inputs - -Refer to [this reference in the Development Resources documentation](https://docs.medusajs.com/resources/test-tools-reference/medusaIntegrationTestRunner/index.html.md) for other available parameter options and inputs of the `testSuite` function. - -*** - -## Database Used in Tests - -The `medusaIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end. - -To manage that database, such as changing its name or perform operations on it in your tests, refer to the [references in the Development Resources documentation](https://docs.medusajs.com/resources/test-tools-reference/medusaIntegrationTestRunner/index.html.md). - -*** - -## Example Integration Tests - -The next chapters provide examples of writing integration tests for API routes and workflows. - - -# Guide: Add Product's Brand Widget in Admin - -In this chapter, you'll customize the product details page of the Medusa Admin dashboard to show the product's [brand](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md). You'll create a widget that is injected into a pre-defined zone in the page, and in the widget you'll retrieve the product's brand from the server and display it. - -### Prerequisites - -- [Brands linked to products](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md) - -## 1. Initialize JS SDK - -In your custom widget, you'll retrieve the product's brand by sending a request to the Medusa server. Medusa has a [JS SDK](https://docs.medusajs.com/resources/js-sdk/index.html.md) that simplifies sending requests to the server's API routes. - -So, you'll start by configuring the JS SDK. Create the file `src/admin/lib/sdk.ts` with the following content: - -![The directory structure of the Medusa application after adding the file](https://res.cloudinary.com/dza7lstvk/image/upload/v1733414606/Medusa%20Book/brands-admin-dir-overview-1_jleg0t.jpg) - -```ts title="src/admin/lib/sdk.ts" -import Medusa from "@medusajs/js-sdk" - -export const sdk = new Medusa({ - baseUrl: import.meta.env.VITE_BACKEND_URL || "/", - debug: import.meta.env.DEV, - auth: { - type: "session", - }, -}) -``` - -You initialize the SDK passing it the following options: - -- `baseUrl`: The URL to the Medusa server. -- `debug`: Whether to enable logging debug messages. This should only be enabled in development. -- `auth.type`: The authentication method used in the client application, which is `session` in the Medusa Admin dashboard. - -Notice that you use `import.meta.env` to access environment variables in your customizations because the Medusa Admin is built on top of Vite. Learn more in [this chapter](https://docs.medusajs.com/learn/fundamentals/admin/environment-variables/index.html.md). - -You can now use the SDK to send requests to the Medusa server. - -Learn more about the JS SDK and its options in [this reference](https://docs.medusajs.com/resources/js-sdk/index.html.md). - -*** - -## 2. Add Widget to Product Details Page - -You'll now add a widget to the product-details page. A widget is a React component that's injected into pre-defined zones in the Medusa Admin dashboard. It's created in a `.tsx` file under the `src/admin/widgets` directory. - -Learn more about widgets in [this documentation](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md). - -To create a widget that shows a product's brand in its details page, create the file `src/admin/widgets/product-brand.tsx` with the following content: - -![Directory structure of the Medusa application after adding the widget](https://res.cloudinary.com/dza7lstvk/image/upload/v1733414684/Medusa%20Book/brands-admin-dir-overview-2_eq5xhi.jpg) - -```tsx title="src/admin/widgets/product-brand.tsx" highlights={highlights} -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { DetailWidgetProps, AdminProduct } from "@medusajs/framework/types" -import { clx, Container, Heading, Text } from "@medusajs/ui" -import { useQuery } from "@tanstack/react-query" -import { sdk } from "../lib/sdk" - -type AdminProductBrand = AdminProduct & { - brand?: { - id: string - name: string - } -} - -const ProductBrandWidget = ({ - data: product, -}: DetailWidgetProps) => { - const { data: queryResult } = useQuery({ - queryFn: () => sdk.admin.product.retrieve(product.id, { - fields: "+brand.*", - }), - queryKey: [["product", product.id]], - }) - const brandName = (queryResult?.product as AdminProductBrand)?.brand?.name - - return ( - -
-
- Brand -
-
-
- - Name - - - - {brandName || "-"} - -
-
- ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductBrandWidget -``` - -A widget's file must export: - -- A React component to be rendered in the specified injection zone. The component must be the file's default export. -- A configuration object created with `defineWidgetConfig` from the Admin Extension SDK. The function receives an object as a parameter that has a `zone` property, whose value is the zone to inject the widget to. - -Since the widget is injected at the top of the product details page, the widget receives the product's details as a parameter. - -In the widget, you use [Tanstack (React) Query](https://tanstack.com/query/latest) to query the Medusa server. Tanstack Query provides features like asynchronous state management and optimized caching. In the `queryFn` function that executes the query, you use the JS SDK to send a request to the [Get Product API Route](https://docs.medusajs.com/api/admin#products_getproductsid), passing `+brand.*` in the `fields` query parameter to retrieve the product's brand. - -Do not install Tanstack Query as that will cause unexpected errors in your development. If you prefer installing it for better auto-completion in your code editor, make sure to install `v5.64.2` as a development dependency. - -You then render a section that shows the brand's name. In admin customizations, use components from the [Medusa UI package](https://docs.medusajs.com/ui/index.html.md) to maintain a consistent user interface and design in the dashboard. - -*** - -## Test it Out - -To test out your widget, start the Medusa application: - -```bash npm2yarn -npm run dev -``` - -Then, open the admin dashboard at `http://localhost:9000/app`. After you log in, open the page of a product that has a brand. You'll see a new section at the top showing the brand's name. - -![The widget is added as the first section of the product details page.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733414415/Medusa%20Book/Screenshot_2024-12-05_at_5.59.25_PM_y85m14.png) - -*** - -## Admin Components Guides - -When building your widget, you may need more complicated components. For example, you may add a form to the above widget to set the product's brand. - -The [Admin Components guides](https://docs.medusajs.com/resources/admin-components/index.html.md) show you how to build and use common components in the Medusa Admin, such as forms, tables, JSON data viewer, and more. The components in the guides also follow the Medusa Admin's design convention. - -*** - -## Next Chapter: Add UI Route for Brands - -In the next chapter, you'll add a UI route that displays the list of brands in your application and allows admin users. - - # Guide: Implement Brand Module In this chapter, you'll build a Brand Module that adds a `brand` table to the database and provides data-management features for it. @@ -3300,378 +2945,6 @@ The Brand Module now creates a `brand` table in the database and provides a clas In the next chapter, you'll implement the functionality to create a brand in a workflow. You'll then use that workflow in a later chapter to expose an endpoint that allows admin users to create a brand. -# Create Brands UI Route in Admin - -In this chapter, you'll add a UI route to the admin dashboard that shows all [brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) in a new page. You'll retrieve the brands from the server and display them in a table with pagination. - -### Prerequisites - -- [Brands Module](https://docs.medusajs.com/learn/customization/custom-features/modules/index.html.md) - -## 1. Get Brands API Route - -In a [previous chapter](https://docs.medusajs.com/learn/customization/extend-features/query-linked-records/index.html.md), you learned how to add an API route that retrieves brands and their products using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). You'll expand that API route to support pagination, so that on the admin dashboard you can show the brands in a paginated table. - -Replace or create the `GET` API route at `src/api/admin/brands/route.ts` with the following: - -```ts title="src/api/admin/brands/route.ts" highlights={apiRouteHighlights} -// other imports... -import { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - const query = req.scope.resolve("query") - - const { - data: brands, - metadata: { count, take, skip } = {}, - } = await query.graph({ - entity: "brand", - ...req.queryConfig, - }) - - res.json({ - brands, - count, - limit: take, - offset: skip, - }) -} -``` - -In the API route, you use Query's `graph` method to retrieve the brands. In the method's object parameter, you spread the `queryConfig` property of the request object. This property holds configurations for pagination and retrieved fields. - -The query configurations are combined from default configurations, which you'll add next, and the request's query parameters: - -- `fields`: The fields to retrieve in the brands. -- `limit`: The maximum number of items to retrieve. -- `offset`: The number of items to skip before retrieving the returned items. - -When you pass pagination configurations to the `graph` method, the returned object has the pagination's details in a `metadata` property, whose value is an object having the following properties: - -- `count`: The total count of items. -- `take`: The maximum number of items returned in the `data` array. -- `skip`: The number of items skipped before retrieving the returned items. - -You return in the response the retrieved brands and the pagination configurations. - -Learn more about pagination with Query in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/query#apply-pagination/index.html.md). - -*** - -## 2. Add Default Query Configurations - -Next, you'll set the default query configurations of the above API route and allow passing query parameters to change the configurations. - -Medusa provides a `validateAndTransformQuery` middleware that validates the accepted query parameters for a request and sets the default Query configuration. So, in `src/api/middlewares.ts`, add a new middleware configuration object: - -```ts title="src/api/middlewares.ts" -import { - defineMiddlewares, - validateAndTransformQuery, -} from "@medusajs/framework/http" -import { createFindParams } from "@medusajs/medusa/api/utils/validators" -// other imports... - -export const GetBrandsSchema = createFindParams() - -export default defineMiddlewares({ - routes: [ - // ... - { - matcher: "/admin/brands", - method: "GET", - middlewares: [ - validateAndTransformQuery( - GetBrandsSchema, - { - defaults: [ - "id", - "name", - "products.*", - ], - isList: true, - } - ), - ], - }, - - ], -}) -``` - -You apply the `validateAndTransformQuery` middleware on the `GET /admin/brands` API route. The middleware accepts two parameters: - -- A [Zod](https://zod.dev/) schema that a request's query parameters must satisfy. Medusa provides `createFindParams` that generates a Zod schema with the following properties: - - `fields`: A comma-separated string indicating the fields to retrieve. - - `limit`: The maximum number of items to retrieve. - - `offset`: The number of items to skip before retrieving the returned items. - - `order`: The name of the field to sort the items by. Learn more about sorting in [the API reference](https://docs.medusajs.com/api/admin#sort-order) -- An object of Query configurations having the following properties: - - `defaults`: An array of default fields and relations to retrieve. - - `isList`: Whether the API route returns a list of items. - -By applying the above middleware, you can pass pagination configurations to `GET /admin/brands`, which will return a paginated list of brands. You'll see how it works when you create the UI route. - -Learn more about using the `validateAndTransformQuery` middleware to configure Query in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/query#request-query-configurations/index.html.md). - -*** - -## 3. Initialize JS SDK - -In your custom UI route, you'll retrieve the brands by sending a request to the Medusa server. Medusa has a [JS SDK](https://docs.medusajs.com/resources/js-sdk/index.html.md) that simplifies sending requests to the core API route. - -If you didn't follow the [previous chapter](https://docs.medusajs.com/learn/customization/customize-admin/widget/index.html.md), create the file `src/admin/lib/sdk.ts` with the following content: - -![The directory structure of the Medusa application after adding the file](https://res.cloudinary.com/dza7lstvk/image/upload/v1733414606/Medusa%20Book/brands-admin-dir-overview-1_jleg0t.jpg) - -```ts title="src/admin/lib/sdk.ts" -import Medusa from "@medusajs/js-sdk" - -export const sdk = new Medusa({ - baseUrl: import.meta.env.VITE_BACKEND_URL || "/", - debug: import.meta.env.DEV, - auth: { - type: "session", - }, -}) -``` - -You initialize the SDK passing it the following options: - -- `baseUrl`: The URL to the Medusa server. -- `debug`: Whether to enable logging debug messages. This should only be enabled in development. -- `auth.type`: The authentication method used in the client application, which is `session` in the Medusa Admin dashboard. - -Notice that you use `import.meta.env` to access environment variables in your customizations because the Medusa Admin is built on top of Vite. Learn more in [this chapter](https://docs.medusajs.com/learn/fundamentals/admin/environment-variables/index.html.md). - -You can now use the SDK to send requests to the Medusa server. - -Learn more about the JS SDK and its options in [this reference](https://docs.medusajs.com/resources/js-sdk/index.html.md). - -*** - -## 4. Add a UI Route to Show Brands - -You'll now add the UI route that shows the paginated list of brands. A UI route is a React component created in a `page.tsx` file under a sub-directory of `src/admin/routes`. The file's path relative to src/admin/routes determines its path in the dashboard. - -Learn more about UI routes in [this chapter](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md). - -So, to add the UI route at the `localhost:9000/app/brands` path, create the file `src/admin/routes/brands/page.tsx` with the following content: - -![Directory structure of the Medusa application after adding the UI route.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733472011/Medusa%20Book/brands-admin-dir-overview-3_syytld.jpg) - -```tsx title="src/admin/routes/brands/page.tsx" highlights={uiRouteHighlights} -import { defineRouteConfig } from "@medusajs/admin-sdk" -import { TagSolid } from "@medusajs/icons" -import { - Container, -} from "@medusajs/ui" -import { useQuery } from "@tanstack/react-query" -import { sdk } from "../../lib/sdk" -import { useMemo, useState } from "react" - -const BrandsPage = () => { - // TODO retrieve brands - - return ( - - {/* TODO show brands */} - - ) -} - -export const config = defineRouteConfig({ - label: "Brands", - icon: TagSolid, -}) - -export default BrandsPage -``` - -A route's file must export the React component that will be rendered in the new page. It must be the default export of the file. You can also export configurations that add a link in the sidebar for the UI route. You create these configurations using `defineRouteConfig` from the Admin Extension SDK. - -So far, you only show a container. In admin customizations, use components from the [Medusa UI package](https://docs.medusajs.com/ui/index.html.md) to maintain a consistent user interface and design in the dashboard. - -### Retrieve Brands From API Route - -You'll now update the UI route to retrieve the brands from the API route you added earlier. - -First, add the following type in `src/admin/routes/brands/page.tsx`: - -```tsx title="src/admin/routes/brands/page.tsx" -type Brand = { - id: string - name: string -} -type BrandsResponse = { - brands: Brand[] - count: number - limit: number - offset: number -} -``` - -You define the type for a brand, and the type of expected response from the `GET /admin/brands` API route. - -To display the brands, you'll use Medusa UI's [DataTable](https://docs.medusajs.com/ui/components/data-table/index.html.md) component. So, add the following imports in `src/admin/routes/brands/page.tsx`: - -```tsx title="src/admin/routes/brands/page.tsx" -import { - // ... - Heading, - createDataTableColumnHelper, - DataTable, - DataTablePaginationState, - useDataTable, -} from "@medusajs/ui" -``` - -You import the `DataTable` component and the following utilities: - -- `createDataTableColumnHelper`: A utility to create columns for the data table. -- `DataTablePaginationState`: A type that holds the pagination state of the data table. -- `useDataTable`: A hook to initialize and configure the data table. - -You also import the `Heading` component to show a heading above the data table. - -Next, you'll define the table's columns. Add the following before the `BrandsPage` component: - -```tsx title="src/admin/routes/brands/page.tsx" -const columnHelper = createDataTableColumnHelper() - -const columns = [ - columnHelper.accessor("id", { - header: "ID", - }), - columnHelper.accessor("name", { - header: "Name", - }), -] -``` - -You use the `createDataTableColumnHelper` utility to create columns for the data table. You define two columns for the ID and name of the brands. - -Then, replace the `// TODO retrieve brands` in the component with the following: - -```tsx title="src/admin/routes/brands/page.tsx" highlights={queryHighlights} -const limit = 15 -const [pagination, setPagination] = useState({ - pageSize: limit, - pageIndex: 0, -}) -const offset = useMemo(() => { - return pagination.pageIndex * limit -}, [pagination]) - -const { data, isLoading } = useQuery({ - queryFn: () => sdk.client.fetch(`/admin/brands`, { - query: { - limit, - offset, - }, - }), - queryKey: [["brands", limit, offset]], -}) - -// TODO configure data table -``` - -To enable pagination in the `DataTable` component, you need to define a state variable of type `DataTablePaginationState`. It's an object having the following properties: - -- `pageSize`: The maximum number of items per page. You set it to `15`. -- `pageIndex`: A zero-based index of the current page of items. - -You also define a memoized `offset` value that indicates the number of items to skip before retrieving the current page's items. - -Then, you use `useQuery` from [Tanstack (React) Query](https://tanstack.com/query/latest) to query the Medusa server. Tanstack Query provides features like asynchronous state management and optimized caching. - -Do not install Tanstack Query as that will cause unexpected errors in your development. If you prefer installing it for better auto-completion in your code editor, make sure to install `v5.64.2` as a development dependency. - -In the `queryFn` function that executes the query, you use the JS SDK's `client.fetch` method to send a request to your custom API route. The first parameter is the route's path, and the second is an object of request configuration and data. You pass the query parameters in the `query` property. - -This sends a request to the [Get Brands API route](#1-get-brands-api-route), passing the pagination query parameters. Whenever `currentPage` is updated, the `offset` is also updated, which will send a new request to retrieve the brands for the current page. - -### Display Brands Table - -Finally, you'll display the brands in a data table. Replace the `// TODO configure data table` in the component with the following: - -```tsx title="src/admin/routes/brands/page.tsx" -const table = useDataTable({ - columns, - data: data?.brands || [], - getRowId: (row) => row.id, - rowCount: data?.count || 0, - isLoading, - pagination: { - state: pagination, - onPaginationChange: setPagination, - }, -}) -``` - -You use the `useDataTable` hook to initialize and configure the data table. It accepts an object with the following properties: - -- `columns`: The columns of the data table. You created them using the `createDataTableColumnHelper` utility. -- `data`: The brands to display in the table. -- `getRowId`: A function that returns a unique identifier for a row. -- `rowCount`: The total count of items. This is used to determine the number of pages. -- `isLoading`: A boolean indicating whether the data is loading. -- `pagination`: An object to configure pagination. It accepts the following properties: - - `state`: The pagination state of the data table. - - `onPaginationChange`: A function to update the pagination state. - -Then, replace the `{/* TODO show brands */}` in the return statement with the following: - -```tsx title="src/admin/routes/brands/page.tsx" - - - Brands - - - - -``` - -This renders the data table that shows the brands with pagination. The `DataTable` component accepts the `instance` prop, which is the object returned by the `useDataTable` hook. - -*** - -## Test it Out - -To test out the UI route, start the Medusa application: - -```bash npm2yarn -npm run dev -``` - -Then, open the admin dashboard at `http://localhost:9000/app`. After you log in, you'll find a new "Brands" sidebar item. Click on it to see the brands in your store. You can also go to `http://localhost:9000/app/brands` to see the page. - -![A new sidebar item is added for the new brands UI route. The UI route shows the table of brands with pagination.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733421074/Medusa%20Book/Screenshot_2024-12-05_at_7.46.52_PM_slcdqd.png) - -*** - -## Summary - -By following the previous chapters, you: - -- Injected a widget into the product details page to show the product's brand. -- Created a UI route in the Medusa Admin that shows the list of brands. - -*** - -## Next Steps: Integrate Third-Party Systems - -Your customizations often span across systems, where you need to retrieve data or perform operations in a third-party system. - -In the next chapters, you'll learn about the concepts that facilitate integrating third-party systems in your application. You'll integrate a dummy third-party system and sync the brands between it and the Medusa application. - - # Guide: Create Brand API Route In the previous two chapters, you created a [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) that added the concepts of brands to your application, then created a [workflow to create a brand](https://docs.medusajs.com/learn/customization/custom-features/workflow/index.html.md). In this chapter, you'll expose an API route that allows admin users to create a brand using the workflow from the previous chapter. @@ -4088,313 +3361,742 @@ You can also run the `npx medusa db:sync-links` to just sync module links withou In the next chapter, you'll extend Medusa's workflow and API route that create a product to allow associating a brand with a product. You'll also learn how to link brand and product records. -# Guide: Schedule Syncing Brands from CMS +# Guide: Extend Create Product Flow -In the previous chapters, you've [integrated a third-party CMS](https://docs.medusajs.com/learn/customization/integrate-systems/service/index.html.md) and implemented the logic to [sync created brands](https://docs.medusajs.com/learn/customization/integrate-systems/handle-event/index.html.md) from Medusa to the CMS. +After linking the [custom Brand data model](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) and Medusa's [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md) in the [previous chapter](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md), you'll extend the create product workflow and API route to allow associating a brand with a product. -However, when you integrate a third-party system, you want the data to be in sync between the Medusa application and the system. One way to do so is by automatically syncing the data once a day. +Some API routes, including the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts), accept an `additional_data` request body parameter. This parameter can hold custom data that's passed to the [hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md) of the workflow executed in the API route, allowing you to consume those hooks and perform actions with the custom data. -You can create an action to be automatically executed at a specified interval using scheduled jobs. A scheduled job is an asynchronous function with a specified schedule of when the Medusa application should run it. Scheduled jobs are useful to automate repeated tasks. +So, in this chapter, to extend the create product flow and associate a brand with a product, you will: -Learn more about scheduled jobs in [this chapter](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md). +- Consume the [productsCreated](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow#productsCreated/index.html.md) hook of the [createProductsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md), which is executed within the workflow after the product is created. You'll link the product with the brand passed in the `additional_data` parameter. +- Extend the Create Product API route to allow passing a brand ID in `additional_data`. -In this chapter, you'll create a scheduled job that triggers syncing the brands from the third-party CMS to Medusa once a day. You'll implement the syncing logic in a workflow, and execute that workflow in the scheduled job. +To learn more about the `additional_data` property and the API routes that accept additional data, refer to [this chapter](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md). ### Prerequisites -- [CMS Module](https://docs.medusajs.com/learn/customization/integrate-systems/service/index.html.md) +- [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) +- [Defined link between the Brand and Product data models.](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md) *** -## 1. Implement Syncing Workflow +## 1. Consume the productsCreated Hook -You'll start by implementing the syncing logic in a workflow, then execute the workflow later in the scheduled job. +A workflow hook is a point in a workflow where you can inject a step to perform a custom functionality. Consuming a workflow hook allows you to extend the features of a workflow and, consequently, the API route that uses it. -Workflows have a built-in durable execution engine that helps you complete tasks spanning multiple systems. Also, their rollback mechanism ensures that data is consistent across systems even when errors occur during execution. +Learn more about the workflow hooks in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md). -Learn more about workflows in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md). +The [createProductsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md) used in the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts) has a `productsCreated` hook that runs after the product is created. You'll consume this hook to link the created product with the brand specified in the request parameters. -This workflow will have three steps: +To consume the `productsCreated` hook, create the file `src/workflows/hooks/created-product.ts` with the following content: -1. `retrieveBrandsFromCmsStep` to retrieve the brands from the CMS. -2. `createBrandsStep` to create the brands retrieved in the first step that don't exist in Medusa. -3. `updateBrandsStep` to update the brands retrieved in the first step that exist in Medusa. +![Directory structure after creating the hook's file.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733384338/Medusa%20Book/brands-hook-dir-overview_ltwr5h.jpg) -### retrieveBrandsFromCmsStep +```ts title="src/workflows/hooks/created-product.ts" highlights={hook1Highlights} +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" +import { StepResponse } from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" +import { LinkDefinition } from "@medusajs/framework/types" +import { BRAND_MODULE } from "../../modules/brand" +import BrandModuleService from "../../modules/brand/service" -To create the step that retrieves the brands from the third-party CMS, create the file `src/workflows/sync-brands-from-cms.ts` with the following content: - -![Directory structure of the Medusa application after creating the file.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733494196/Medusa%20Book/cms-dir-overview-6_z1omsi.jpg) - -```ts title="src/workflows/sync-brands-from-cms.ts" collapsibleLines="1-7" expandButtonLabel="Show Imports" -import { - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import CmsModuleService from "../modules/cms/service" -import { CMS_MODULE } from "../modules/cms" - -const retrieveBrandsFromCmsStep = createStep( - "retrieve-brands-from-cms", - async (_, { container }) => { - const cmsModuleService: CmsModuleService = container.resolve( - CMS_MODULE - ) - - const brands = await cmsModuleService.retrieveBrands() - - return new StepResponse(brands) - } -) -``` - -You create a `retrieveBrandsFromCmsStep` that resolves the CMS Module's service and uses its `retrieveBrands` method to retrieve the brands in the CMS. You return those brands in the step's response. - -### createBrandsStep - -The brands retrieved in the first step may have brands that don't exist in Medusa. So, you'll create a step that creates those brands. Add the step to the same `src/workflows/sync-brands-from-cms.ts` file: - -```ts title="src/workflows/sync-brands-from-cms.ts" highlights={createBrandsHighlights} collapsibleLines="1-8" expandButtonLabel="Show Imports" -// other imports... -import BrandModuleService from "../modules/brand/service" -import { BRAND_MODULE } from "../modules/brand" - -// ... - -type CreateBrand = { - name: string -} - -type CreateBrandsInput = { - brands: CreateBrand[] -} - -export const createBrandsStep = createStep( - "create-brands-step", - async (input: CreateBrandsInput, { container }) => { - const brandModuleService: BrandModuleService = container.resolve( - BRAND_MODULE - ) - - const brands = await brandModuleService.createBrands(input.brands) - - return new StepResponse(brands, brands) - }, - async (brands, { container }) => { - if (!brands) { - return +createProductsWorkflow.hooks.productsCreated( + (async ({ products, additional_data }, { container }) => { + if (!additional_data?.brand_id) { + return new StepResponse([], []) } const brandModuleService: BrandModuleService = container.resolve( BRAND_MODULE ) + // if the brand doesn't exist, an error is thrown. + await brandModuleService.retrieveBrand(additional_data.brand_id as string) - await brandModuleService.deleteBrands(brands.map((brand) => brand.id)) - } + // TODO link brand to product + }) ) ``` -The `createBrandsStep` accepts the brands to create as an input. It resolves the [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md)'s service and uses the generated `createBrands` method to create the brands. +Workflows have a special `hooks` property to access its hooks and consume them. Each hook, such as `productsCreated`, accepts a step function as a parameter. The step function accepts the following parameters: -The step passes the created brands to the compensation function, which deletes those brands if an error occurs during the workflow's execution. +1. An object having an `additional_data` property, which is the custom data passed in the request body under `additional_data`. The object will also have properties passed from the workflow to the hook, which in this case is the `products` property that holds an array of the created products. +2. An object of properties related to the step's context. It has a `container` property whose value is the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) to resolve framework and commerce tools. -Learn more about compensation functions in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/compensation-function/index.html.md). +In the step, if a brand ID is passed in `additional_data`, you resolve the Brand Module's service and use its generated `retrieveBrand` method to retrieve the brand by its ID. The `retrieveBrand` method will throw an error if the brand doesn't exist. -### Update Brands Step +### Link Brand to Product -The brands retrieved in the first step may also have brands that exist in Medusa. So, you'll create a step that updates their details to match that of the CMS. Add the step to the same `src/workflows/sync-brands-from-cms.ts` file: +Next, you want to create a link between the created products and the brand. To do so, you use Link, which is a class from the Modules SDK that provides methods to manage linked records. -```ts title="src/workflows/sync-brands-from-cms.ts" highlights={updateBrandsHighlights} -// ... +Learn more about Link in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/link/index.html.md). -type UpdateBrand = { - id: string - name: string +To use Link in the `productsCreated` hook, replace the `TODO` with the following: + +```ts title="src/workflows/hooks/created-product.ts" highlights={hook2Highlights} +const link = container.resolve("link") +const logger = container.resolve("logger") + +const links: LinkDefinition[] = [] + +for (const product of products) { + links.push({ + [Modules.PRODUCT]: { + product_id: product.id, + }, + [BRAND_MODULE]: { + brand_id: additional_data.brand_id, + }, + }) } -type UpdateBrandsInput = { - brands: UpdateBrand[] -} +await link.create(links) -export const updateBrandsStep = createStep( - "update-brands-step", - async ({ brands }: UpdateBrandsInput, { container }) => { - const brandModuleService: BrandModuleService = container.resolve( - BRAND_MODULE - ) +logger.info("Linked brand to products") - const prevUpdatedBrands = await brandModuleService.listBrands({ - id: brands.map((brand) => brand.id), - }) - - const updatedBrands = await brandModuleService.updateBrands(brands) - - return new StepResponse(updatedBrands, prevUpdatedBrands) - }, - async (prevUpdatedBrands, { container }) => { - if (!prevUpdatedBrands) { - return - } - - const brandModuleService: BrandModuleService = container.resolve( - BRAND_MODULE - ) - - await brandModuleService.updateBrands(prevUpdatedBrands) - } -) +return new StepResponse(links, links) ``` -The `updateBrandsStep` receives the brands to update in Medusa. In the step, you retrieve the brand's details in Medusa before the update to pass them to the compensation function. You then update the brands using the Brand Module's `updateBrands` generated method. +You resolve Link from the container. Then you loop over the created products to assemble an array of links to be created. After that, you pass the array of links to Link's `create` method, which will link the product and brand records. -In the compensation function, which receives the brand's old data, you revert the update using the same `updateBrands` method. +Each property in the link object is the name of a module, and its value is an object having a `{model_name}_id` property, where `{model_name}` is the snake-case name of the module's data model. Its value is the ID of the record to be linked. The link object's properties must be set in the same order as the link configurations passed to `defineLink`. -### Create Workflow +![Diagram showcasing how the order of defining a link affects creating the link](https://res.cloudinary.com/dza7lstvk/image/upload/v1733386156/Medusa%20Book/remote-link-brand-product-exp_fhjmg4.jpg) -Finally, you'll create the workflow that uses the above steps to sync the brands from the CMS to Medusa. Add to the same `src/workflows/sync-brands-from-cms.ts` file the following: +Finally, you return an instance of `StepResponse` returning the created links. -```ts title="src/workflows/sync-brands-from-cms.ts" -// other imports... -import { +### Dismiss Links in Compensation + +You can pass as a second parameter of the hook a compensation function that undoes what the step did. It receives as a first parameter the returned `StepResponse`'s second parameter, and the step context object as a second parameter. + +To undo creating the links in the hook, pass the following compensation function as a second parameter to `productsCreated`: + +```ts title="src/workflows/hooks/created-product.ts" +createProductsWorkflow.hooks.productsCreated( // ... - createWorkflow, - transform, - WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" + (async (links, { container }) => { + if (!links?.length) { + return + } + + const link = container.resolve("link") + + await link.dismiss(links) + }) +) +``` + +In the compensation function, if the `links` parameter isn't empty, you resolve Link from the container and use its `dismiss` method. This method removes a link between two records. It accepts the same parameter as the `create` method. + +*** + +## 2. Configure Additional Data Validation + +Now that you've consumed the `productsCreated` hook, you want to configure the `/admin/products` API route that creates a new product to accept a brand ID in its `additional_data` parameter. + +You configure the properties accepted in `additional_data` in the `src/api/middlewares.ts` that exports middleware configurations. So, create the file (or, if already existing, add to the file) `src/api/middlewares.ts` the following content: + +![Directory structure after adding the middelwares file](https://res.cloudinary.com/dza7lstvk/image/upload/v1733386868/Medusa%20Book/brands-middleware-dir-overview_uczos1.jpg) + +```ts title="src/api/middlewares.ts" +import { defineMiddlewares } from "@medusajs/framework/http" +import { z } from "zod" // ... -export const syncBrandsFromCmsWorkflow = createWorkflow( - "sync-brands-from-system", - () => { - const brands = retrieveBrandsFromCmsStep() - - // TODO create and update brands - } -) -``` - -In the workflow, you only use the `retrieveBrandsFromCmsStep` for now, which retrieves the brands from the third-party CMS. - -Next, you need to identify which brands must be created or updated. Since workflows are constructed internally and are only evaluated during execution, you can't access values to perform data manipulation directly. Instead, use [transform](https://docs.medusajs.com/learn/fundamentals/workflows/variable-manipulation/index.html.md) from the Workflows SDK that gives you access to the real-time values of the data, allowing you to create new variables using those values. - -Learn more about data manipulation using `transform` in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/variable-manipulation/index.html.md). - -So, replace the `TODO` with the following: - -```ts title="src/workflows/sync-brands-from-cms.ts" -const { toCreate, toUpdate } = transform( - { - brands, - }, - (data) => { - const toCreate: CreateBrand[] = [] - const toUpdate: UpdateBrand[] = [] - - data.brands.forEach((brand) => { - if (brand.external_id) { - toUpdate.push({ - id: brand.external_id as string, - name: brand.name as string, - }) - } else { - toCreate.push({ - name: brand.name as string, - }) - } - }) - - return { toCreate, toUpdate } - } -) - -// TODO create and update the brands -``` - -`transform` accepts two parameters: - -1. The data to be passed to the function in the second parameter. -2. A function to execute only when the workflow is executed. Its return value can be consumed by the rest of the workflow. - -In `transform`'s function, you loop over the brands array to check which should be created or updated. This logic assumes that a brand in the CMS has an `external_id` property whose value is the brand's ID in Medusa. - -You now have the list of brands to create and update. So, replace the new `TODO` with the following: - -```ts title="src/workflows/sync-brands-from-cms.ts" -const created = createBrandsStep({ brands: toCreate }) -const updated = updateBrandsStep({ brands: toUpdate }) - -return new WorkflowResponse({ - created, - updated, +export default defineMiddlewares({ + routes: [ + // ... + { + matcher: "/admin/products", + method: ["POST"], + additionalDataValidator: { + brand_id: z.string().optional(), + }, + }, + ], }) ``` -You first run the `createBrandsStep` to create the brands that don't exist in Medusa, then the `updateBrandsStep` to update the brands that exist in Medusa. You pass the arrays returned by `transform` as the inputs for the steps. +Objects in `routes` accept an `additionalDataValidator` property that configures the validation rules for custom properties passed in the `additional_data` request parameter. It accepts an object whose keys are custom property names, and their values are validation rules created using [Zod](https://zod.dev/). -Finally, you return an object of the created and updated brands. You'll execute this workflow in the scheduled job next. - -*** - -## 2. Schedule Syncing Task - -You now have the workflow to sync the brands from the CMS to Medusa. Next, you'll create a scheduled job that runs this workflow once a day to ensure the data between Medusa and the CMS are always in sync. - -A scheduled job is created in a TypeScript or JavaScript file under the `src/jobs` directory. So, create the file `src/jobs/sync-brands-from-cms.ts` with the following content: - -![Directory structure of the Medusa application after adding the scheduled job](https://res.cloudinary.com/dza7lstvk/image/upload/v1733494592/Medusa%20Book/cms-dir-overview-7_dkjb9s.jpg) - -```ts title="src/jobs/sync-brands-from-cms.ts" -import { MedusaContainer } from "@medusajs/framework/types" -import { syncBrandsFromCmsWorkflow } from "../workflows/sync-brands-from-cms" - -export default async function (container: MedusaContainer) { - const logger = container.resolve("logger") - - const { result } = await syncBrandsFromCmsWorkflow(container).run() - - logger.info( - `Synced brands from third-party system: ${ - result.created.length - } brands created and ${result.updated.length} brands updated.`) -} - -export const config = { - name: "sync-brands-from-system", - schedule: "0 0 * * *", // change to * * * * * for debugging -} -``` - -A scheduled job file must export: - -- An asynchronous function that will be executed at the specified schedule. This function must be the file's default export. -- An object of scheduled jobs configuration. It has two properties: - - `name`: A unique name for the scheduled job. - - `schedule`: A string that holds a [cron expression](https://crontab.guru/) indicating the schedule to run the job. - -The scheduled job function accepts as a parameter the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) used to resolve framework and commerce tools. You then execute the `syncBrandsFromCmsWorkflow` and use its result to log how many brands were created or updated. - -Based on the cron expression specified in `config.schedule`, Medusa will run the scheduled job every day at midnight. You can also change it to `* * * * *` to run it every minute for easier debugging. +So, `POST` requests sent to `/admin/products` can now pass the ID of a brand in the `brand_id` property of `additional_data`. *** ## Test it Out -To test out the scheduled job, start the Medusa application: +To test it out, first, retrieve the authentication token of your admin user by sending a `POST` request to `/auth/user/emailpass`: + +```bash +curl -X POST 'http://localhost:9000/auth/user/emailpass' \ +-H 'Content-Type: application/json' \ +--data-raw '{ + "email": "admin@medusa-test.com", + "password": "supersecret" +}' +``` + +Make sure to replace the email and password in the request body with your user's credentials. + +Then, send a `POST` request to `/admin/products` to create a product, and pass in the `additional_data` parameter a brand's ID: + +```bash +curl -X POST 'http://localhost:9000/admin/products' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer {token}' \ +--data '{ + "title": "Product 1", + "options": [ + { + "title": "Default option", + "values": ["Default option value"] + } + ], + "shipping_profile_id": "{shipping_profile_id}", + "additional_data": { + "brand_id": "{brand_id}" + } +}' +``` + +Make sure to replace `{token}` with the token you received from the previous request, `shipping_profile_id` with the ID of a shipping profile in your application, and `{brand_id}` with the ID of a brand in your application. You can retrieve the ID of a shipping profile either from the Medusa Admin, or the [List Shipping Profiles API route](https://docs.medusajs.com/api/admin#shipping-profiles_getshippingprofiles). + +The request creates a product and returns it. + +In the Medusa application's logs, you'll find the message `Linked brand to products`, indicating that the workflow hook handler ran and linked the brand to the products. + +*** + +## Next Steps: Query Linked Brands and Products + +Now that you've extending the create-product flow to link a brand to it, you want to retrieve the brand details of a product. You'll learn how to do so in the next chapter. + + +# Create Brands UI Route in Admin + +In this chapter, you'll add a UI route to the admin dashboard that shows all [brands](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) in a new page. You'll retrieve the brands from the server and display them in a table with pagination. + +### Prerequisites + +- [Brands Module](https://docs.medusajs.com/learn/customization/custom-features/modules/index.html.md) + +## 1. Get Brands API Route + +In a [previous chapter](https://docs.medusajs.com/learn/customization/extend-features/query-linked-records/index.html.md), you learned how to add an API route that retrieves brands and their products using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). You'll expand that API route to support pagination, so that on the admin dashboard you can show the brands in a paginated table. + +Replace or create the `GET` API route at `src/api/admin/brands/route.ts` with the following: + +```ts title="src/api/admin/brands/route.ts" highlights={apiRouteHighlights} +// other imports... +import { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + const query = req.scope.resolve("query") + + const { + data: brands, + metadata: { count, take, skip } = {}, + } = await query.graph({ + entity: "brand", + ...req.queryConfig, + }) + + res.json({ + brands, + count, + limit: take, + offset: skip, + }) +} +``` + +In the API route, you use Query's `graph` method to retrieve the brands. In the method's object parameter, you spread the `queryConfig` property of the request object. This property holds configurations for pagination and retrieved fields. + +The query configurations are combined from default configurations, which you'll add next, and the request's query parameters: + +- `fields`: The fields to retrieve in the brands. +- `limit`: The maximum number of items to retrieve. +- `offset`: The number of items to skip before retrieving the returned items. + +When you pass pagination configurations to the `graph` method, the returned object has the pagination's details in a `metadata` property, whose value is an object having the following properties: + +- `count`: The total count of items. +- `take`: The maximum number of items returned in the `data` array. +- `skip`: The number of items skipped before retrieving the returned items. + +You return in the response the retrieved brands and the pagination configurations. + +Learn more about pagination with Query in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/query#apply-pagination/index.html.md). + +*** + +## 2. Add Default Query Configurations + +Next, you'll set the default query configurations of the above API route and allow passing query parameters to change the configurations. + +Medusa provides a `validateAndTransformQuery` middleware that validates the accepted query parameters for a request and sets the default Query configuration. So, in `src/api/middlewares.ts`, add a new middleware configuration object: + +```ts title="src/api/middlewares.ts" +import { + defineMiddlewares, + validateAndTransformQuery, +} from "@medusajs/framework/http" +import { createFindParams } from "@medusajs/medusa/api/utils/validators" +// other imports... + +export const GetBrandsSchema = createFindParams() + +export default defineMiddlewares({ + routes: [ + // ... + { + matcher: "/admin/brands", + method: "GET", + middlewares: [ + validateAndTransformQuery( + GetBrandsSchema, + { + defaults: [ + "id", + "name", + "products.*", + ], + isList: true, + } + ), + ], + }, + + ], +}) +``` + +You apply the `validateAndTransformQuery` middleware on the `GET /admin/brands` API route. The middleware accepts two parameters: + +- A [Zod](https://zod.dev/) schema that a request's query parameters must satisfy. Medusa provides `createFindParams` that generates a Zod schema with the following properties: + - `fields`: A comma-separated string indicating the fields to retrieve. + - `limit`: The maximum number of items to retrieve. + - `offset`: The number of items to skip before retrieving the returned items. + - `order`: The name of the field to sort the items by. Learn more about sorting in [the API reference](https://docs.medusajs.com/api/admin#sort-order) +- An object of Query configurations having the following properties: + - `defaults`: An array of default fields and relations to retrieve. + - `isList`: Whether the API route returns a list of items. + +By applying the above middleware, you can pass pagination configurations to `GET /admin/brands`, which will return a paginated list of brands. You'll see how it works when you create the UI route. + +Learn more about using the `validateAndTransformQuery` middleware to configure Query in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/query#request-query-configurations/index.html.md). + +*** + +## 3. Initialize JS SDK + +In your custom UI route, you'll retrieve the brands by sending a request to the Medusa server. Medusa has a [JS SDK](https://docs.medusajs.com/resources/js-sdk/index.html.md) that simplifies sending requests to the core API route. + +If you didn't follow the [previous chapter](https://docs.medusajs.com/learn/customization/customize-admin/widget/index.html.md), create the file `src/admin/lib/sdk.ts` with the following content: + +![The directory structure of the Medusa application after adding the file](https://res.cloudinary.com/dza7lstvk/image/upload/v1733414606/Medusa%20Book/brands-admin-dir-overview-1_jleg0t.jpg) + +```ts title="src/admin/lib/sdk.ts" +import Medusa from "@medusajs/js-sdk" + +export const sdk = new Medusa({ + baseUrl: import.meta.env.VITE_BACKEND_URL || "/", + debug: import.meta.env.DEV, + auth: { + type: "session", + }, +}) +``` + +You initialize the SDK passing it the following options: + +- `baseUrl`: The URL to the Medusa server. +- `debug`: Whether to enable logging debug messages. This should only be enabled in development. +- `auth.type`: The authentication method used in the client application, which is `session` in the Medusa Admin dashboard. + +Notice that you use `import.meta.env` to access environment variables in your customizations because the Medusa Admin is built on top of Vite. Learn more in [this chapter](https://docs.medusajs.com/learn/fundamentals/admin/environment-variables/index.html.md). + +You can now use the SDK to send requests to the Medusa server. + +Learn more about the JS SDK and its options in [this reference](https://docs.medusajs.com/resources/js-sdk/index.html.md). + +*** + +## 4. Add a UI Route to Show Brands + +You'll now add the UI route that shows the paginated list of brands. A UI route is a React component created in a `page.tsx` file under a sub-directory of `src/admin/routes`. The file's path relative to src/admin/routes determines its path in the dashboard. + +Learn more about UI routes in [this chapter](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md). + +So, to add the UI route at the `localhost:9000/app/brands` path, create the file `src/admin/routes/brands/page.tsx` with the following content: + +![Directory structure of the Medusa application after adding the UI route.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733472011/Medusa%20Book/brands-admin-dir-overview-3_syytld.jpg) + +```tsx title="src/admin/routes/brands/page.tsx" highlights={uiRouteHighlights} +import { defineRouteConfig } from "@medusajs/admin-sdk" +import { TagSolid } from "@medusajs/icons" +import { + Container, +} from "@medusajs/ui" +import { useQuery } from "@tanstack/react-query" +import { sdk } from "../../lib/sdk" +import { useMemo, useState } from "react" + +const BrandsPage = () => { + // TODO retrieve brands + + return ( + + {/* TODO show brands */} + + ) +} + +export const config = defineRouteConfig({ + label: "Brands", + icon: TagSolid, +}) + +export default BrandsPage +``` + +A route's file must export the React component that will be rendered in the new page. It must be the default export of the file. You can also export configurations that add a link in the sidebar for the UI route. You create these configurations using `defineRouteConfig` from the Admin Extension SDK. + +So far, you only show a container. In admin customizations, use components from the [Medusa UI package](https://docs.medusajs.com/ui/index.html.md) to maintain a consistent user interface and design in the dashboard. + +### Retrieve Brands From API Route + +You'll now update the UI route to retrieve the brands from the API route you added earlier. + +First, add the following type in `src/admin/routes/brands/page.tsx`: + +```tsx title="src/admin/routes/brands/page.tsx" +type Brand = { + id: string + name: string +} +type BrandsResponse = { + brands: Brand[] + count: number + limit: number + offset: number +} +``` + +You define the type for a brand, and the type of expected response from the `GET /admin/brands` API route. + +To display the brands, you'll use Medusa UI's [DataTable](https://docs.medusajs.com/ui/components/data-table/index.html.md) component. So, add the following imports in `src/admin/routes/brands/page.tsx`: + +```tsx title="src/admin/routes/brands/page.tsx" +import { + // ... + Heading, + createDataTableColumnHelper, + DataTable, + DataTablePaginationState, + useDataTable, +} from "@medusajs/ui" +``` + +You import the `DataTable` component and the following utilities: + +- `createDataTableColumnHelper`: A utility to create columns for the data table. +- `DataTablePaginationState`: A type that holds the pagination state of the data table. +- `useDataTable`: A hook to initialize and configure the data table. + +You also import the `Heading` component to show a heading above the data table. + +Next, you'll define the table's columns. Add the following before the `BrandsPage` component: + +```tsx title="src/admin/routes/brands/page.tsx" +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("id", { + header: "ID", + }), + columnHelper.accessor("name", { + header: "Name", + }), +] +``` + +You use the `createDataTableColumnHelper` utility to create columns for the data table. You define two columns for the ID and name of the brands. + +Then, replace the `// TODO retrieve brands` in the component with the following: + +```tsx title="src/admin/routes/brands/page.tsx" highlights={queryHighlights} +const limit = 15 +const [pagination, setPagination] = useState({ + pageSize: limit, + pageIndex: 0, +}) +const offset = useMemo(() => { + return pagination.pageIndex * limit +}, [pagination]) + +const { data, isLoading } = useQuery({ + queryFn: () => sdk.client.fetch(`/admin/brands`, { + query: { + limit, + offset, + }, + }), + queryKey: [["brands", limit, offset]], +}) + +// TODO configure data table +``` + +To enable pagination in the `DataTable` component, you need to define a state variable of type `DataTablePaginationState`. It's an object having the following properties: + +- `pageSize`: The maximum number of items per page. You set it to `15`. +- `pageIndex`: A zero-based index of the current page of items. + +You also define a memoized `offset` value that indicates the number of items to skip before retrieving the current page's items. + +Then, you use `useQuery` from [Tanstack (React) Query](https://tanstack.com/query/latest) to query the Medusa server. Tanstack Query provides features like asynchronous state management and optimized caching. + +Do not install Tanstack Query as that will cause unexpected errors in your development. If you prefer installing it for better auto-completion in your code editor, make sure to install `v5.64.2` as a development dependency. + +In the `queryFn` function that executes the query, you use the JS SDK's `client.fetch` method to send a request to your custom API route. The first parameter is the route's path, and the second is an object of request configuration and data. You pass the query parameters in the `query` property. + +This sends a request to the [Get Brands API route](#1-get-brands-api-route), passing the pagination query parameters. Whenever `currentPage` is updated, the `offset` is also updated, which will send a new request to retrieve the brands for the current page. + +### Display Brands Table + +Finally, you'll display the brands in a data table. Replace the `// TODO configure data table` in the component with the following: + +```tsx title="src/admin/routes/brands/page.tsx" +const table = useDataTable({ + columns, + data: data?.brands || [], + getRowId: (row) => row.id, + rowCount: data?.count || 0, + isLoading, + pagination: { + state: pagination, + onPaginationChange: setPagination, + }, +}) +``` + +You use the `useDataTable` hook to initialize and configure the data table. It accepts an object with the following properties: + +- `columns`: The columns of the data table. You created them using the `createDataTableColumnHelper` utility. +- `data`: The brands to display in the table. +- `getRowId`: A function that returns a unique identifier for a row. +- `rowCount`: The total count of items. This is used to determine the number of pages. +- `isLoading`: A boolean indicating whether the data is loading. +- `pagination`: An object to configure pagination. It accepts the following properties: + - `state`: The pagination state of the data table. + - `onPaginationChange`: A function to update the pagination state. + +Then, replace the `{/* TODO show brands */}` in the return statement with the following: + +```tsx title="src/admin/routes/brands/page.tsx" + + + Brands + + + + +``` + +This renders the data table that shows the brands with pagination. The `DataTable` component accepts the `instance` prop, which is the object returned by the `useDataTable` hook. + +*** + +## Test it Out + +To test out the UI route, start the Medusa application: ```bash npm2yarn npm run dev ``` -If you set the schedule to `* * * * *` for debugging, the scheduled job will run in a minute. You'll see in the logs how many brands were created or updated. +Then, open the admin dashboard at `http://localhost:9000/app`. After you log in, you'll find a new "Brands" sidebar item. Click on it to see the brands in your store. You can also go to `http://localhost:9000/app/brands` to see the page. + +![A new sidebar item is added for the new brands UI route. The UI route shows the table of brands with pagination.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733421074/Medusa%20Book/Screenshot_2024-12-05_at_7.46.52_PM_slcdqd.png) *** ## Summary -By following the previous chapters, you utilized Medusa's framework and orchestration tools to perform and automate tasks that span across systems. +By following the previous chapters, you: -With Medusa, you can integrate any service from your commerce ecosystem with ease. You don't have to set up separate applications to manage your different customizations, or worry about data inconsistency across systems. Your efforts only go into implementing the business logic that ties your systems together. +- Injected a widget into the product details page to show the product's brand. +- Created a UI route in the Medusa Admin that shows the list of brands. + +*** + +## Next Steps: Integrate Third-Party Systems + +Your customizations often span across systems, where you need to retrieve data or perform operations in a third-party system. + +In the next chapters, you'll learn about the concepts that facilitate integrating third-party systems in your application. You'll integrate a dummy third-party system and sync the brands between it and the Medusa application. + + +# Guide: Add Product's Brand Widget in Admin + +In this chapter, you'll customize the product details page of the Medusa Admin dashboard to show the product's [brand](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md). You'll create a widget that is injected into a pre-defined zone in the page, and in the widget you'll retrieve the product's brand from the server and display it. + +### Prerequisites + +- [Brands linked to products](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md) + +## 1. Initialize JS SDK + +In your custom widget, you'll retrieve the product's brand by sending a request to the Medusa server. Medusa has a [JS SDK](https://docs.medusajs.com/resources/js-sdk/index.html.md) that simplifies sending requests to the server's API routes. + +So, you'll start by configuring the JS SDK. Create the file `src/admin/lib/sdk.ts` with the following content: + +![The directory structure of the Medusa application after adding the file](https://res.cloudinary.com/dza7lstvk/image/upload/v1733414606/Medusa%20Book/brands-admin-dir-overview-1_jleg0t.jpg) + +```ts title="src/admin/lib/sdk.ts" +import Medusa from "@medusajs/js-sdk" + +export const sdk = new Medusa({ + baseUrl: import.meta.env.VITE_BACKEND_URL || "/", + debug: import.meta.env.DEV, + auth: { + type: "session", + }, +}) +``` + +You initialize the SDK passing it the following options: + +- `baseUrl`: The URL to the Medusa server. +- `debug`: Whether to enable logging debug messages. This should only be enabled in development. +- `auth.type`: The authentication method used in the client application, which is `session` in the Medusa Admin dashboard. + +Notice that you use `import.meta.env` to access environment variables in your customizations because the Medusa Admin is built on top of Vite. Learn more in [this chapter](https://docs.medusajs.com/learn/fundamentals/admin/environment-variables/index.html.md). + +You can now use the SDK to send requests to the Medusa server. + +Learn more about the JS SDK and its options in [this reference](https://docs.medusajs.com/resources/js-sdk/index.html.md). + +*** + +## 2. Add Widget to Product Details Page + +You'll now add a widget to the product-details page. A widget is a React component that's injected into pre-defined zones in the Medusa Admin dashboard. It's created in a `.tsx` file under the `src/admin/widgets` directory. + +Learn more about widgets in [this documentation](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md). + +To create a widget that shows a product's brand in its details page, create the file `src/admin/widgets/product-brand.tsx` with the following content: + +![Directory structure of the Medusa application after adding the widget](https://res.cloudinary.com/dza7lstvk/image/upload/v1733414684/Medusa%20Book/brands-admin-dir-overview-2_eq5xhi.jpg) + +```tsx title="src/admin/widgets/product-brand.tsx" highlights={highlights} +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { DetailWidgetProps, AdminProduct } from "@medusajs/framework/types" +import { clx, Container, Heading, Text } from "@medusajs/ui" +import { useQuery } from "@tanstack/react-query" +import { sdk } from "../lib/sdk" + +type AdminProductBrand = AdminProduct & { + brand?: { + id: string + name: string + } +} + +const ProductBrandWidget = ({ + data: product, +}: DetailWidgetProps) => { + const { data: queryResult } = useQuery({ + queryFn: () => sdk.admin.product.retrieve(product.id, { + fields: "+brand.*", + }), + queryKey: [["product", product.id]], + }) + const brandName = (queryResult?.product as AdminProductBrand)?.brand?.name + + return ( + +
+
+ Brand +
+
+
+ + Name + + + + {brandName || "-"} + +
+
+ ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductBrandWidget +``` + +A widget's file must export: + +- A React component to be rendered in the specified injection zone. The component must be the file's default export. +- A configuration object created with `defineWidgetConfig` from the Admin Extension SDK. The function receives an object as a parameter that has a `zone` property, whose value is the zone to inject the widget to. + +Since the widget is injected at the top of the product details page, the widget receives the product's details as a parameter. + +In the widget, you use [Tanstack (React) Query](https://tanstack.com/query/latest) to query the Medusa server. Tanstack Query provides features like asynchronous state management and optimized caching. In the `queryFn` function that executes the query, you use the JS SDK to send a request to the [Get Product API Route](https://docs.medusajs.com/api/admin#products_getproductsid), passing `+brand.*` in the `fields` query parameter to retrieve the product's brand. + +Do not install Tanstack Query as that will cause unexpected errors in your development. If you prefer installing it for better auto-completion in your code editor, make sure to install `v5.64.2` as a development dependency. + +You then render a section that shows the brand's name. In admin customizations, use components from the [Medusa UI package](https://docs.medusajs.com/ui/index.html.md) to maintain a consistent user interface and design in the dashboard. + +*** + +## Test it Out + +To test out your widget, start the Medusa application: + +```bash npm2yarn +npm run dev +``` + +Then, open the admin dashboard at `http://localhost:9000/app`. After you log in, open the page of a product that has a brand. You'll see a new section at the top showing the brand's name. + +![The widget is added as the first section of the product details page.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733414415/Medusa%20Book/Screenshot_2024-12-05_at_5.59.25_PM_y85m14.png) + +*** + +## Admin Components Guides + +When building your widget, you may need more complicated components. For example, you may add a form to the above widget to set the product's brand. + +The [Admin Components guides](https://docs.medusajs.com/resources/admin-components/index.html.md) show you how to build and use common components in the Medusa Admin, such as forms, tables, JSON data viewer, and more. The components in the guides also follow the Medusa Admin's design convention. + +*** + +## Next Chapter: Add UI Route for Brands + +In the next chapter, you'll add a UI route that displays the list of brands in your application and allows admin users. # Guide: Query Product's Brands @@ -4805,216 +4507,313 @@ info: API Key: "123" You can also automate syncing data from a third-party system to Medusa at a regular interval. In the next chapter, you'll learn how to sync brands from the third-party CMS to Medusa once a day. -# Guide: Extend Create Product Flow +# Guide: Schedule Syncing Brands from CMS -After linking the [custom Brand data model](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) and Medusa's [Product Module](https://docs.medusajs.com/resources/commerce-modules/product/index.html.md) in the [previous chapter](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md), you'll extend the create product workflow and API route to allow associating a brand with a product. +In the previous chapters, you've [integrated a third-party CMS](https://docs.medusajs.com/learn/customization/integrate-systems/service/index.html.md) and implemented the logic to [sync created brands](https://docs.medusajs.com/learn/customization/integrate-systems/handle-event/index.html.md) from Medusa to the CMS. -Some API routes, including the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts), accept an `additional_data` request body parameter. This parameter can hold custom data that's passed to the [hooks](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md) of the workflow executed in the API route, allowing you to consume those hooks and perform actions with the custom data. +However, when you integrate a third-party system, you want the data to be in sync between the Medusa application and the system. One way to do so is by automatically syncing the data once a day. -So, in this chapter, to extend the create product flow and associate a brand with a product, you will: +You can create an action to be automatically executed at a specified interval using scheduled jobs. A scheduled job is an asynchronous function with a specified schedule of when the Medusa application should run it. Scheduled jobs are useful to automate repeated tasks. -- Consume the [productsCreated](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow#productsCreated/index.html.md) hook of the [createProductsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md), which is executed within the workflow after the product is created. You'll link the product with the brand passed in the `additional_data` parameter. -- Extend the Create Product API route to allow passing a brand ID in `additional_data`. +Learn more about scheduled jobs in [this chapter](https://docs.medusajs.com/learn/fundamentals/scheduled-jobs/index.html.md). -To learn more about the `additional_data` property and the API routes that accept additional data, refer to [this chapter](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md). +In this chapter, you'll create a scheduled job that triggers syncing the brands from the third-party CMS to Medusa once a day. You'll implement the syncing logic in a workflow, and execute that workflow in the scheduled job. ### Prerequisites -- [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md) -- [Defined link between the Brand and Product data models.](https://docs.medusajs.com/learn/customization/extend-features/define-link/index.html.md) +- [CMS Module](https://docs.medusajs.com/learn/customization/integrate-systems/service/index.html.md) *** -## 1. Consume the productsCreated Hook +## 1. Implement Syncing Workflow -A workflow hook is a point in a workflow where you can inject a step to perform a custom functionality. Consuming a workflow hook allows you to extend the features of a workflow and, consequently, the API route that uses it. +You'll start by implementing the syncing logic in a workflow, then execute the workflow later in the scheduled job. -Learn more about the workflow hooks in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/workflow-hooks/index.html.md). +Workflows have a built-in durable execution engine that helps you complete tasks spanning multiple systems. Also, their rollback mechanism ensures that data is consistent across systems even when errors occur during execution. -The [createProductsWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md) used in the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts) has a `productsCreated` hook that runs after the product is created. You'll consume this hook to link the created product with the brand specified in the request parameters. +Learn more about workflows in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md). -To consume the `productsCreated` hook, create the file `src/workflows/hooks/created-product.ts` with the following content: +This workflow will have three steps: -![Directory structure after creating the hook's file.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733384338/Medusa%20Book/brands-hook-dir-overview_ltwr5h.jpg) +1. `retrieveBrandsFromCmsStep` to retrieve the brands from the CMS. +2. `createBrandsStep` to create the brands retrieved in the first step that don't exist in Medusa. +3. `updateBrandsStep` to update the brands retrieved in the first step that exist in Medusa. -```ts title="src/workflows/hooks/created-product.ts" highlights={hook1Highlights} -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" -import { StepResponse } from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" -import { LinkDefinition } from "@medusajs/framework/types" -import { BRAND_MODULE } from "../../modules/brand" -import BrandModuleService from "../../modules/brand/service" +### retrieveBrandsFromCmsStep -createProductsWorkflow.hooks.productsCreated( - (async ({ products, additional_data }, { container }) => { - if (!additional_data?.brand_id) { - return new StepResponse([], []) +To create the step that retrieves the brands from the third-party CMS, create the file `src/workflows/sync-brands-from-cms.ts` with the following content: + +![Directory structure of the Medusa application after creating the file.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733494196/Medusa%20Book/cms-dir-overview-6_z1omsi.jpg) + +```ts title="src/workflows/sync-brands-from-cms.ts" collapsibleLines="1-7" expandButtonLabel="Show Imports" +import { + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import CmsModuleService from "../modules/cms/service" +import { CMS_MODULE } from "../modules/cms" + +const retrieveBrandsFromCmsStep = createStep( + "retrieve-brands-from-cms", + async (_, { container }) => { + const cmsModuleService: CmsModuleService = container.resolve( + CMS_MODULE + ) + + const brands = await cmsModuleService.retrieveBrands() + + return new StepResponse(brands) + } +) +``` + +You create a `retrieveBrandsFromCmsStep` that resolves the CMS Module's service and uses its `retrieveBrands` method to retrieve the brands in the CMS. You return those brands in the step's response. + +### createBrandsStep + +The brands retrieved in the first step may have brands that don't exist in Medusa. So, you'll create a step that creates those brands. Add the step to the same `src/workflows/sync-brands-from-cms.ts` file: + +```ts title="src/workflows/sync-brands-from-cms.ts" highlights={createBrandsHighlights} collapsibleLines="1-8" expandButtonLabel="Show Imports" +// other imports... +import BrandModuleService from "../modules/brand/service" +import { BRAND_MODULE } from "../modules/brand" + +// ... + +type CreateBrand = { + name: string +} + +type CreateBrandsInput = { + brands: CreateBrand[] +} + +export const createBrandsStep = createStep( + "create-brands-step", + async (input: CreateBrandsInput, { container }) => { + const brandModuleService: BrandModuleService = container.resolve( + BRAND_MODULE + ) + + const brands = await brandModuleService.createBrands(input.brands) + + return new StepResponse(brands, brands) + }, + async (brands, { container }) => { + if (!brands) { + return } const brandModuleService: BrandModuleService = container.resolve( BRAND_MODULE ) - // if the brand doesn't exist, an error is thrown. - await brandModuleService.retrieveBrand(additional_data.brand_id as string) - // TODO link brand to product - }) + await brandModuleService.deleteBrands(brands.map((brand) => brand.id)) + } ) ``` -Workflows have a special `hooks` property to access its hooks and consume them. Each hook, such as `productsCreated`, accepts a step function as a parameter. The step function accepts the following parameters: +The `createBrandsStep` accepts the brands to create as an input. It resolves the [Brand Module](https://docs.medusajs.com/learn/customization/custom-features/module/index.html.md)'s service and uses the generated `createBrands` method to create the brands. -1. An object having an `additional_data` property, which is the custom data passed in the request body under `additional_data`. The object will also have properties passed from the workflow to the hook, which in this case is the `products` property that holds an array of the created products. -2. An object of properties related to the step's context. It has a `container` property whose value is the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) to resolve framework and commerce tools. +The step passes the created brands to the compensation function, which deletes those brands if an error occurs during the workflow's execution. -In the step, if a brand ID is passed in `additional_data`, you resolve the Brand Module's service and use its generated `retrieveBrand` method to retrieve the brand by its ID. The `retrieveBrand` method will throw an error if the brand doesn't exist. +Learn more about compensation functions in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/compensation-function/index.html.md). -### Link Brand to Product +### Update Brands Step -Next, you want to create a link between the created products and the brand. To do so, you use Link, which is a class from the Modules SDK that provides methods to manage linked records. +The brands retrieved in the first step may also have brands that exist in Medusa. So, you'll create a step that updates their details to match that of the CMS. Add the step to the same `src/workflows/sync-brands-from-cms.ts` file: -Learn more about Link in [this chapter](https://docs.medusajs.com/learn/fundamentals/module-links/link/index.html.md). +```ts title="src/workflows/sync-brands-from-cms.ts" highlights={updateBrandsHighlights} +// ... -To use Link in the `productsCreated` hook, replace the `TODO` with the following: - -```ts title="src/workflows/hooks/created-product.ts" highlights={hook2Highlights} -const link = container.resolve("link") -const logger = container.resolve("logger") - -const links: LinkDefinition[] = [] - -for (const product of products) { - links.push({ - [Modules.PRODUCT]: { - product_id: product.id, - }, - [BRAND_MODULE]: { - brand_id: additional_data.brand_id, - }, - }) +type UpdateBrand = { + id: string + name: string } -await link.create(links) +type UpdateBrandsInput = { + brands: UpdateBrand[] +} -logger.info("Linked brand to products") +export const updateBrandsStep = createStep( + "update-brands-step", + async ({ brands }: UpdateBrandsInput, { container }) => { + const brandModuleService: BrandModuleService = container.resolve( + BRAND_MODULE + ) -return new StepResponse(links, links) -``` + const prevUpdatedBrands = await brandModuleService.listBrands({ + id: brands.map((brand) => brand.id), + }) -You resolve Link from the container. Then you loop over the created products to assemble an array of links to be created. After that, you pass the array of links to Link's `create` method, which will link the product and brand records. + const updatedBrands = await brandModuleService.updateBrands(brands) -Each property in the link object is the name of a module, and its value is an object having a `{model_name}_id` property, where `{model_name}` is the snake-case name of the module's data model. Its value is the ID of the record to be linked. The link object's properties must be set in the same order as the link configurations passed to `defineLink`. - -![Diagram showcasing how the order of defining a link affects creating the link](https://res.cloudinary.com/dza7lstvk/image/upload/v1733386156/Medusa%20Book/remote-link-brand-product-exp_fhjmg4.jpg) - -Finally, you return an instance of `StepResponse` returning the created links. - -### Dismiss Links in Compensation - -You can pass as a second parameter of the hook a compensation function that undoes what the step did. It receives as a first parameter the returned `StepResponse`'s second parameter, and the step context object as a second parameter. - -To undo creating the links in the hook, pass the following compensation function as a second parameter to `productsCreated`: - -```ts title="src/workflows/hooks/created-product.ts" -createProductsWorkflow.hooks.productsCreated( - // ... - (async (links, { container }) => { - if (!links?.length) { + return new StepResponse(updatedBrands, prevUpdatedBrands) + }, + async (prevUpdatedBrands, { container }) => { + if (!prevUpdatedBrands) { return } - const link = container.resolve("link") + const brandModuleService: BrandModuleService = container.resolve( + BRAND_MODULE + ) - await link.dismiss(links) - }) + await brandModuleService.updateBrands(prevUpdatedBrands) + } ) ``` -In the compensation function, if the `links` parameter isn't empty, you resolve Link from the container and use its `dismiss` method. This method removes a link between two records. It accepts the same parameter as the `create` method. +The `updateBrandsStep` receives the brands to update in Medusa. In the step, you retrieve the brand's details in Medusa before the update to pass them to the compensation function. You then update the brands using the Brand Module's `updateBrands` generated method. -*** +In the compensation function, which receives the brand's old data, you revert the update using the same `updateBrands` method. -## 2. Configure Additional Data Validation +### Create Workflow -Now that you've consumed the `productsCreated` hook, you want to configure the `/admin/products` API route that creates a new product to accept a brand ID in its `additional_data` parameter. +Finally, you'll create the workflow that uses the above steps to sync the brands from the CMS to Medusa. Add to the same `src/workflows/sync-brands-from-cms.ts` file the following: -You configure the properties accepted in `additional_data` in the `src/api/middlewares.ts` that exports middleware configurations. So, create the file (or, if already existing, add to the file) `src/api/middlewares.ts` the following content: - -![Directory structure after adding the middelwares file](https://res.cloudinary.com/dza7lstvk/image/upload/v1733386868/Medusa%20Book/brands-middleware-dir-overview_uczos1.jpg) - -```ts title="src/api/middlewares.ts" -import { defineMiddlewares } from "@medusajs/framework/http" -import { z } from "zod" +```ts title="src/workflows/sync-brands-from-cms.ts" +// other imports... +import { + // ... + createWorkflow, + transform, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" // ... -export default defineMiddlewares({ - routes: [ - // ... - { - matcher: "/admin/products", - method: ["POST"], - additionalDataValidator: { - brand_id: z.string().optional(), - }, - }, - ], +export const syncBrandsFromCmsWorkflow = createWorkflow( + "sync-brands-from-system", + () => { + const brands = retrieveBrandsFromCmsStep() + + // TODO create and update brands + } +) +``` + +In the workflow, you only use the `retrieveBrandsFromCmsStep` for now, which retrieves the brands from the third-party CMS. + +Next, you need to identify which brands must be created or updated. Since workflows are constructed internally and are only evaluated during execution, you can't access values to perform data manipulation directly. Instead, use [transform](https://docs.medusajs.com/learn/fundamentals/workflows/variable-manipulation/index.html.md) from the Workflows SDK that gives you access to the real-time values of the data, allowing you to create new variables using those values. + +Learn more about data manipulation using `transform` in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/variable-manipulation/index.html.md). + +So, replace the `TODO` with the following: + +```ts title="src/workflows/sync-brands-from-cms.ts" +const { toCreate, toUpdate } = transform( + { + brands, + }, + (data) => { + const toCreate: CreateBrand[] = [] + const toUpdate: UpdateBrand[] = [] + + data.brands.forEach((brand) => { + if (brand.external_id) { + toUpdate.push({ + id: brand.external_id as string, + name: brand.name as string, + }) + } else { + toCreate.push({ + name: brand.name as string, + }) + } + }) + + return { toCreate, toUpdate } + } +) + +// TODO create and update the brands +``` + +`transform` accepts two parameters: + +1. The data to be passed to the function in the second parameter. +2. A function to execute only when the workflow is executed. Its return value can be consumed by the rest of the workflow. + +In `transform`'s function, you loop over the brands array to check which should be created or updated. This logic assumes that a brand in the CMS has an `external_id` property whose value is the brand's ID in Medusa. + +You now have the list of brands to create and update. So, replace the new `TODO` with the following: + +```ts title="src/workflows/sync-brands-from-cms.ts" +const created = createBrandsStep({ brands: toCreate }) +const updated = updateBrandsStep({ brands: toUpdate }) + +return new WorkflowResponse({ + created, + updated, }) ``` -Objects in `routes` accept an `additionalDataValidator` property that configures the validation rules for custom properties passed in the `additional_data` request parameter. It accepts an object whose keys are custom property names, and their values are validation rules created using [Zod](https://zod.dev/). +You first run the `createBrandsStep` to create the brands that don't exist in Medusa, then the `updateBrandsStep` to update the brands that exist in Medusa. You pass the arrays returned by `transform` as the inputs for the steps. -So, `POST` requests sent to `/admin/products` can now pass the ID of a brand in the `brand_id` property of `additional_data`. +Finally, you return an object of the created and updated brands. You'll execute this workflow in the scheduled job next. + +*** + +## 2. Schedule Syncing Task + +You now have the workflow to sync the brands from the CMS to Medusa. Next, you'll create a scheduled job that runs this workflow once a day to ensure the data between Medusa and the CMS are always in sync. + +A scheduled job is created in a TypeScript or JavaScript file under the `src/jobs` directory. So, create the file `src/jobs/sync-brands-from-cms.ts` with the following content: + +![Directory structure of the Medusa application after adding the scheduled job](https://res.cloudinary.com/dza7lstvk/image/upload/v1733494592/Medusa%20Book/cms-dir-overview-7_dkjb9s.jpg) + +```ts title="src/jobs/sync-brands-from-cms.ts" +import { MedusaContainer } from "@medusajs/framework/types" +import { syncBrandsFromCmsWorkflow } from "../workflows/sync-brands-from-cms" + +export default async function (container: MedusaContainer) { + const logger = container.resolve("logger") + + const { result } = await syncBrandsFromCmsWorkflow(container).run() + + logger.info( + `Synced brands from third-party system: ${ + result.created.length + } brands created and ${result.updated.length} brands updated.`) +} + +export const config = { + name: "sync-brands-from-system", + schedule: "0 0 * * *", // change to * * * * * for debugging +} +``` + +A scheduled job file must export: + +- An asynchronous function that will be executed at the specified schedule. This function must be the file's default export. +- An object of scheduled jobs configuration. It has two properties: + - `name`: A unique name for the scheduled job. + - `schedule`: A string that holds a [cron expression](https://crontab.guru/) indicating the schedule to run the job. + +The scheduled job function accepts as a parameter the [Medusa container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md) used to resolve framework and commerce tools. You then execute the `syncBrandsFromCmsWorkflow` and use its result to log how many brands were created or updated. + +Based on the cron expression specified in `config.schedule`, Medusa will run the scheduled job every day at midnight. You can also change it to `* * * * *` to run it every minute for easier debugging. *** ## Test it Out -To test it out, first, retrieve the authentication token of your admin user by sending a `POST` request to `/auth/user/emailpass`: +To test out the scheduled job, start the Medusa application: -```bash -curl -X POST 'http://localhost:9000/auth/user/emailpass' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "email": "admin@medusa-test.com", - "password": "supersecret" -}' +```bash npm2yarn +npm run dev ``` -Make sure to replace the email and password in the request body with your user's credentials. - -Then, send a `POST` request to `/admin/products` to create a product, and pass in the `additional_data` parameter a brand's ID: - -```bash -curl -X POST 'http://localhost:9000/admin/products' \ --H 'Content-Type: application/json' \ --H 'Authorization: Bearer {token}' \ ---data '{ - "title": "Product 1", - "options": [ - { - "title": "Default option", - "values": ["Default option value"] - } - ], - "shipping_profile_id": "{shipping_profile_id}", - "additional_data": { - "brand_id": "{brand_id}" - } -}' -``` - -Make sure to replace `{token}` with the token you received from the previous request, `shipping_profile_id` with the ID of a shipping profile in your application, and `{brand_id}` with the ID of a brand in your application. You can retrieve the ID of a shipping profile either from the Medusa Admin, or the [List Shipping Profiles API route](https://docs.medusajs.com/api/admin#shipping-profiles_getshippingprofiles). - -The request creates a product and returns it. - -In the Medusa application's logs, you'll find the message `Linked brand to products`, indicating that the workflow hook handler ran and linked the brand to the products. +If you set the schedule to `* * * * *` for debugging, the scheduled job will run in a minute. You'll see in the logs how many brands were created or updated. *** -## Next Steps: Query Linked Brands and Products +## Summary -Now that you've extending the create-product flow to link a brand to it, you want to retrieve the brand details of a product. You'll learn how to do so in the next chapter. +By following the previous chapters, you utilized Medusa's framework and orchestration tools to perform and automate tasks that span across systems. + +With Medusa, you can integrate any service from your commerce ecosystem with ease. You don't have to set up separate applications to manage your different customizations, or worry about data inconsistency across systems. Your efforts only go into implementing the business logic that ties your systems together. # Guide: Integrate CMS Brand System @@ -5176,192 +4975,205 @@ You can now use the CMS Module's service to perform actions on the third-party C In the next chapter, you'll learn how to emit an event when a brand is created, then handle that event to sync the brand from Medusa to the third-party service. -# Seed Data with Custom CLI Script +# Write Tests for Modules -In this chapter, you'll learn how to seed data using a custom CLI script. +In this chapter, you'll learn about `moduleIntegrationTestRunner` from Medusa's Testing Framework and how to use it to write integration tests for a module's main service. -## How to Seed Data +### Prerequisites -To seed dummy data for development or demo purposes, use a custom CLI script. +- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) -In the CLI script, use your custom workflows or Medusa's existing workflows, which you can browse in [this reference](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md), to seed data. +## moduleIntegrationTestRunner Utility -### Example: Seed Dummy Products +`moduleIntegrationTestRunner` creates integration tests for a module. The integration tests run on a test Medusa application with only the specified module enabled. -In this section, you'll follow an example of creating a custom CLI script that seeds fifty dummy products. +For example, assuming you have a `hello` module, create a test file at `src/modules/hello/__tests__/service.spec.ts`: -First, install the [Faker](https://fakerjs.dev/) library to generate random data in your script: +```ts title="src/modules/hello/__tests__/service.spec.ts" +import { moduleIntegrationTestRunner } from "@medusajs/test-utils" +import { HELLO_MODULE } from ".." +import HelloModuleService from "../service" +import MyCustom from "../models/my-custom" + +moduleIntegrationTestRunner({ + moduleName: HELLO_MODULE, + moduleModels: [MyCustom], + resolve: "./src/modules/hello", + testSuite: ({ service }) => { + // TODO write tests + }, +}) + +jest.setTimeout(60 * 1000) +``` + +The `moduleIntegrationTestRunner` function accepts as a parameter an object with the following properties: + +- `moduleName`: The name of the module. +- `moduleModels`: An array of models in the module. Refer to [this section](#write-tests-for-modules-without-data-models) if your module doesn't have data models. +- `resolve`: The path to the model. +- `testSuite`: A function that defines the tests to run. + +The `testSuite` function accepts as a parameter an object having the `service` property, which is an instance of the module's main service. + +The type argument provided to the `moduleIntegrationTestRunner` function is used as the type of the `service` property. + +The tests in the `testSuite` function are written using [Jest](https://jestjs.io/). + +*** + +## Run Tests + +Run the following command to run your module integration tests: ```bash npm2yarn -npm install --save-dev @faker-js/faker +npm run test:integration:modules ``` -Then, create the file `src/scripts/demo-products.ts` with the following content: +If you don't have a `test:integration:modules` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). -```ts title="src/scripts/demo-products.ts" highlights={highlights} collapsibleLines="1-12" expandButtonLabel="Show Imports" -import { ExecArgs } from "@medusajs/framework/types" -import { faker } from "@faker-js/faker" -import { - ContainerRegistrationKeys, - Modules, - ProductStatus, -} from "@medusajs/framework/utils" -import { - createInventoryLevelsWorkflow, - createProductsWorkflow, -} from "@medusajs/medusa/core-flows" +This runs your Medusa application and runs the tests available in any `__tests__` directory under the `src/modules` directory. -export default async function seedDummyProducts({ - container, -}: ExecArgs) { - const salesChannelModuleService = container.resolve( - Modules.SALES_CHANNEL - ) - const logger = container.resolve( - ContainerRegistrationKeys.LOGGER - ) - const query = container.resolve( - ContainerRegistrationKeys.QUERY - ) +*** - const defaultSalesChannel = await salesChannelModuleService - .listSalesChannels({ - name: "Default Sales Channel", - }) +## Pass Module Options - const sizeOptions = ["S", "M", "L", "XL"] - const colorOptions = ["Black", "White"] - const currency_code = "eur" - const productsNum = 50 +If your module accepts options, you can set them using the `moduleOptions` property of the `moduleIntegrationTestRunner`'s parameter. - // TODO seed products -} +For example: + +```ts +import { moduleIntegrationTestRunner } from "@medusajs/test-utils" +import HelloModuleService from "../service" + +moduleIntegrationTestRunner({ + moduleOptions: { + apiKey: "123", + }, + // ... +}) ``` -So far, in the script, you: +*** -- Resolve the Sales Channel Module's main service to retrieve the application's default sales channel. This is the sales channel the dummy products will be available in. -- Resolve the Logger to log messages in the terminal, and Query to later retrieve data useful for the seeded products. -- Initialize some default data to use when seeding the products next. +## Write Tests for Modules without Data Models -Next, replace the `TODO` with the following: +If your module doesn't have a data model, pass a dummy model in the `moduleModels` property. -```ts title="src/scripts/demo-products.ts" -const productsData = new Array(productsNum).fill(0).map((_, index) => { - const title = faker.commerce.product() + "_" + index - return { - title, - is_giftcard: true, - description: faker.commerce.productDescription(), - status: ProductStatus.PUBLISHED, - options: [ - { - title: "Size", - values: sizeOptions, - }, - { - title: "Color", - values: colorOptions, - }, - ], - images: [ - { - url: faker.image.urlPlaceholder({ - text: title, - }), - }, - { - url: faker.image.urlPlaceholder({ - text: title, - }), - }, - ], - variants: new Array(10).fill(0).map((_, variantIndex) => ({ - title: `${title} ${variantIndex}`, - sku: `variant-${variantIndex}${index}`, - prices: new Array(10).fill(0).map((_, priceIndex) => ({ - currency_code, - amount: 10 * priceIndex, - })), - options: { - Size: sizeOptions[Math.floor(Math.random() * 3)], - }, - })), - shipping_profile_id: "sp_123", - sales_channels: [ - { - id: defaultSalesChannel[0].id, - }, - ], - } +For example: + +```ts +import { moduleIntegrationTestRunner } from "@medusajs/test-utils" +import HelloModuleService from "../service" +import { model } from "@medusajs/framework/utils" + +const DummyModel = model.define("dummy_model", { + id: model.id().primaryKey(), }) -// TODO seed products +moduleIntegrationTestRunner({ + moduleModels: [DummyModel], + // ... +}) + +jest.setTimeout(60 * 1000) ``` -You generate fifty products using the sales channel and variables you initialized, and using Faker for random data, such as the product's title or images. +*** -Then, replace the new `TODO` with the following: +### Other Options and Inputs -```ts title="src/scripts/demo-products.ts" -const { result: products } = await createProductsWorkflow(container).run({ - input: { - products: productsData, +Refer to [this reference in the Development Resources documentation](https://docs.medusajs.com/resources/test-tools-reference/moduleIntegrationTestRunner/index.html.md) for other available parameter options and inputs of the `testSuite` function. + +*** + +## Database Used in Tests + +The `moduleIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end. + +To manage that database, such as changing its name or perform operations on it in your tests, refer to the [references in the Development Resources documentation](https://docs.medusajs.com/resources/test-tools-reference/moduleIntegrationTestRunner/index.html.md). + + +# Write Integration Tests + +In this chapter, you'll learn about `medusaIntegrationTestRunner` from Medusa's Testing Framework and how to use it to write integration tests. + +### Prerequisites + +- [Testing Tools Setup](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/index.html.md) + +## medusaIntegrationTestRunner Utility + +The `medusaIntegrationTestRunner` is from Medusa's Testing Framework and it's used to create integration tests in your Medusa project. It runs a full Medusa application, allowing you test API routes, workflows, or other customizations. + +For example: + +```ts title="integration-tests/http/test.spec.ts" highlights={highlights} +import { medusaIntegrationTestRunner } from "@medusajs/test-utils" + +medusaIntegrationTestRunner({ + testSuite: ({ api, getContainer }) => { + // TODO write tests... }, }) -logger.info(`Seeded ${products.length} products.`) - -// TODO add inventory levels +jest.setTimeout(60 * 1000) ``` -You create the generated products using the `createProductsWorkflow` imported previously from `@medusajs/medusa/core-flows`. It accepts the product data as input, and returns the created products. +The `medusaIntegrationTestRunner` function accepts an object as a parameter. The object has a required property `testSuite`. -Only thing left is to create inventory levels for the products. So, replace the last `TODO` with the following: +`testSuite`'s value is a function that defines the tests to run. The function accepts as a parameter an object that has the following properties: -```ts title="src/scripts/demo-products.ts" -logger.info("Seeding inventory levels.") +- `api`: a set of utility methods used to send requests to the Medusa application. It has the following methods: + - `get`: Send a `GET` request to an API route. + - `post`: Send a `POST` request to an API route. + - `delete`: Send a `DELETE` request to an API route. +- `getContainer`: a function that retrieves the Medusa Container. Use the `getContainer().resolve` method to resolve resources from the Medusa Container. -const { data: stockLocations } = await query.graph({ - entity: "stock_location", - fields: ["id"], -}) +The tests in the `testSuite` function are written using [Jest](https://jestjs.io/). -const { data: inventoryItems } = await query.graph({ - entity: "inventory_item", - fields: ["id"], -}) +### Jest Timeout -const inventoryLevels = inventoryItems.map((inventoryItem) => ({ - location_id: stockLocations[0].id, - stocked_quantity: 1000000, - inventory_item_id: inventoryItem.id, -})) +Since your tests connect to the database and perform actions that require more time than the typical tests, make sure to increase the timeout in your test: -await createInventoryLevelsWorkflow(container).run({ - input: { - inventory_levels: inventoryLevels, - }, -}) - -logger.info("Finished seeding inventory levels data.") +```ts title="integration-tests/http/test.spec.ts" +// in your test's file +jest.setTimeout(60 * 1000) ``` -You use Query to retrieve the stock location, to use the first location in the application, and the inventory items. +*** -Then, you generate inventory levels for each inventory item, associating it with the first stock location. +### Run Tests -Finally, you use the `createInventoryLevelsWorkflow` from Medusa's core workflows to create the inventory levels. +Run the following command to run your tests: -### Test Script - -To test out the script, run the following command in your project's directory: - -```bash -npx medusa exec ./src/scripts/demo-products.ts +```bash npm2yarn +npm run test:integration ``` -This seeds the products to your database. If you run your Medusa application and view the products in the dashboard, you'll find fifty new products. +If you don't have a `test:integration` script in `package.json`, refer to the [Medusa Testing Tools chapter](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools#add-test-commands/index.html.md). + +This runs your Medusa application and runs the tests available under the `src/integrations/http` directory. + +*** + +## Other Options and Inputs + +Refer to [this reference in the Development Resources documentation](https://docs.medusajs.com/resources/test-tools-reference/medusaIntegrationTestRunner/index.html.md) for other available parameter options and inputs of the `testSuite` function. + +*** + +## Database Used in Tests + +The `medusaIntegrationTestRunner` function creates a database with a random name before running the tests. Then, it drops that database after all the tests end. + +To manage that database, such as changing its name or perform operations on it in your tests, refer to the [references in the Development Resources documentation](https://docs.medusajs.com/resources/test-tools-reference/medusaIntegrationTestRunner/index.html.md). + +*** + +## Example Integration Tests + +The next chapters provide examples of writing integration tests for API routes and workflows. # Admin Development Constraints @@ -5540,6 +5352,75 @@ The Medusa Admin dashboard can be displayed in languages other than English, whi Learn how to add a new language translation for the Medusa Admin in [this guide](https://docs.medusajs.com/learn/resources/contribution-guidelines/admin-translations/index.html.md). +# Environment Variables in Admin Customizations + +In this chapter, you'll learn how to use environment variables in your admin customizations. + +To learn how envirnment variables are generally loaded in Medusa based on your application's environment, check out [this chapter](https://docs.medusajs.com/learn/fundamentals/environment-variables/index.html.md). + +## How to Set Environment Variables + +The Medusa Admin is built on top of [Vite](https://vite.dev/). To set an environment variable that you want to use in a widget or UI route, prefix the environment variable with `VITE_`. + +For example: + +```plain +VITE_MY_API_KEY=sk_123 +``` + +*** + +## How to Use Environment Variables + +To access or use an environment variable starting with `VITE_`, use the `import.meta.env` object. + +For example: + +```tsx highlights={[["8"]]} +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Container, Heading } from "@medusajs/ui" + +const ProductWidget = () => { + return ( + +
+ API Key: {import.meta.env.VITE_MY_API_KEY} +
+
+ ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + +In this example, you display the API key in a widget using `import.meta.env.VITE_MY_API_KEY`. + +### Type Error on import.meta.env + +If you receive a type error on `import.meta.env`, create the file `src/admin/vite-env.d.ts` with the following content: + +```ts title="src/admin/vite-env.d.ts" +/// +``` + +This file tells TypeScript to recognize the `import.meta.env` object and enhances the types of your custom environment variables. + +*** + +## Check Node Environment in Admin Customizations + +To check the current environment, Vite exposes two variables: + +- `import.meta.env.DEV`: Returns `true` if the current environment is development. +- `import.meta.env.PROD`: Returns `true` if the current environment is production. + +Learn more about other Vite environment variables in the [Vite documentation](https://vite.dev/guide/env-and-mode). + + # Admin Routing Customizations The Medusa Admin dashboard uses [React Router](https://reactrouter.com) under the hood to manage routing. So, you can have more flexibility in routing-related customizations using some of React Router's utilities, hooks, and components. @@ -5693,75 +5574,6 @@ export const handle = { Refer to [react-router-dom’s documentation](https://reactrouter.com/en/6.29.0) for components and hooks that you can use in your admin customizations. -# Environment Variables in Admin Customizations - -In this chapter, you'll learn how to use environment variables in your admin customizations. - -To learn how envirnment variables are generally loaded in Medusa based on your application's environment, check out [this chapter](https://docs.medusajs.com/learn/fundamentals/environment-variables/index.html.md). - -## How to Set Environment Variables - -The Medusa Admin is built on top of [Vite](https://vite.dev/). To set an environment variable that you want to use in a widget or UI route, prefix the environment variable with `VITE_`. - -For example: - -```plain -VITE_MY_API_KEY=sk_123 -``` - -*** - -## How to Use Environment Variables - -To access or use an environment variable starting with `VITE_`, use the `import.meta.env` object. - -For example: - -```tsx highlights={[["8"]]} -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Container, Heading } from "@medusajs/ui" - -const ProductWidget = () => { - return ( - -
- API Key: {import.meta.env.VITE_MY_API_KEY} -
-
- ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - -In this example, you display the API key in a widget using `import.meta.env.VITE_MY_API_KEY`. - -### Type Error on import.meta.env - -If you receive a type error on `import.meta.env`, create the file `src/admin/vite-env.d.ts` with the following content: - -```ts title="src/admin/vite-env.d.ts" -/// -``` - -This file tells TypeScript to recognize the `import.meta.env` object and enhances the types of your custom environment variables. - -*** - -## Check Node Environment in Admin Customizations - -To check the current environment, Vite exposes two variables: - -- `import.meta.env.DEV`: Returns `true` if the current environment is development. -- `import.meta.env.PROD`: Returns `true` if the current environment is production. - -Learn more about other Vite environment variables in the [Vite documentation](https://vite.dev/guide/env-and-mode). - - # Admin UI Routes In this chapter, you’ll learn how to create a UI route in the admin dashboard. @@ -6117,113 +5929,6 @@ Refer to [this reference](https://docs.medusajs.com/resources/admin-widget-injec To build admin customizations that match the Medusa Admin's designs and layouts, refer to [this guide](https://docs.medusajs.com/resources/admin-components/index.html.md) to find common components. -# Throwing and Handling Errors - -In this guide, you'll learn how to throw errors in your Medusa application, how it affects an API route's response, and how to change the default error handler of your Medusa application. - -## Throw MedusaError - -When throwing an error in your API routes, middlewares, workflows, or any customization, throw a `MedusaError` from the Medusa Framework. - -The Medusa application's API route error handler then wraps your thrown error in a uniform object and returns it in the response. - -For example: - -```ts -import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" -import { MedusaError } from "@medusajs/framework/utils" - -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - if (!req.query.q) { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - "The `q` query parameter is required." - ) - } - - // ... -} -``` - -The `MedusaError` class accepts in its constructor two parameters: - -1. The first is the error's type. `MedusaError` has a static property `Types` that you can use. `Types` is an enum whose possible values are explained in the next section. -2. The second is the message to show in the error response. - -### Error Object in Response - -The error object returned in the response has two properties: - -- `type`: The error's type. -- `message`: The error message, if available. -- `code`: A common snake-case code. Its values can be: - - `invalid_request_error` for the `DUPLICATE_ERROR` type. - - `api_error`: for the `DB_ERROR` type. - - `invalid_state_error` for `CONFLICT` error type. - - `unknown_error` for any unidentified error type. - - For other error types, this property won't be available unless you provide a code as a third parameter to the `MedusaError` constructor. - -### MedusaError Types - -|Type|Description|Status Code| -|---|---|---|---|---| -|\`DB\_ERROR\`|Indicates a database error.|\`500\`| -|\`DUPLICATE\_ERROR\`|Indicates a duplicate of a record already exists. For example, when trying to create a customer whose email is registered by another customer.|\`422\`| -|\`INVALID\_ARGUMENT\`|Indicates an error that occurred due to incorrect arguments or other unexpected state.|\`500\`| -|\`INVALID\_DATA\`|Indicates a validation error.|\`400\`| -|\`UNAUTHORIZED\`|Indicates that a user is not authorized to perform an action or access a route.|\`401\`| -|\`NOT\_FOUND\`|Indicates that the requested resource, such as a route or a record, isn't found.|\`404\`| -|\`NOT\_ALLOWED\`|Indicates that an operation isn't allowed.|\`400\`| -|\`CONFLICT\`|Indicates that a request conflicts with another previous or ongoing request. The error message in this case is ignored for a default message.|\`409\`| -|\`PAYMENT\_AUTHORIZATION\_ERROR\`|Indicates an error has occurred while authorizing a payment.|\`422\`| -|Other error types|Any other error type results in an |\`500\`| - -*** - -## Override Error Handler - -The `defineMiddlewares` function used to apply middlewares on routes accepts an `errorHandler` in its object parameter. Use it to override the default error handler for API routes. - -This error handler will also be used for errors thrown in Medusa's API routes and resources. - -For example, create `src/api/middlewares.ts` with the following: - -```ts title="src/api/middlewares.ts" collapsibleLines="1-8" expandMoreLabel="Show Imports" -import { - defineMiddlewares, - MedusaNextFunction, - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { MedusaError } from "@medusajs/framework/utils" - -export default defineMiddlewares({ - errorHandler: ( - error: MedusaError | any, - req: MedusaRequest, - res: MedusaResponse, - next: MedusaNextFunction - ) => { - res.status(400).json({ - error: "Something happened.", - }) - }, -}) -``` - -The `errorHandler` property's value is a function that accepts four parameters: - -1. The error thrown. Its type can be `MedusaError` or any other thrown error type. -2. A request object of type `MedusaRequest`. -3. A response object of type `MedusaResponse`. -4. A function of type MedusaNextFunction that executes the next middleware in the stack. - -This example overrides Medusa's default error handler with a handler that always returns a `400` status code with the same message. - - # Pass Additional Data to Medusa's API Route In this chapter, you'll learn how to pass additional data in requests to Medusa's API Route. @@ -6535,6 +6240,113 @@ export default defineMiddlewares({ This retrieves the configurations exported from `medusa-config.ts` and applies the `storeCors` to routes starting with `/custom`. +# Throwing and Handling Errors + +In this guide, you'll learn how to throw errors in your Medusa application, how it affects an API route's response, and how to change the default error handler of your Medusa application. + +## Throw MedusaError + +When throwing an error in your API routes, middlewares, workflows, or any customization, throw a `MedusaError` from the Medusa Framework. + +The Medusa application's API route error handler then wraps your thrown error in a uniform object and returns it in the response. + +For example: + +```ts +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" +import { MedusaError } from "@medusajs/framework/utils" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + if (!req.query.q) { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + "The `q` query parameter is required." + ) + } + + // ... +} +``` + +The `MedusaError` class accepts in its constructor two parameters: + +1. The first is the error's type. `MedusaError` has a static property `Types` that you can use. `Types` is an enum whose possible values are explained in the next section. +2. The second is the message to show in the error response. + +### Error Object in Response + +The error object returned in the response has two properties: + +- `type`: The error's type. +- `message`: The error message, if available. +- `code`: A common snake-case code. Its values can be: + - `invalid_request_error` for the `DUPLICATE_ERROR` type. + - `api_error`: for the `DB_ERROR` type. + - `invalid_state_error` for `CONFLICT` error type. + - `unknown_error` for any unidentified error type. + - For other error types, this property won't be available unless you provide a code as a third parameter to the `MedusaError` constructor. + +### MedusaError Types + +|Type|Description|Status Code| +|---|---|---|---|---| +|\`DB\_ERROR\`|Indicates a database error.|\`500\`| +|\`DUPLICATE\_ERROR\`|Indicates a duplicate of a record already exists. For example, when trying to create a customer whose email is registered by another customer.|\`422\`| +|\`INVALID\_ARGUMENT\`|Indicates an error that occurred due to incorrect arguments or other unexpected state.|\`500\`| +|\`INVALID\_DATA\`|Indicates a validation error.|\`400\`| +|\`UNAUTHORIZED\`|Indicates that a user is not authorized to perform an action or access a route.|\`401\`| +|\`NOT\_FOUND\`|Indicates that the requested resource, such as a route or a record, isn't found.|\`404\`| +|\`NOT\_ALLOWED\`|Indicates that an operation isn't allowed.|\`400\`| +|\`CONFLICT\`|Indicates that a request conflicts with another previous or ongoing request. The error message in this case is ignored for a default message.|\`409\`| +|\`PAYMENT\_AUTHORIZATION\_ERROR\`|Indicates an error has occurred while authorizing a payment.|\`422\`| +|Other error types|Any other error type results in an |\`500\`| + +*** + +## Override Error Handler + +The `defineMiddlewares` function used to apply middlewares on routes accepts an `errorHandler` in its object parameter. Use it to override the default error handler for API routes. + +This error handler will also be used for errors thrown in Medusa's API routes and resources. + +For example, create `src/api/middlewares.ts` with the following: + +```ts title="src/api/middlewares.ts" collapsibleLines="1-8" expandMoreLabel="Show Imports" +import { + defineMiddlewares, + MedusaNextFunction, + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { MedusaError } from "@medusajs/framework/utils" + +export default defineMiddlewares({ + errorHandler: ( + error: MedusaError | any, + req: MedusaRequest, + res: MedusaResponse, + next: MedusaNextFunction + ) => { + res.status(400).json({ + error: "Something happened.", + }) + }, +}) +``` + +The `errorHandler` property's value is a function that accepts four parameters: + +1. The error thrown. Its type can be `MedusaError` or any other thrown error type. +2. A request object of type `MedusaRequest`. +3. A response object of type `MedusaResponse`. +4. A function of type MedusaNextFunction that executes the next middleware in the stack. + +This example overrides Medusa's default error handler with a handler that always returns a `400` status code with the same message. + + # HTTP Methods In this chapter, you'll learn about how to add new API routes for each HTTP method. @@ -6578,322 +6390,6 @@ This adds two API Routes: - A `POST` route at `http://localhost:9000/hello-world`. -# API Route Parameters - -In this chapter, you’ll learn about path, query, and request body parameters. - -## Path Parameters - -To create an API route that accepts a path parameter, create a directory within the route file's path whose name is of the format `[param]`. - -For example, to create an API Route at the path `/hello-world/:id`, where `:id` is a path parameter, create the file `src/api/hello-world/[id]/route.ts` with the following content: - -```ts title="src/api/hello-world/[id]/route.ts" highlights={singlePathHighlights} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: `[GET] Hello ${req.params.id}!`, - }) -} -``` - -The `MedusaRequest` object has a `params` property. `params` holds the path parameters in key-value pairs. - -### Multiple Path Parameters - -To create an API route that accepts multiple path parameters, create within the file's path multiple directories whose names are of the format `[param]`. - -For example, to create an API route at `/hello-world/:id/name/:name`, create the file `src/api/hello-world/[id]/name/[name]/route.ts` with the following content: - -```ts title="src/api/hello-world/[id]/name/[name]/route.ts" highlights={multiplePathHighlights} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: `[GET] Hello ${ - req.params.id - } - ${req.params.name}!`, - }) -} -``` - -You access the `id` and `name` path parameters using the `req.params` property. - -*** - -## Query Parameters - -You can access all query parameters in the `query` property of the `MedusaRequest` object. `query` is an object of key-value pairs, where the key is a query parameter's name, and the value is its value. - -For example: - -```ts title="src/api/hello-world/route.ts" highlights={queryHighlights} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: `Hello ${req.query.name}`, - }) -} -``` - -The value of `req.query.name` is the value passed in `?name=John`, for example. - -### Validate Query Parameters - -You can apply validation rules on received query parameters to ensure they match specified rules and types. - -Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/validation#how-to-validate-request-query-paramters/index.html.md). - -*** - -## Request Body Parameters - -The Medusa application parses the body of any request having a JSON, URL-encoded, or text request content types. The request body parameters are set in the `MedusaRequest`'s `body` property. - -Learn more about configuring body parsing in [this guide](https://docs.medusajs.com/learn/fundamentals/api-routes/parse-body/index.html.md). - -For example: - -```ts title="src/api/hello-world/route.ts" highlights={bodyHighlights} -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" - -type HelloWorldReq = { - name: string -} - -export const POST = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: `[POST] Hello ${req.body.name}!`, - }) -} -``` - -In this example, you use the `name` request body parameter to create the message in the returned response. - -The `MedusaRequest` type accepts a type argument that indicates the type of the request body. This is useful for auto-completion and to avoid typing errors. - -To test it out, send the following request to your Medusa application: - -```bash -curl -X POST 'http://localhost:9000/hello-world' \ --H 'Content-Type: application/json' \ ---data-raw '{ - "name": "John" -}' -``` - -This returns the following JSON object: - -```json -{ - "message": "[POST] Hello John!" -} -``` - -### Validate Body Parameters - -You can apply validation rules on received body parameters to ensure they match specified rules and types. - -Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/validation#how-to-validate-request-body/index.html.md). - - -# Configure Request Body Parser - -In this chapter, you'll learn how to configure the request body parser for your API routes. - -## Default Body Parser Configuration - -The Medusa application configures the body parser by default to parse JSON, URL-encoded, and text request content types. You can parse other data types by adding the relevant [Express middleware](https://expressjs.com/en/guide/using-middleware.html) or preserve the raw body data by configuring the body parser, which is useful for webhook requests. - -This chapter shares some examples of configuring the body parser for different data types or use cases. - -*** - -## Preserve Raw Body Data for Webhooks - -If your API route receives webhook requests, you might want to preserve the raw body data. To do this, you can configure the body parser to parse the raw body data and store it in the `req.rawBody` property. - -To do that, create the file `src/api/middlewares.ts` with the following content: - -```ts title="src/api/middlewares.ts" highlights={preserveHighlights} -import { defineMiddlewares } from "@medusajs/framework/http" - -export default defineMiddlewares({ - routes: [ - { - method: ["POST"], - bodyParser: { preserveRawBody: true }, - matcher: "/custom", - }, - ], -}) -``` - -The middleware route object passed to `routes` accepts a `bodyParser` property whose value is an object of configuration for the default body parser. By enabling the `preserveRawBody` property, the raw body data is preserved and stored in the `req.rawBody` property. - -Learn more about [middlewares](https://docs.medusajs.com/learn/fundamentals/api-routes/middlewares/index.html.md). - -You can then access the raw body data in your API route handler: - -```ts title="src/api/custom/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" - -export async function POST( - req: MedusaRequest, - res: MedusaResponse -) { - console.log(req.rawBody) - - // TODO use raw body -} -``` - -*** - -## Configure Request Body Size Limit - -By default, the body parser limits the request body size to `100kb`. If a request body exceeds that size, the Medusa application throws an error. - -You can configure the body parser to accept larger request bodies by setting the `sizeLimit` property of the `bodyParser` object in a middleware route object. For example: - -```ts title="src/api/middlewares.ts" highlights={sizeLimitHighlights} -import { defineMiddlewares } from "@medusajs/framework/http" - -export default defineMiddlewares({ - routes: [ - { - method: ["POST"], - bodyParser: { sizeLimit: "2mb" }, - matcher: "/custom", - }, - ], -}) -``` - -The `sizeLimit` property accepts one of the following types of values: - -- A string representing the size limit in bytes (For example, `100kb`, `2mb`, `5gb`). It is passed to the [bytes](https://www.npmjs.com/package/bytes) library to parse the size. -- A number representing the size limit in bytes. For example, `1024` for 1kb. - -*** - -## Configure File Uploads - -To accept file uploads in your API routes, you can configure the [Express Multer middleware](https://expressjs.com/en/resources/middleware/multer.html) on your route. - -The `multer` package is available through the `@medusajs/medusa` package, so you don't need to install it. However, for better typing support, install the `@types/multer` package as a development dependency: - -```bash npm2yarn -npm install --save-dev @types/multer -``` - -Then, to configure file upload for your route, create the file `src/api/middlewares.ts` with the following content: - -```ts title="src/api/middlewares.ts" highlights={uploadHighlights} -import { defineMiddlewares } from "@medusajs/framework/http" -import multer from "multer" - -const upload = multer({ storage: multer.memoryStorage() }) - -export default defineMiddlewares({ - routes: [ - { - method: ["POST"], - matcher: "/custom", - middlewares: [ - // @ts-ignore - upload.array("files"), - ], - }, - ], -}) -``` - -In the example above, you configure the `multer` middleware to store the uploaded files in memory. Then, you apply the `upload.array("files")` middleware to the route to accept file uploads. By using the `array` method, you accept multiple file uploads with the same `files` field name. - -You can then access the uploaded files in your API route handler: - -```ts title="src/api/custom/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" - -export async function POST( - req: MedusaRequest, - res: MedusaResponse -) { - const files = req.files as Express.Multer.File[] - - // TODO handle files -} -``` - -The uploaded files are stored in the `req.files` property as an array of Multer file objects that have properties like `filename` and `mimetype`. - -### Uploading Files using File Module Provider - -The recommended way to upload the files to storage using the configured [File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file/index.html.md) is to use the [uploadFilesWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/uploadFilesWorkflow/index.html.md): - -```ts title="src/api/custom/route.ts" -import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" -import { MedusaError } from "@medusajs/framework/utils" -import { uploadFilesWorkflow } from "@medusajs/medusa/core-flows" - -export async function POST( - req: MedusaRequest, - res: MedusaResponse -) { - const files = req.files as Express.Multer.File[] - - if (!files?.length) { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - "No files were uploaded" - ) - } - - const { result } = await uploadFilesWorkflow(req.scope).run({ - input: { - files: files?.map((f) => ({ - filename: f.originalname, - mimeType: f.mimetype, - content: f.buffer.toString("binary"), - access: "public", - })), - }, - }) - - res.status(200).json({ files: result }) -} -``` - -Check out the [uploadFilesWorkflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/uploadFilesWorkflow/index.html.md) for details on the expected input and output of the workflow. - - # Middlewares In this chapter, you’ll learn about middlewares and how to create them. @@ -7242,6 +6738,322 @@ A middleware can not override an existing middleware. Instead, middlewares are a For example, if you define a custom validation middleware, such as `validateAndTransformBody`, on an existing route, then both the original and the custom validation middleware will run. +# Configure Request Body Parser + +In this chapter, you'll learn how to configure the request body parser for your API routes. + +## Default Body Parser Configuration + +The Medusa application configures the body parser by default to parse JSON, URL-encoded, and text request content types. You can parse other data types by adding the relevant [Express middleware](https://expressjs.com/en/guide/using-middleware.html) or preserve the raw body data by configuring the body parser, which is useful for webhook requests. + +This chapter shares some examples of configuring the body parser for different data types or use cases. + +*** + +## Preserve Raw Body Data for Webhooks + +If your API route receives webhook requests, you might want to preserve the raw body data. To do this, you can configure the body parser to parse the raw body data and store it in the `req.rawBody` property. + +To do that, create the file `src/api/middlewares.ts` with the following content: + +```ts title="src/api/middlewares.ts" highlights={preserveHighlights} +import { defineMiddlewares } from "@medusajs/framework/http" + +export default defineMiddlewares({ + routes: [ + { + method: ["POST"], + bodyParser: { preserveRawBody: true }, + matcher: "/custom", + }, + ], +}) +``` + +The middleware route object passed to `routes` accepts a `bodyParser` property whose value is an object of configuration for the default body parser. By enabling the `preserveRawBody` property, the raw body data is preserved and stored in the `req.rawBody` property. + +Learn more about [middlewares](https://docs.medusajs.com/learn/fundamentals/api-routes/middlewares/index.html.md). + +You can then access the raw body data in your API route handler: + +```ts title="src/api/custom/route.ts" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" + +export async function POST( + req: MedusaRequest, + res: MedusaResponse +) { + console.log(req.rawBody) + + // TODO use raw body +} +``` + +*** + +## Configure Request Body Size Limit + +By default, the body parser limits the request body size to `100kb`. If a request body exceeds that size, the Medusa application throws an error. + +You can configure the body parser to accept larger request bodies by setting the `sizeLimit` property of the `bodyParser` object in a middleware route object. For example: + +```ts title="src/api/middlewares.ts" highlights={sizeLimitHighlights} +import { defineMiddlewares } from "@medusajs/framework/http" + +export default defineMiddlewares({ + routes: [ + { + method: ["POST"], + bodyParser: { sizeLimit: "2mb" }, + matcher: "/custom", + }, + ], +}) +``` + +The `sizeLimit` property accepts one of the following types of values: + +- A string representing the size limit in bytes (For example, `100kb`, `2mb`, `5gb`). It is passed to the [bytes](https://www.npmjs.com/package/bytes) library to parse the size. +- A number representing the size limit in bytes. For example, `1024` for 1kb. + +*** + +## Configure File Uploads + +To accept file uploads in your API routes, you can configure the [Express Multer middleware](https://expressjs.com/en/resources/middleware/multer.html) on your route. + +The `multer` package is available through the `@medusajs/medusa` package, so you don't need to install it. However, for better typing support, install the `@types/multer` package as a development dependency: + +```bash npm2yarn +npm install --save-dev @types/multer +``` + +Then, to configure file upload for your route, create the file `src/api/middlewares.ts` with the following content: + +```ts title="src/api/middlewares.ts" highlights={uploadHighlights} +import { defineMiddlewares } from "@medusajs/framework/http" +import multer from "multer" + +const upload = multer({ storage: multer.memoryStorage() }) + +export default defineMiddlewares({ + routes: [ + { + method: ["POST"], + matcher: "/custom", + middlewares: [ + // @ts-ignore + upload.array("files"), + ], + }, + ], +}) +``` + +In the example above, you configure the `multer` middleware to store the uploaded files in memory. Then, you apply the `upload.array("files")` middleware to the route to accept file uploads. By using the `array` method, you accept multiple file uploads with the same `files` field name. + +You can then access the uploaded files in your API route handler: + +```ts title="src/api/custom/route.ts" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" + +export async function POST( + req: MedusaRequest, + res: MedusaResponse +) { + const files = req.files as Express.Multer.File[] + + // TODO handle files +} +``` + +The uploaded files are stored in the `req.files` property as an array of Multer file objects that have properties like `filename` and `mimetype`. + +### Uploading Files using File Module Provider + +The recommended way to upload the files to storage using the configured [File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file/index.html.md) is to use the [uploadFilesWorkflow](https://docs.medusajs.com/resources/references/medusa-workflows/uploadFilesWorkflow/index.html.md): + +```ts title="src/api/custom/route.ts" +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" +import { MedusaError } from "@medusajs/framework/utils" +import { uploadFilesWorkflow } from "@medusajs/medusa/core-flows" + +export async function POST( + req: MedusaRequest, + res: MedusaResponse +) { + const files = req.files as Express.Multer.File[] + + if (!files?.length) { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + "No files were uploaded" + ) + } + + const { result } = await uploadFilesWorkflow(req.scope).run({ + input: { + files: files?.map((f) => ({ + filename: f.originalname, + mimeType: f.mimetype, + content: f.buffer.toString("binary"), + access: "public", + })), + }, + }) + + res.status(200).json({ files: result }) +} +``` + +Check out the [uploadFilesWorkflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/uploadFilesWorkflow/index.html.md) for details on the expected input and output of the workflow. + + +# API Route Parameters + +In this chapter, you’ll learn about path, query, and request body parameters. + +## Path Parameters + +To create an API route that accepts a path parameter, create a directory within the route file's path whose name is of the format `[param]`. + +For example, to create an API Route at the path `/hello-world/:id`, where `:id` is a path parameter, create the file `src/api/hello-world/[id]/route.ts` with the following content: + +```ts title="src/api/hello-world/[id]/route.ts" highlights={singlePathHighlights} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: `[GET] Hello ${req.params.id}!`, + }) +} +``` + +The `MedusaRequest` object has a `params` property. `params` holds the path parameters in key-value pairs. + +### Multiple Path Parameters + +To create an API route that accepts multiple path parameters, create within the file's path multiple directories whose names are of the format `[param]`. + +For example, to create an API route at `/hello-world/:id/name/:name`, create the file `src/api/hello-world/[id]/name/[name]/route.ts` with the following content: + +```ts title="src/api/hello-world/[id]/name/[name]/route.ts" highlights={multiplePathHighlights} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: `[GET] Hello ${ + req.params.id + } - ${req.params.name}!`, + }) +} +``` + +You access the `id` and `name` path parameters using the `req.params` property. + +*** + +## Query Parameters + +You can access all query parameters in the `query` property of the `MedusaRequest` object. `query` is an object of key-value pairs, where the key is a query parameter's name, and the value is its value. + +For example: + +```ts title="src/api/hello-world/route.ts" highlights={queryHighlights} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: `Hello ${req.query.name}`, + }) +} +``` + +The value of `req.query.name` is the value passed in `?name=John`, for example. + +### Validate Query Parameters + +You can apply validation rules on received query parameters to ensure they match specified rules and types. + +Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/validation#how-to-validate-request-query-paramters/index.html.md). + +*** + +## Request Body Parameters + +The Medusa application parses the body of any request having a JSON, URL-encoded, or text request content types. The request body parameters are set in the `MedusaRequest`'s `body` property. + +Learn more about configuring body parsing in [this guide](https://docs.medusajs.com/learn/fundamentals/api-routes/parse-body/index.html.md). + +For example: + +```ts title="src/api/hello-world/route.ts" highlights={bodyHighlights} +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" + +type HelloWorldReq = { + name: string +} + +export const POST = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: `[POST] Hello ${req.body.name}!`, + }) +} +``` + +In this example, you use the `name` request body parameter to create the message in the returned response. + +The `MedusaRequest` type accepts a type argument that indicates the type of the request body. This is useful for auto-completion and to avoid typing errors. + +To test it out, send the following request to your Medusa application: + +```bash +curl -X POST 'http://localhost:9000/hello-world' \ +-H 'Content-Type: application/json' \ +--data-raw '{ + "name": "John" +}' +``` + +This returns the following JSON object: + +```json +{ + "message": "[POST] Hello John!" +} +``` + +### Validate Body Parameters + +You can apply validation rules on received body parameters to ensure they match specified rules and types. + +Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/api-routes/validation#how-to-validate-request-body/index.html.md). + + # Protected Routes In this chapter, you’ll learn how to create protected routes. @@ -7402,6 +7214,108 @@ export const GET = async ( In the route handler, you resolve the User Module's main service, then use it to retrieve the logged-in admin user. +# API Route Response + +In this chapter, you'll learn how to send a response in your API route. + +## Send a JSON Response + +To send a JSON response, use the `json` method of the `MedusaResponse` object passed as the second parameter of your API route handler. + +For example: + +```ts title="src/api/custom/route.ts" highlights={jsonHighlights} +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.json({ + message: "Hello, World!", + }) +} +``` + +This API route returns the following JSON object: + +```json +{ + "message": "Hello, World!" +} +``` + +*** + +## Set Response Status Code + +By default, setting the JSON data using the `json` method returns a response with a `200` status code. + +To change the status code, use the `status` method of the `MedusaResponse` object. + +For example: + +```ts title="src/api/custom/route.ts" highlights={statusHighlight} +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.status(201).json({ + message: "Hello, World!", + }) +} +``` + +The response of this API route has the status code `201`. + +*** + +## Change Response Content Type + +To return response data other than a JSON object, use the `writeHead` method of the `MedusaResponse` object. It allows you to set the response headers, including the content type. + +For example, to create an API route that returns an event stream: + +```ts highlights={streamHighlights} +import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" + +export const GET = async ( + req: MedusaRequest, + res: MedusaResponse +) => { + res.writeHead(200, { + "Content-Type": "text/event-stream", + "Cache-Control": "no-cache", + Connection: "keep-alive", + }) + + const interval = setInterval(() => { + res.write("Streaming data...\n") + }, 3000) + + req.on("end", () => { + clearInterval(interval) + res.end() + }) +} +``` + +The `writeHead` method accepts two parameters: + +1. The first one is the response's status code. +2. The second is an object of key-value pairs to set the headers of the response. + +This API route opens a stream by setting the `Content-Type` in the header to `text/event-stream`. It then simulates a stream by creating an interval that writes the stream data every three seconds. + +*** + +## Do More with Responses + +The `MedusaResponse` type is based on [Express's Response](https://expressjs.com/en/api.html#res). Refer to their API reference for other uses of responses. + + # Request Body and Query Parameter Validation In this chapter, you'll learn how to validate request body and query parameters in your custom API route. @@ -7651,106 +7565,73 @@ For example, if you omit the `a` parameter, you'll receive a `400` response code To see different examples and learn more about creating a validation schema, refer to [Zod's documentation](https://zod.dev). -# API Route Response +# Configure Data Model Properties -In this chapter, you'll learn how to send a response in your API route. +In this chapter, you’ll learn how to configure data model properties. -## Send a JSON Response +## Property’s Default Value -To send a JSON response, use the `json` method of the `MedusaResponse` object passed as the second parameter of your API route handler. +Use the `default` method on a property's definition to specify the default value of a property. For example: -```ts title="src/api/custom/route.ts" highlights={jsonHighlights} -import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" +```ts highlights={defaultHighlights} +import { model } from "@medusajs/framework/utils" -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.json({ - message: "Hello, World!", - }) -} +const MyCustom = model.define("my_custom", { + color: model + .enum(["black", "white"]) + .default("black"), + age: model + .number() + .default(0), + // ... +}) + +export default MyCustom ``` -This API route returns the following JSON object: - -```json -{ - "message": "Hello, World!" -} -``` +In this example, you set the default value of the `color` enum property to `black`, and that of the `age` number property to `0`. *** -## Set Response Status Code +## Nullable Property -By default, setting the JSON data using the `json` method returns a response with a `200` status code. - -To change the status code, use the `status` method of the `MedusaResponse` object. +Use the `nullable` method to indicate that a property’s value can be `null`. For example: -```ts title="src/api/custom/route.ts" highlights={statusHighlight} -import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" +```ts highlights={nullableHighlights} +import { model } from "@medusajs/framework/utils" -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.status(201).json({ - message: "Hello, World!", - }) -} +const MyCustom = model.define("my_custom", { + price: model.bigNumber().nullable(), + // ... +}) + +export default MyCustom ``` -The response of this API route has the status code `201`. - *** -## Change Response Content Type +## Unique Property -To return response data other than a JSON object, use the `writeHead` method of the `MedusaResponse` object. It allows you to set the response headers, including the content type. +The `unique` method indicates that a property’s value must be unique in the database through a unique index. -For example, to create an API route that returns an event stream: +For example: -```ts highlights={streamHighlights} -import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" +```ts highlights={uniqueHighlights} +import { model } from "@medusajs/framework/utils" -export const GET = async ( - req: MedusaRequest, - res: MedusaResponse -) => { - res.writeHead(200, { - "Content-Type": "text/event-stream", - "Cache-Control": "no-cache", - Connection: "keep-alive", - }) +const User = model.define("user", { + email: model.text().unique(), + // ... +}) - const interval = setInterval(() => { - res.write("Streaming data...\n") - }, 3000) - - req.on("end", () => { - clearInterval(interval) - res.end() - }) -} +export default User ``` -The `writeHead` method accepts two parameters: - -1. The first one is the response's status code. -2. The second is an object of key-value pairs to set the headers of the response. - -This API route opens a stream by setting the `Content-Type` in the header to `text/event-stream`. It then simulates a stream by creating an interval that writes the stream data every three seconds. - -*** - -## Do More with Responses - -The `MedusaResponse` type is based on [Express's Response](https://expressjs.com/en/api.html#res). Refer to their API reference for other uses of responses. +In this example, multiple users can’t have the same email. # Add Data Model Check Constraints @@ -7825,75 +7706,6 @@ npx medusa db:migrate The first command generates the migration under the `migrations` directory of your module's directory, and the second reflects it on the database. -# Configure Data Model Properties - -In this chapter, you’ll learn how to configure data model properties. - -## Property’s Default Value - -Use the `default` method on a property's definition to specify the default value of a property. - -For example: - -```ts highlights={defaultHighlights} -import { model } from "@medusajs/framework/utils" - -const MyCustom = model.define("my_custom", { - color: model - .enum(["black", "white"]) - .default("black"), - age: model - .number() - .default(0), - // ... -}) - -export default MyCustom -``` - -In this example, you set the default value of the `color` enum property to `black`, and that of the `age` number property to `0`. - -*** - -## Nullable Property - -Use the `nullable` method to indicate that a property’s value can be `null`. - -For example: - -```ts highlights={nullableHighlights} -import { model } from "@medusajs/framework/utils" - -const MyCustom = model.define("my_custom", { - price: model.bigNumber().nullable(), - // ... -}) - -export default MyCustom -``` - -*** - -## Unique Property - -The `unique` method indicates that a property’s value must be unique in the database through a unique index. - -For example: - -```ts highlights={uniqueHighlights} -import { model } from "@medusajs/framework/utils" - -const User = model.define("user", { - email: model.text().unique(), - // ... -}) - -export default User -``` - -In this example, multiple users can’t have the same email. - - # Data Model Default Properties In this chapter, you'll learn about the properties available by default in your data model. @@ -8298,6 +8110,30 @@ export default MyCustom This creates a unique composite index on the `name` and `age` properties. +# Data Model’s Primary Key + +In this chapter, you’ll learn how to configure the primary key of a data model. + +## primaryKey Method + +To set any `id`, `text`, or `number` property as a primary key, use the `primaryKey` method. + +For example: + +```ts highlights={highlights} +import { model } from "@medusajs/framework/utils" + +const MyCustom = model.define("my_custom", { + id: model.id().primaryKey(), + // ... +}) + +export default MyCustom +``` + +In the example above, the `id` property is defined as the data model's primary key. + + # Data Model Property Types In this chapter, you’ll learn about the types of properties in a data model’s schema. @@ -8505,30 +8341,6 @@ export default MyCustom Refer to the [Data Model API reference](https://docs.medusajs.com/resources/references/data-model/index.html.md) for a full reference of the properties. -# Data Model’s Primary Key - -In this chapter, you’ll learn how to configure the primary key of a data model. - -## primaryKey Method - -To set any `id`, `text`, or `number` property as a primary key, use the `primaryKey` method. - -For example: - -```ts highlights={highlights} -import { model } from "@medusajs/framework/utils" - -const MyCustom = model.define("my_custom", { - id: model.id().primaryKey(), - // ... -}) - -export default MyCustom -``` - -In the example above, the `id` property is defined as the data model's primary key. - - # Data Model Relationships In this chapter, you’ll learn how to define relationships between data models in your module. @@ -8824,6 +8636,50 @@ The `cascades` method accepts an object. Its key is the operation’s name, such In the example above, when a store is deleted, its associated products are also deleted. +# Searchable Data Model Property + +In this chapter, you'll learn what a searchable property is and how to define it. + +## What is a Searchable Property? + +Methods generated by the [service factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) that accept filters, such as `list{ModelName}s`, accept a `q` property as part of the filters. + +When the `q` filter is passed, the data model's searchable properties are queried to find matching records. + +*** + +## Define a Searchable Property + +Use the `searchable` method on a `text` property to indicate that it's searchable. + +For example: + +```ts highlights={searchableHighlights} +import { model } from "@medusajs/framework/utils" + +const MyCustom = model.define("my_custom", { + name: model.text().searchable(), + // ... +}) + +export default MyCustom +``` + +In this example, the `name` property is searchable. + +### Search Example + +If you pass a `q` filter to the `listMyCustoms` method: + +```ts +const myCustoms = await helloModuleService.listMyCustoms({ + q: "John", +}) +``` + +This retrieves records that include `John` in their `name` property. + + # Write Migration In this chapter, you'll learn how to create a migration and write it manually. @@ -8902,6 +8758,239 @@ This rolls back the last ran migration on the Hello Module. To learn more about the Medusa CLI's database commands, refer to [this CLI reference](https://docs.medusajs.com/resources/medusa-cli/commands/db/index.html.md). +# Seed Data with Custom CLI Script + +In this chapter, you'll learn how to seed data using a custom CLI script. + +## How to Seed Data + +To seed dummy data for development or demo purposes, use a custom CLI script. + +In the CLI script, use your custom workflows or Medusa's existing workflows, which you can browse in [this reference](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md), to seed data. + +### Example: Seed Dummy Products + +In this section, you'll follow an example of creating a custom CLI script that seeds fifty dummy products. + +First, install the [Faker](https://fakerjs.dev/) library to generate random data in your script: + +```bash npm2yarn +npm install --save-dev @faker-js/faker +``` + +Then, create the file `src/scripts/demo-products.ts` with the following content: + +```ts title="src/scripts/demo-products.ts" highlights={highlights} collapsibleLines="1-12" expandButtonLabel="Show Imports" +import { ExecArgs } from "@medusajs/framework/types" +import { faker } from "@faker-js/faker" +import { + ContainerRegistrationKeys, + Modules, + ProductStatus, +} from "@medusajs/framework/utils" +import { + createInventoryLevelsWorkflow, + createProductsWorkflow, +} from "@medusajs/medusa/core-flows" + +export default async function seedDummyProducts({ + container, +}: ExecArgs) { + const salesChannelModuleService = container.resolve( + Modules.SALES_CHANNEL + ) + const logger = container.resolve( + ContainerRegistrationKeys.LOGGER + ) + const query = container.resolve( + ContainerRegistrationKeys.QUERY + ) + + const defaultSalesChannel = await salesChannelModuleService + .listSalesChannels({ + name: "Default Sales Channel", + }) + + const sizeOptions = ["S", "M", "L", "XL"] + const colorOptions = ["Black", "White"] + const currency_code = "eur" + const productsNum = 50 + + // TODO seed products +} +``` + +So far, in the script, you: + +- Resolve the Sales Channel Module's main service to retrieve the application's default sales channel. This is the sales channel the dummy products will be available in. +- Resolve the Logger to log messages in the terminal, and Query to later retrieve data useful for the seeded products. +- Initialize some default data to use when seeding the products next. + +Next, replace the `TODO` with the following: + +```ts title="src/scripts/demo-products.ts" +const productsData = new Array(productsNum).fill(0).map((_, index) => { + const title = faker.commerce.product() + "_" + index + return { + title, + is_giftcard: true, + description: faker.commerce.productDescription(), + status: ProductStatus.PUBLISHED, + options: [ + { + title: "Size", + values: sizeOptions, + }, + { + title: "Color", + values: colorOptions, + }, + ], + images: [ + { + url: faker.image.urlPlaceholder({ + text: title, + }), + }, + { + url: faker.image.urlPlaceholder({ + text: title, + }), + }, + ], + variants: new Array(10).fill(0).map((_, variantIndex) => ({ + title: `${title} ${variantIndex}`, + sku: `variant-${variantIndex}${index}`, + prices: new Array(10).fill(0).map((_, priceIndex) => ({ + currency_code, + amount: 10 * priceIndex, + })), + options: { + Size: sizeOptions[Math.floor(Math.random() * 3)], + }, + })), + shipping_profile_id: "sp_123", + sales_channels: [ + { + id: defaultSalesChannel[0].id, + }, + ], + } +}) + +// TODO seed products +``` + +You generate fifty products using the sales channel and variables you initialized, and using Faker for random data, such as the product's title or images. + +Then, replace the new `TODO` with the following: + +```ts title="src/scripts/demo-products.ts" +const { result: products } = await createProductsWorkflow(container).run({ + input: { + products: productsData, + }, +}) + +logger.info(`Seeded ${products.length} products.`) + +// TODO add inventory levels +``` + +You create the generated products using the `createProductsWorkflow` imported previously from `@medusajs/medusa/core-flows`. It accepts the product data as input, and returns the created products. + +Only thing left is to create inventory levels for the products. So, replace the last `TODO` with the following: + +```ts title="src/scripts/demo-products.ts" +logger.info("Seeding inventory levels.") + +const { data: stockLocations } = await query.graph({ + entity: "stock_location", + fields: ["id"], +}) + +const { data: inventoryItems } = await query.graph({ + entity: "inventory_item", + fields: ["id"], +}) + +const inventoryLevels = inventoryItems.map((inventoryItem) => ({ + location_id: stockLocations[0].id, + stocked_quantity: 1000000, + inventory_item_id: inventoryItem.id, +})) + +await createInventoryLevelsWorkflow(container).run({ + input: { + inventory_levels: inventoryLevels, + }, +}) + +logger.info("Finished seeding inventory levels data.") +``` + +You use Query to retrieve the stock location, to use the first location in the application, and the inventory items. + +Then, you generate inventory levels for each inventory item, associating it with the first stock location. + +Finally, you use the `createInventoryLevelsWorkflow` from Medusa's core workflows to create the inventory levels. + +### Test Script + +To test out the script, run the following command in your project's directory: + +```bash +npx medusa exec ./src/scripts/demo-products.ts +``` + +This seeds the products to your database. If you run your Medusa application and view the products in the dashboard, you'll find fifty new products. + + +# Event Data Payload + +In this chapter, you'll learn how subscribers receive an event's data payload. + +## Access Event's Data Payload + +When events are emitted, they’re emitted with a data payload. + +The object that the subscriber function receives as a parameter has an `event` property, which is an object holding the event payload in a `data` property with additional context. + +For example: + +```ts title="src/subscribers/product-created.ts" highlights={highlights} collapsibleLines="1-5" expandButtonLabel="Show Imports" +import type { + SubscriberArgs, + SubscriberConfig, +} from "@medusajs/framework" + +export default async function productCreateHandler({ + event, +}: SubscriberArgs<{ id: string }>) { + const productId = event.data.id + console.log(`The product ${productId} was created`) +} + +export const config: SubscriberConfig = { + event: "product.created", +} +``` + +The `event` object has the following properties: + +- data: (\`object\`) The data payload of the event. Its properties are different for each event. +- name: (string) The name of the triggered event. +- metadata: (\`object\`) Additional data and context of the emitted event. + +This logs the product ID received in the `product.created` event’s data payload to the console. + +{/* --- + +## List of Events with Data Payload + +Refer to [this reference](!resources!/events-reference) for a full list of events emitted by Medusa and their data payloads. */} + + # Emit Workflow and Service Events In this chapter, you'll learn about event types and how to emit an event in a service or workflow. @@ -9070,95 +9159,6 @@ If you execute the `performAction` method of your service, the event is emitted Any subscribers listening to the event are also executed. -# Searchable Data Model Property - -In this chapter, you'll learn what a searchable property is and how to define it. - -## What is a Searchable Property? - -Methods generated by the [service factory](https://docs.medusajs.com/learn/fundamentals/modules/service-factory/index.html.md) that accept filters, such as `list{ModelName}s`, accept a `q` property as part of the filters. - -When the `q` filter is passed, the data model's searchable properties are queried to find matching records. - -*** - -## Define a Searchable Property - -Use the `searchable` method on a `text` property to indicate that it's searchable. - -For example: - -```ts highlights={searchableHighlights} -import { model } from "@medusajs/framework/utils" - -const MyCustom = model.define("my_custom", { - name: model.text().searchable(), - // ... -}) - -export default MyCustom -``` - -In this example, the `name` property is searchable. - -### Search Example - -If you pass a `q` filter to the `listMyCustoms` method: - -```ts -const myCustoms = await helloModuleService.listMyCustoms({ - q: "John", -}) -``` - -This retrieves records that include `John` in their `name` property. - - -# Event Data Payload - -In this chapter, you'll learn how subscribers receive an event's data payload. - -## Access Event's Data Payload - -When events are emitted, they’re emitted with a data payload. - -The object that the subscriber function receives as a parameter has an `event` property, which is an object holding the event payload in a `data` property with additional context. - -For example: - -```ts title="src/subscribers/product-created.ts" highlights={highlights} collapsibleLines="1-5" expandButtonLabel="Show Imports" -import type { - SubscriberArgs, - SubscriberConfig, -} from "@medusajs/framework" - -export default async function productCreateHandler({ - event, -}: SubscriberArgs<{ id: string }>) { - const productId = event.data.id - console.log(`The product ${productId} was created`) -} - -export const config: SubscriberConfig = { - event: "product.created", -} -``` - -The `event` object has the following properties: - -- data: (\`object\`) The data payload of the event. Its properties are different for each event. -- name: (string) The name of the triggered event. -- metadata: (\`object\`) Additional data and context of the emitted event. - -This logs the product ID received in the `product.created` event’s data payload to the console. - -{/* --- - -## List of Events with Data Payload - -Refer to [this reference](!resources!/events-reference) for a full list of events emitted by Medusa and their data payloads. */} - - # Add Columns to a Link In this chapter, you'll learn how to add custom columns to a link definition and manage them. @@ -9366,403 +9366,6 @@ export default defineLink( ``` -# Link - -In this chapter, you’ll learn what Link is and how to use it to manage links. - -As of [Medusa v2.2.0](https://github.com/medusajs/medusa/releases/tag/v2.2.0), Remote Link has been deprecated in favor of Link. They have the same usage, so you only need to change the key used to resolve the tool from the Medusa container as explained below. - -## What is Link? - -Link is a class with utility methods to manage links between data models. It’s registered in the Medusa container under the `link` registration name. - -For example: - -```ts collapsibleLines="1-9" expandButtonLabel="Show Imports" -import { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { - ContainerRegistrationKeys, -} from "@medusajs/framework/utils" - -export async function POST( - req: MedusaRequest, - res: MedusaResponse -): Promise { - const link = req.scope.resolve( - ContainerRegistrationKeys.LINK - ) - - // ... -} -``` - -You can use its methods to manage links, such as create or delete links. - -*** - -## Create Link - -To create a link between records of two data models, use the `create` method of Link. - -For example: - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - "helloModuleService": { - my_custom_id: "mc_123", - }, -}) -``` - -The `create` method accepts as a parameter an object. The object’s keys are the names of the linked modules. - -The keys (names of linked modules) must be in the same [direction](https://docs.medusajs.com/learn/fundamentals/module-links/directions/index.html.md) of the link definition. - -The value of each module’s property is an object, whose keys are of the format `{data_model_snake_name}_id`, and values are the IDs of the linked record. - -So, in the example above, you link a record of the `MyCustom` data model in a `hello` module to a `Product` record in the Product Module. - -*** - -## Dismiss Link - -To remove a link between records of two data models, use the `dismiss` method of Link. - -For example: - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.dismiss({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, - "helloModuleService": { - my_custom_id: "mc_123", - }, -}) -``` - -The `dismiss` method accepts the same parameter type as the [create method](#create-link). - -The keys (names of linked modules) must be in the same [direction](https://docs.medusajs.com/learn/fundamentals/module-links/directions/index.html.md) of the link definition. - -*** - -## Cascade Delete Linked Records - -If a record is deleted, use the `delete` method of Link to delete all linked records. - -For example: - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await productModuleService.deleteVariants([variant.id]) - -await link.delete({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, -}) -``` - -This deletes all records linked to the deleted product. - -*** - -## Restore Linked Records - -If a record that was previously soft-deleted is now restored, use the `restore` method of Link to restore all linked records. - -For example: - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await productModuleService.restoreProducts(["prod_123"]) - -await link.restore({ - [Modules.PRODUCT]: { - product_id: "prod_123", - }, -}) -``` - - -# Architectural Modules - -In this chapter, you’ll learn about architectural modules. - -## What is an Architectural Module? - -An architectural module implements features and mechanisms related to the Medusa application’s architecture and infrastructure. - -Since modules are interchangeable, you have more control over Medusa’s architecture. For example, you can choose to use Memcached for event handling instead of Redis. - -*** - -## Architectural Module Types - -There are different architectural module types including: - -![Diagram illustrating how the modules connect to third-party services](https://res.cloudinary.com/dza7lstvk/image/upload/v1727095814/Medusa%20Book/architectural-modules_bj9bb9.jpg) - -- Cache Module: Defines the caching mechanism or logic to cache computational results. -- Event Module: Integrates a pub/sub service to handle subscribing to and emitting events. -- Workflow Engine Module: Integrates a service to store and track workflow executions and steps. -- File Module: Integrates a storage service to handle uploading and managing files. -- Notification Module: Integrates a third-party service or defines custom logic to send notifications to users and customers. - -*** - -## Architectural Modules List - -Refer to the [Architectural Modules reference](https://docs.medusajs.com/resources/architectural-modules/index.html.md) for a list of Medusa’s architectural modules, available modules to install, and how to create an architectural module. - - -# Query Context - -In this chapter, you'll learn how to pass contexts when retrieving data with [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). - -## What is Query Context? - -Query context is a way to pass additional information when retrieving data with Query. This data can be useful when applying custom transformations to the retrieved data based on the current context. - -For example, consider you have a Blog Module with posts and authors. You can accept the user's language as a context and return the posts in the user's language. Another example is how Medusa uses Query Context to [retrieve product variants' prices based on the customer's currency](https://docs.medusajs.com/resources/commerce-modules/product/guides/price/index.html.md). - -*** - -## How to Use Query Context - -The `query.graph` method accepts an optional `context` parameter that can be used to pass additional context either to the data model you're retrieving (for example, `post`), or its related and linked models (for example, `author`). - -You initialize a context using `QueryContext` from the Modules SDK. It accepts an object of contexts as an argument. - -For example, to retrieve posts using Query while passing the user's language as a context: - -```ts -const { data } = await query.graph({ - entity: "post", - fields: ["*"], - context: QueryContext({ - lang: "es", - }), -}) -``` - -In this example, you pass in the context a `lang` property whose value is `es`. - -Then, to handle the context while retrieving records of the data model, in the associated module's service you override the generated `list` method of the data model. - -For example, continuing the example above, you can override the `listPosts` method of the Blog Module's service to handle the context: - -```ts highlights={highlights2} -import { MedusaContext, MedusaService } from "@medusajs/framework/utils" -import { Context, FindConfig } from "@medusajs/framework/types" -import Post from "./models/post" -import Author from "./models/author" - -class BlogModuleService extends MedusaService({ - Post, - Author, -}){ - // @ts-ignore - async listPosts( - filters?: any, - config?: FindConfig | undefined, - @MedusaContext() sharedContext?: Context | undefined - ) { - const context = filters.context ?? {} - delete filters.context - - let posts = await super.listPosts(filters, config, sharedContext) - - if (context.lang === "es") { - posts = posts.map((post) => { - return { - ...post, - title: post.title + " en español", - } - }) - } - - return posts - } -} - -export default BlogModuleService -``` - -In the above example, you override the generated `listPosts` method. This method receives as a first parameter the filters passed to the query, but it also includes a `context` property that holds the context passed to the query. - -You extract the context from `filters`, then retrieve the posts using the parent's `listPosts` method. After that, if the language is set in the context, you transform the titles of the posts. - -All posts returned will now have their titles appended with "en español". - -Learn more about the generated `list` method in [this reference](https://docs.medusajs.com/resources/service-factory-reference/methods/list/index.html.md). - -### Using Pagination with Query - -If you pass pagination fields to `query.graph`, you must also override the `listAndCount` method in the service. - -For example, following along with the previous example, you must override the `listAndCountPosts` method of the Blog Module's service: - -```ts -import { MedusaContext, MedusaService } from "@medusajs/framework/utils" -import { Context, FindConfig } from "@medusajs/framework/types" -import Post from "./models/post" -import Author from "./models/author" - -class BlogModuleService extends MedusaService({ - Post, - Author, -}){ - // @ts-ignore - async listAndCountPosts( - filters?: any, - config?: FindConfig | undefined, - @MedusaContext() sharedContext?: Context | undefined - ) { - const context = filters.context ?? {} - delete filters.context - - const result = await super.listAndCountPosts( - filters, - config, - sharedContext - ) - - if (context.lang === "es") { - result.posts = posts.map((post) => { - return { - ...post, - title: post.title + " en español", - } - }) - } - - return result - } -} - -export default BlogModuleService -``` - -Now, the `listAndCountPosts` method will handle the context passed to `query.graph` when you pass pagination fields. You can also move the logic to transform the posts' titles to a separate method and call it from both `listPosts` and `listAndCountPosts`. - -*** - -## Passing Query Context to Related Data Models - -If you're retrieving a data model and you want to pass context to its associated model in the same module, you can pass them as part of `QueryContext`'s parameter, then handle them in the same `list` method. - -For linked data models, check out the [next section](#passing-query-context-to-linked-data-models). - -For example, to pass a context for the post's authors: - -```ts highlights={highlights3} -const { data } = await query.graph({ - entity: "post", - fields: ["*"], - context: QueryContext({ - lang: "es", - author: QueryContext({ - lang: "es", - }), - }), -}) -``` - -Then, in the `listPosts` method, you can handle the context for the post's authors: - -```ts highlights={highlights4} -import { MedusaContext, MedusaService } from "@medusajs/framework/utils" -import { Context, FindConfig } from "@medusajs/framework/types" -import Post from "./models/post" -import Author from "./models/author" - -class BlogModuleService extends MedusaService({ - Post, - Author, -}){ - // @ts-ignore - async listPosts( - filters?: any, - config?: FindConfig | undefined, - @MedusaContext() sharedContext?: Context | undefined - ) { - const context = filters.context ?? {} - delete filters.context - - let posts = await super.listPosts(filters, config, sharedContext) - - const isPostLangEs = context.lang === "es" - const isAuthorLangEs = context.author?.lang === "es" - - if (isPostLangEs || isAuthorLangEs) { - posts = posts.map((post) => { - return { - ...post, - title: isPostLangEs ? post.title + " en español" : post.title, - author: { - ...post.author, - name: isAuthorLangEs ? post.author.name + " en español" : post.author.name, - }, - } - }) - } - - return posts - } -} - -export default BlogModuleService -``` - -The context in `filters` will also have the context for `author`, which you can use to make transformations to the post's authors. - -*** - -## Passing Query Context to Linked Data Models - -If you're retrieving a data model and you want to pass context to a linked model in a different module, pass to the `context` property an object instead, where its keys are the linked model's name and the values are the context for that linked model. - -For example, consider the Product Module's `Product` data model is linked to the Blog Module's `Post` data model. You can pass context to the `Post` data model while retrieving products like so: - -```ts highlights={highlights5} -const { data } = await query.graph({ - entity: "product", - fields: ["*", "post.*"], - context: { - post: QueryContext({ - lang: "es", - }), - }, -}) -``` - -In this example, you retrieve products and their associated posts. You also pass a context for `post`, indicating the customer's language. - -To handle the context, you override the generated `listPosts` method of the Blog Module as explained [previously](#how-to-use-query-context). - - # Query In this chapter, you’ll learn about Query and how to use it to fetch data from modules. @@ -10117,6 +9720,447 @@ Try passing one of the Query configuration parameters, like `fields` or `limit`, Learn more about [specifing fields and relations](https://docs.medusajs.com/api/store#select-fields-and-relations) and [pagination](https://docs.medusajs.com/api/store#pagination) in the API reference. +# Link + +In this chapter, you’ll learn what Link is and how to use it to manage links. + +As of [Medusa v2.2.0](https://github.com/medusajs/medusa/releases/tag/v2.2.0), Remote Link has been deprecated in favor of Link. They have the same usage, so you only need to change the key used to resolve the tool from the Medusa container as explained below. + +## What is Link? + +Link is a class with utility methods to manage links between data models. It’s registered in the Medusa container under the `link` registration name. + +For example: + +```ts collapsibleLines="1-9" expandButtonLabel="Show Imports" +import { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { + ContainerRegistrationKeys, +} from "@medusajs/framework/utils" + +export async function POST( + req: MedusaRequest, + res: MedusaResponse +): Promise { + const link = req.scope.resolve( + ContainerRegistrationKeys.LINK + ) + + // ... +} +``` + +You can use its methods to manage links, such as create or delete links. + +*** + +## Create Link + +To create a link between records of two data models, use the `create` method of Link. + +For example: + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + "helloModuleService": { + my_custom_id: "mc_123", + }, +}) +``` + +The `create` method accepts as a parameter an object. The object’s keys are the names of the linked modules. + +The keys (names of linked modules) must be in the same [direction](https://docs.medusajs.com/learn/fundamentals/module-links/directions/index.html.md) of the link definition. + +The value of each module’s property is an object, whose keys are of the format `{data_model_snake_name}_id`, and values are the IDs of the linked record. + +So, in the example above, you link a record of the `MyCustom` data model in a `hello` module to a `Product` record in the Product Module. + +*** + +## Dismiss Link + +To remove a link between records of two data models, use the `dismiss` method of Link. + +For example: + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.dismiss({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, + "helloModuleService": { + my_custom_id: "mc_123", + }, +}) +``` + +The `dismiss` method accepts the same parameter type as the [create method](#create-link). + +The keys (names of linked modules) must be in the same [direction](https://docs.medusajs.com/learn/fundamentals/module-links/directions/index.html.md) of the link definition. + +*** + +## Cascade Delete Linked Records + +If a record is deleted, use the `delete` method of Link to delete all linked records. + +For example: + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await productModuleService.deleteVariants([variant.id]) + +await link.delete({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, +}) +``` + +This deletes all records linked to the deleted product. + +*** + +## Restore Linked Records + +If a record that was previously soft-deleted is now restored, use the `restore` method of Link to restore all linked records. + +For example: + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await productModuleService.restoreProducts(["prod_123"]) + +await link.restore({ + [Modules.PRODUCT]: { + product_id: "prod_123", + }, +}) +``` + + +# Query Context + +In this chapter, you'll learn how to pass contexts when retrieving data with [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query/index.html.md). + +## What is Query Context? + +Query context is a way to pass additional information when retrieving data with Query. This data can be useful when applying custom transformations to the retrieved data based on the current context. + +For example, consider you have a Blog Module with posts and authors. You can accept the user's language as a context and return the posts in the user's language. Another example is how Medusa uses Query Context to [retrieve product variants' prices based on the customer's currency](https://docs.medusajs.com/resources/commerce-modules/product/guides/price/index.html.md). + +*** + +## How to Use Query Context + +The `query.graph` method accepts an optional `context` parameter that can be used to pass additional context either to the data model you're retrieving (for example, `post`), or its related and linked models (for example, `author`). + +You initialize a context using `QueryContext` from the Modules SDK. It accepts an object of contexts as an argument. + +For example, to retrieve posts using Query while passing the user's language as a context: + +```ts +const { data } = await query.graph({ + entity: "post", + fields: ["*"], + context: QueryContext({ + lang: "es", + }), +}) +``` + +In this example, you pass in the context a `lang` property whose value is `es`. + +Then, to handle the context while retrieving records of the data model, in the associated module's service you override the generated `list` method of the data model. + +For example, continuing the example above, you can override the `listPosts` method of the Blog Module's service to handle the context: + +```ts highlights={highlights2} +import { MedusaContext, MedusaService } from "@medusajs/framework/utils" +import { Context, FindConfig } from "@medusajs/framework/types" +import Post from "./models/post" +import Author from "./models/author" + +class BlogModuleService extends MedusaService({ + Post, + Author, +}){ + // @ts-ignore + async listPosts( + filters?: any, + config?: FindConfig | undefined, + @MedusaContext() sharedContext?: Context | undefined + ) { + const context = filters.context ?? {} + delete filters.context + + let posts = await super.listPosts(filters, config, sharedContext) + + if (context.lang === "es") { + posts = posts.map((post) => { + return { + ...post, + title: post.title + " en español", + } + }) + } + + return posts + } +} + +export default BlogModuleService +``` + +In the above example, you override the generated `listPosts` method. This method receives as a first parameter the filters passed to the query, but it also includes a `context` property that holds the context passed to the query. + +You extract the context from `filters`, then retrieve the posts using the parent's `listPosts` method. After that, if the language is set in the context, you transform the titles of the posts. + +All posts returned will now have their titles appended with "en español". + +Learn more about the generated `list` method in [this reference](https://docs.medusajs.com/resources/service-factory-reference/methods/list/index.html.md). + +### Using Pagination with Query + +If you pass pagination fields to `query.graph`, you must also override the `listAndCount` method in the service. + +For example, following along with the previous example, you must override the `listAndCountPosts` method of the Blog Module's service: + +```ts +import { MedusaContext, MedusaService } from "@medusajs/framework/utils" +import { Context, FindConfig } from "@medusajs/framework/types" +import Post from "./models/post" +import Author from "./models/author" + +class BlogModuleService extends MedusaService({ + Post, + Author, +}){ + // @ts-ignore + async listAndCountPosts( + filters?: any, + config?: FindConfig | undefined, + @MedusaContext() sharedContext?: Context | undefined + ) { + const context = filters.context ?? {} + delete filters.context + + const result = await super.listAndCountPosts( + filters, + config, + sharedContext + ) + + if (context.lang === "es") { + result.posts = posts.map((post) => { + return { + ...post, + title: post.title + " en español", + } + }) + } + + return result + } +} + +export default BlogModuleService +``` + +Now, the `listAndCountPosts` method will handle the context passed to `query.graph` when you pass pagination fields. You can also move the logic to transform the posts' titles to a separate method and call it from both `listPosts` and `listAndCountPosts`. + +*** + +## Passing Query Context to Related Data Models + +If you're retrieving a data model and you want to pass context to its associated model in the same module, you can pass them as part of `QueryContext`'s parameter, then handle them in the same `list` method. + +For linked data models, check out the [next section](#passing-query-context-to-linked-data-models). + +For example, to pass a context for the post's authors: + +```ts highlights={highlights3} +const { data } = await query.graph({ + entity: "post", + fields: ["*"], + context: QueryContext({ + lang: "es", + author: QueryContext({ + lang: "es", + }), + }), +}) +``` + +Then, in the `listPosts` method, you can handle the context for the post's authors: + +```ts highlights={highlights4} +import { MedusaContext, MedusaService } from "@medusajs/framework/utils" +import { Context, FindConfig } from "@medusajs/framework/types" +import Post from "./models/post" +import Author from "./models/author" + +class BlogModuleService extends MedusaService({ + Post, + Author, +}){ + // @ts-ignore + async listPosts( + filters?: any, + config?: FindConfig | undefined, + @MedusaContext() sharedContext?: Context | undefined + ) { + const context = filters.context ?? {} + delete filters.context + + let posts = await super.listPosts(filters, config, sharedContext) + + const isPostLangEs = context.lang === "es" + const isAuthorLangEs = context.author?.lang === "es" + + if (isPostLangEs || isAuthorLangEs) { + posts = posts.map((post) => { + return { + ...post, + title: isPostLangEs ? post.title + " en español" : post.title, + author: { + ...post.author, + name: isAuthorLangEs ? post.author.name + " en español" : post.author.name, + }, + } + }) + } + + return posts + } +} + +export default BlogModuleService +``` + +The context in `filters` will also have the context for `author`, which you can use to make transformations to the post's authors. + +*** + +## Passing Query Context to Linked Data Models + +If you're retrieving a data model and you want to pass context to a linked model in a different module, pass to the `context` property an object instead, where its keys are the linked model's name and the values are the context for that linked model. + +For example, consider the Product Module's `Product` data model is linked to the Blog Module's `Post` data model. You can pass context to the `Post` data model while retrieving products like so: + +```ts highlights={highlights5} +const { data } = await query.graph({ + entity: "product", + fields: ["*", "post.*"], + context: { + post: QueryContext({ + lang: "es", + }), + }, +}) +``` + +In this example, you retrieve products and their associated posts. You also pass a context for `post`, indicating the customer's language. + +To handle the context, you override the generated `listPosts` method of the Blog Module as explained [previously](#how-to-use-query-context). + + +# Architectural Modules + +In this chapter, you’ll learn about architectural modules. + +## What is an Architectural Module? + +An architectural module implements features and mechanisms related to the Medusa application’s architecture and infrastructure. + +Since modules are interchangeable, you have more control over Medusa’s architecture. For example, you can choose to use Memcached for event handling instead of Redis. + +*** + +## Architectural Module Types + +There are different architectural module types including: + +![Diagram illustrating how the modules connect to third-party services](https://res.cloudinary.com/dza7lstvk/image/upload/v1727095814/Medusa%20Book/architectural-modules_bj9bb9.jpg) + +- Cache Module: Defines the caching mechanism or logic to cache computational results. +- Event Module: Integrates a pub/sub service to handle subscribing to and emitting events. +- Workflow Engine Module: Integrates a service to store and track workflow executions and steps. +- File Module: Integrates a storage service to handle uploading and managing files. +- Notification Module: Integrates a third-party service or defines custom logic to send notifications to users and customers. + +*** + +## Architectural Modules List + +Refer to the [Architectural Modules reference](https://docs.medusajs.com/resources/architectural-modules/index.html.md) for a list of Medusa’s architectural modules, available modules to install, and how to create an architectural module. + + +# Commerce Modules + +In this chapter, you'll learn about Medusa's commerce modules. + +## What is a Commerce Module? + +Commerce modules are built-in [modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) of Medusa that provide core commerce logic specific to domains like Products, Orders, Customers, Fulfillment, and much more. + +Medusa's commerce modules are used to form Medusa's default [workflows](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md) and [APIs](https://docs.medusajs.com/api/store). For example, when you call the add to cart endpoint. the add to cart workflow runs which uses the Product Module to check if the product exists, the Inventory Module to ensure the product is available in the inventory, and the Cart Module to finally add the product to the cart. + +You'll find the details and steps of the add-to-cart workflow in [this workflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow/index.html.md) + +The core commerce logic contained in Commerce Modules is also available directly when you are building customizations. This granular access to commerce functionality is unique and expands what's possible to build with Medusa drastically. + +### List of Medusa's Commerce Modules + +Refer to [this reference](https://docs.medusajs.com/resources/commerce-modules/index.html.md) for a full list of commerce modules in Medusa. + +*** + +## Use Commerce Modules in Custom Flows + +Similar to your [custom modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), the Medusa application registers a commerce module's service in the [container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md). So, you can resolve it in your custom flows. This is useful as you build unique requirements extending core commerce features. + +For example, consider you have a [workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md) (a special function that performs a task in a series of steps with rollback mechanism) that needs a step to retrieve the total number of products. You can create a step in the workflow that resolves the Product Module's service from the container to use its methods: + +```ts highlights={highlights} +import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" + +export const countProductsStep = createStep( + "count-products", + async ({ }, { container }) => { + const productModuleService = container.resolve("product") + + const [,count] = await productModuleService.listAndCountProducts() + + return new StepResponse(count) + } +) +``` + +Your workflow can use services of both custom and commerce modules, supporting you in building custom flows without having to re-build core commerce features. + + # Module Container In this chapter, you'll learn about the module's container and how to resolve resources in that container. @@ -10604,149 +10648,31 @@ class HelloModuleService { ``` -# Module Isolation +# Modules Directory Structure -In this chapter, you'll learn how modules are isolated, and what that means for your custom development. +In this document, you'll learn about the expected files and directories in your module. -- Modules can't access resources, such as services or data models, from other modules. -- Use Medusa's linking concepts, as explained in the [Module Links chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md), to extend a module's data models and retrieve data across modules. +![Module Directory Structure Example](https://res.cloudinary.com/dza7lstvk/image/upload/v1714379976/Medusa%20Book/modules-dir-overview_nqq7ne.jpg) -## How are Modules Isolated? +## index.ts -A module is unaware of any resources other than its own, such as services or data models. This means it can't access these resources if they're implemented in another module. - -For example, your custom module can't resolve the Product Module's main service or have direct relationships from its data model to the Product Module's data models. +The `index.ts` file in the root of your module's directory is the only required file. It must export the module's definition as explained in a [previous chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). *** -## Why are Modules Isolated +## service.ts -Some of the module isolation's benefits include: - -- Integrate your module into any Medusa application without side-effects to your setup. -- Replace existing modules with your custom implementation, if your use case is drastically different. -- Use modules in other environments, such as Edge functions and Next.js apps. +A module must have a main service. It's created in the `service.ts` file at the root of your module directory as explained in a [previous chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). *** -## How to Extend Data Model of Another Module? +## Other Directories -To extend the data model of another module, such as the `product` data model of the Product Module, use Medusa's linking concepts as explained in the [Module Links chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md). +The following directories are optional and their content are explained more in the following chapters: -*** - -## How to Use Services of Other Modules? - -If you're building a feature that uses functionalities from different modules, use a workflow whose steps resolve the modules' services to perform these functionalities. - -Workflows ensure data consistency through their roll-back mechanism and tracking of each execution's status, steps, input, and output. - -### Example - -For example, consider you have two modules: - -1. A module that stores and manages brands in your application. -2. A module that integrates a third-party Content Management System (CMS). - -To sync brands from your application to the third-party system, create the following steps: - -```ts title="Example Steps" highlights={stepsHighlights} -const retrieveBrandsStep = createStep( - "retrieve-brands", - async (_, { container }) => { - const brandModuleService = container.resolve( - "brandModuleService" - ) - - const brands = await brandModuleService.listBrands() - - return new StepResponse(brands) - } -) - -const createBrandsInCmsStep = createStep( - "create-brands-in-cms", - async ({ brands }, { container }) => { - const cmsModuleService = container.resolve( - "cmsModuleService" - ) - - const cmsBrands = await cmsModuleService.createBrands(brands) - - return new StepResponse(cmsBrands, cmsBrands) - }, - async (brands, { container }) => { - const cmsModuleService = container.resolve( - "cmsModuleService" - ) - - await cmsModuleService.deleteBrands( - brands.map((brand) => brand.id) - ) - } -) -``` - -The `retrieveBrandsStep` retrieves the brands from a brand module, and the `createBrandsInCmsStep` creates the brands in a third-party system using a CMS module. - -Then, create the following workflow that uses these steps: - -```ts title="Example Workflow" -export const syncBrandsWorkflow = createWorkflow( - "sync-brands", - () => { - const brands = retrieveBrandsStep() - - createBrandsInCmsStep({ brands }) - } -) -``` - -You can then use this workflow in an API route, scheduled job, or other resources that use this functionality. - - -# Commerce Modules - -In this chapter, you'll learn about Medusa's commerce modules. - -## What is a Commerce Module? - -Commerce modules are built-in [modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md) of Medusa that provide core commerce logic specific to domains like Products, Orders, Customers, Fulfillment, and much more. - -Medusa's commerce modules are used to form Medusa's default [workflows](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md) and [APIs](https://docs.medusajs.com/api/store). For example, when you call the add to cart endpoint. the add to cart workflow runs which uses the Product Module to check if the product exists, the Inventory Module to ensure the product is available in the inventory, and the Cart Module to finally add the product to the cart. - -You'll find the details and steps of the add-to-cart workflow in [this workflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow/index.html.md) - -The core commerce logic contained in Commerce Modules is also available directly when you are building customizations. This granular access to commerce functionality is unique and expands what's possible to build with Medusa drastically. - -### List of Medusa's Commerce Modules - -Refer to [this reference](https://docs.medusajs.com/resources/commerce-modules/index.html.md) for a full list of commerce modules in Medusa. - -*** - -## Use Commerce Modules in Custom Flows - -Similar to your [custom modules](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md), the Medusa application registers a commerce module's service in the [container](https://docs.medusajs.com/learn/fundamentals/medusa-container/index.html.md). So, you can resolve it in your custom flows. This is useful as you build unique requirements extending core commerce features. - -For example, consider you have a [workflow](https://docs.medusajs.com/learn/fundamentals/workflows/index.html.md) (a special function that performs a task in a series of steps with rollback mechanism) that needs a step to retrieve the total number of products. You can create a step in the workflow that resolves the Product Module's service from the container to use its methods: - -```ts highlights={highlights} -import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" - -export const countProductsStep = createStep( - "count-products", - async ({ }, { container }) => { - const productModuleService = container.resolve("product") - - const [,count] = await productModuleService.listAndCountProducts() - - return new StepResponse(count) - } -) -``` - -Your workflow can use services of both custom and commerce modules, supporting you in building custom flows without having to re-build core commerce features. +- `models`: Holds the data models representing tables in the database. +- `migrations`: Holds the migration files used to reflect changes on the database. +- `loaders`: Holds the scripts to run on the Medusa application's start-up. # Loaders @@ -10992,31 +10918,105 @@ info: Connected to MongoDB You can now resolve the MongoDB Module's main service in your customizations to perform operations on the MongoDB database. -# Modules Directory Structure +# Module Isolation -In this document, you'll learn about the expected files and directories in your module. +In this chapter, you'll learn how modules are isolated, and what that means for your custom development. -![Module Directory Structure Example](https://res.cloudinary.com/dza7lstvk/image/upload/v1714379976/Medusa%20Book/modules-dir-overview_nqq7ne.jpg) +- Modules can't access resources, such as services or data models, from other modules. +- Use Medusa's linking concepts, as explained in the [Module Links chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md), to extend a module's data models and retrieve data across modules. -## index.ts +## How are Modules Isolated? -The `index.ts` file in the root of your module's directory is the only required file. It must export the module's definition as explained in a [previous chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). +A module is unaware of any resources other than its own, such as services or data models. This means it can't access these resources if they're implemented in another module. + +For example, your custom module can't resolve the Product Module's main service or have direct relationships from its data model to the Product Module's data models. *** -## service.ts +## Why are Modules Isolated -A module must have a main service. It's created in the `service.ts` file at the root of your module directory as explained in a [previous chapter](https://docs.medusajs.com/learn/fundamentals/modules/index.html.md). +Some of the module isolation's benefits include: + +- Integrate your module into any Medusa application without side-effects to your setup. +- Replace existing modules with your custom implementation, if your use case is drastically different. +- Use modules in other environments, such as Edge functions and Next.js apps. *** -## Other Directories +## How to Extend Data Model of Another Module? -The following directories are optional and their content are explained more in the following chapters: +To extend the data model of another module, such as the `product` data model of the Product Module, use Medusa's linking concepts as explained in the [Module Links chapters](https://docs.medusajs.com/learn/fundamentals/module-links/index.html.md). -- `models`: Holds the data models representing tables in the database. -- `migrations`: Holds the migration files used to reflect changes on the database. -- `loaders`: Holds the scripts to run on the Medusa application's start-up. +*** + +## How to Use Services of Other Modules? + +If you're building a feature that uses functionalities from different modules, use a workflow whose steps resolve the modules' services to perform these functionalities. + +Workflows ensure data consistency through their roll-back mechanism and tracking of each execution's status, steps, input, and output. + +### Example + +For example, consider you have two modules: + +1. A module that stores and manages brands in your application. +2. A module that integrates a third-party Content Management System (CMS). + +To sync brands from your application to the third-party system, create the following steps: + +```ts title="Example Steps" highlights={stepsHighlights} +const retrieveBrandsStep = createStep( + "retrieve-brands", + async (_, { container }) => { + const brandModuleService = container.resolve( + "brandModuleService" + ) + + const brands = await brandModuleService.listBrands() + + return new StepResponse(brands) + } +) + +const createBrandsInCmsStep = createStep( + "create-brands-in-cms", + async ({ brands }, { container }) => { + const cmsModuleService = container.resolve( + "cmsModuleService" + ) + + const cmsBrands = await cmsModuleService.createBrands(brands) + + return new StepResponse(cmsBrands, cmsBrands) + }, + async (brands, { container }) => { + const cmsModuleService = container.resolve( + "cmsModuleService" + ) + + await cmsModuleService.deleteBrands( + brands.map((brand) => brand.id) + ) + } +) +``` + +The `retrieveBrandsStep` retrieves the brands from a brand module, and the `createBrandsInCmsStep` creates the brands in a third-party system using a CMS module. + +Then, create the following workflow that uses these steps: + +```ts title="Example Workflow" +export const syncBrandsWorkflow = createWorkflow( + "sync-brands", + () => { + const brands = retrieveBrandsStep() + + createBrandsInCmsStep({ brands }) + } +) +``` + +You can then use this workflow in an API route, scheduled job, or other resources that use this functionality. # Multiple Services in a Module @@ -11185,6 +11185,169 @@ export default HelloModuleService ``` +# Module Options + +In this chapter, you’ll learn about passing options to your module from the Medusa application’s configurations and using them in the module’s resources. + +## What are Module Options? + +A module can receive options to customize or configure its functionality. For example, if you’re creating a module that integrates a third-party service, you’ll want to receive the integration credentials in the options rather than adding them directly in your code. + +*** + +## How to Pass Options to a Module? + +To pass options to a module, add an `options` property to the module’s configuration in `medusa-config.ts`. + +For example: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "./src/modules/hello", + options: { + capitalize: true, + }, + }, + ], +}) +``` + +The `options` property’s value is an object. You can pass any properties you want. + +### Pass Options to a Module in a Plugin + +If your module is part of a plugin, you can pass options to the module in the plugin’s configuration. + +For example: + +```ts title="medusa-config.ts" +import { defineConfig } from "@medusajs/framework/utils" +module.exports = defineConfig({ + plugins: [ + { + resolve: "@myorg/plugin-name", + options: { + capitalize: true, + }, + }, + ], +}) +``` + +The `options` property in the plugin configuration is passed to all modules in a plugin. + +*** + +## Access Module Options in Main Service + +The module’s main service receives the module options as a second parameter. + +For example: + +```ts title="src/modules/hello/service.ts" highlights={[["12"], ["14", "options?: ModuleOptions"], ["17"], ["18"], ["19"]]} +import { MedusaService } from "@medusajs/framework/utils" +import MyCustom from "./models/my-custom" + +// recommended to define type in another file +type ModuleOptions = { + capitalize?: boolean +} + +export default class HelloModuleService extends MedusaService({ + MyCustom, +}){ + protected options_: ModuleOptions + + constructor({}, options?: ModuleOptions) { + super(...arguments) + + this.options_ = options || { + capitalize: false, + } + } + + // ... +} +``` + +*** + +## Access Module Options in Loader + +The object that a module’s loaders receive as a parameter has an `options` property holding the module's options. + +For example: + +```ts title="src/modules/hello/loaders/hello-world.ts" highlights={[["11"], ["12", "ModuleOptions", "The type of expected module options."], ["16"]]} +import { + LoaderOptions, +} from "@medusajs/framework/types" + +// recommended to define type in another file +type ModuleOptions = { + capitalize?: boolean +} + +export default async function helloWorldLoader({ + options, +}: LoaderOptions) { + + console.log( + "[HELLO MODULE] Just started the Medusa application!", + options + ) +} +``` + +*** + +## Validate Module Options + +If you expect a certain option and want to throw an error if it's not provided or isn't valid, it's recommended to perform the validation in a loader. The module's service is only instantiated when it's used, whereas the loader runs the when the Medusa application starts. + +So, by performing the validation in the loader, you ensure you can throw an error at an early point, rather than when the module is used. + +For example, to validate that the Hello Module received an `apiKey` option, create the loader `src/modules/loaders/validate.ts`: + +```ts title="src/modules/hello/loaders/validate.ts" +import { LoaderOptions } from "@medusajs/framework/types" +import { MedusaError } from "@medusajs/framework/utils" + +// recommended to define type in another file +type ModuleOptions = { + apiKey?: string +} + +export default async function validationLoader({ + options, +}: LoaderOptions) { + if (!options.apiKey) { + throw new MedusaError( + MedusaError.Types.INVALID_DATA, + "Hello Module requires an apiKey option." + ) + } +} +``` + +Then, export the loader in the module's definition file, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/loaders/index.html.md): + +```ts title="src/modules/hello/index.ts" +// other imports... +import validationLoader from "./loaders/validate" + +export default Module("hello", { + // ... + loaders: [validationLoader], +}) +``` + +Now, when the Medusa application starts, the loader will run, validating the module's options and throwing an error if the `apiKey` option is missing. + + # Service Factory In this chapter, you’ll learn about what the service factory is and how to use it. @@ -11360,169 +11523,6 @@ export default HelloModuleService ``` -# Module Options - -In this chapter, you’ll learn about passing options to your module from the Medusa application’s configurations and using them in the module’s resources. - -## What are Module Options? - -A module can receive options to customize or configure its functionality. For example, if you’re creating a module that integrates a third-party service, you’ll want to receive the integration credentials in the options rather than adding them directly in your code. - -*** - -## How to Pass Options to a Module? - -To pass options to a module, add an `options` property to the module’s configuration in `medusa-config.ts`. - -For example: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "./src/modules/hello", - options: { - capitalize: true, - }, - }, - ], -}) -``` - -The `options` property’s value is an object. You can pass any properties you want. - -### Pass Options to a Module in a Plugin - -If your module is part of a plugin, you can pass options to the module in the plugin’s configuration. - -For example: - -```ts title="medusa-config.ts" -import { defineConfig } from "@medusajs/framework/utils" -module.exports = defineConfig({ - plugins: [ - { - resolve: "@myorg/plugin-name", - options: { - capitalize: true, - }, - }, - ], -}) -``` - -The `options` property in the plugin configuration is passed to all modules in a plugin. - -*** - -## Access Module Options in Main Service - -The module’s main service receives the module options as a second parameter. - -For example: - -```ts title="src/modules/hello/service.ts" highlights={[["12"], ["14", "options?: ModuleOptions"], ["17"], ["18"], ["19"]]} -import { MedusaService } from "@medusajs/framework/utils" -import MyCustom from "./models/my-custom" - -// recommended to define type in another file -type ModuleOptions = { - capitalize?: boolean -} - -export default class HelloModuleService extends MedusaService({ - MyCustom, -}){ - protected options_: ModuleOptions - - constructor({}, options?: ModuleOptions) { - super(...arguments) - - this.options_ = options || { - capitalize: false, - } - } - - // ... -} -``` - -*** - -## Access Module Options in Loader - -The object that a module’s loaders receive as a parameter has an `options` property holding the module's options. - -For example: - -```ts title="src/modules/hello/loaders/hello-world.ts" highlights={[["11"], ["12", "ModuleOptions", "The type of expected module options."], ["16"]]} -import { - LoaderOptions, -} from "@medusajs/framework/types" - -// recommended to define type in another file -type ModuleOptions = { - capitalize?: boolean -} - -export default async function helloWorldLoader({ - options, -}: LoaderOptions) { - - console.log( - "[HELLO MODULE] Just started the Medusa application!", - options - ) -} -``` - -*** - -## Validate Module Options - -If you expect a certain option and want to throw an error if it's not provided or isn't valid, it's recommended to perform the validation in a loader. The module's service is only instantiated when it's used, whereas the loader runs the when the Medusa application starts. - -So, by performing the validation in the loader, you ensure you can throw an error at an early point, rather than when the module is used. - -For example, to validate that the Hello Module received an `apiKey` option, create the loader `src/modules/loaders/validate.ts`: - -```ts title="src/modules/hello/loaders/validate.ts" -import { LoaderOptions } from "@medusajs/framework/types" -import { MedusaError } from "@medusajs/framework/utils" - -// recommended to define type in another file -type ModuleOptions = { - apiKey?: string -} - -export default async function validationLoader({ - options, -}: LoaderOptions) { - if (!options.apiKey) { - throw new MedusaError( - MedusaError.Types.INVALID_DATA, - "Hello Module requires an apiKey option." - ) - } -} -``` - -Then, export the loader in the module's definition file, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/modules/loaders/index.html.md): - -```ts title="src/modules/hello/index.ts" -// other imports... -import validationLoader from "./loaders/validate" - -export default Module("hello", { - // ... - loaders: [validationLoader], -}) -``` - -Now, when the Medusa application starts, the loader will run, validating the module's options and throwing an error if the `apiKey` option is missing. - - # Create a Plugin In this chapter, you'll learn how to create a Medusa plugin and publish it. @@ -11930,100 +11930,6 @@ So, it'll only execute 3 times, each every minute, then it won't be executed any If you restart the Medusa application, the scheduled job will be executed again until reaching the number of executions specified. -# Translate Medusa Admin - -The Medusa Admin supports multiple languages, with the default being English. In this documentation, you'll learn how to contribute to the community by translating the Medusa Admin to a language you're fluent in. - -{/* vale docs.We = NO */} - -You can contribute either by translating the admin to a new language, or fixing translations for existing languages. As we can't validate every language's translations, some translations may be incorrect. Your contribution is welcome to fix any translation errors you find. - -{/* vale docs.We = YES */} - -Check out the translated languages either in the admin dashboard's settings or on [GitHub](https://github.com/medusajs/medusa/blob/develop/packages/admin/dashboard/src/i18n/languages.ts). - -*** - -## How to Contribute Translation - -1. Clone the [Medusa monorepository](https://github.com/medusajs/medusa) to your local machine: - -```bash -git clone https://github.com/medusajs/medusa.git -``` - -If you already have it cloned, make sure to pull the latest changes from the `develop` branch. - -2. Install the monorepository's dependencies. Since it's a Yarn workspace, it's highly recommended to use yarn: - -```bash -yarn install -``` - -3. Create a branch that you'll use to open the pull request later: - -```bash -git checkout -b feat/translate- -``` - -Where `` is your language name. For example, `feat/translate-da`. - -4. Translation files are under `packages/admin/dashboard/src/i18n/translations` as JSON files whose names are the ISO-2 name of the language. - - If you're adding a new language, copy the file `packages/admin/dashboard/src/i18n/translations/en.json` and paste it with the ISO-2 name for your language. For example, if you're adding Danish translations, copy the `en.json` file and paste it as `packages/admin/dashboard/src/i18n/translations/de.json`. - - If you're fixing a translation, find the JSON file of the language under `packages/admin/dashboard/src/i18n/translations`. - -5. Start translating the keys in the JSON file (or updating the targeted ones). All keys in the JSON file must be translated, and your PR tests will fail otherwise. - - You can check whether the JSON file is valid by running the following command in `packages/admin/dashboard`, replacing `da.json` with the JSON file's name: - -```bash title="packages/admin/dashboard" -yarn i18n:validate da.json -``` - -6. After finishing the translation, if you're adding a new language, import its JSON file in `packages/admin/dashboard/src/i18n/translations/index.ts` and add it to the exported object: - -```ts title="packages/admin/dashboard/src/i18n/translations/index.ts" highlights={[["2"], ["6"], ["7"], ["8"]]} -// other imports... -import da from "./da.json" - -export default { - // other languages... - da: { - translation: da, - }, -} -``` - -The language's key in the object is the ISO-2 name of the language. - -7. If you're adding a new language, add it to the file `packages/admin/dashboard/src/i18n/languages.ts`: - -```ts title="packages/admin/dashboard/src/i18n/languages.ts" highlights={languageHighlights} -import { da } from "date-fns/locale" -// other imports... - -export const languages: Language[] = [ - // other languages... - { - code: "da", - display_name: "Danish", - ltr: true, - date_locale: da, - }, -] -``` - -`languages` is an array having the following properties: - -- `code`: The ISO-2 name of the language. For example, `da` for Danish. -- `display_name`: The language's name to be displayed in the admin. -- `ltr`: Whether the language supports a left-to-right layout. For example, set this to `false` for languages like Arabic. -- `date_locale`: An instance of the locale imported from the [date-fns/locale](https://date-fns.org/) package. - -8. Once you're done, push the changes into your branch and open a pull request on GitHub. - -Our team will perform a general review on your PR and merge it if no issues are found. The translation will be available in the admin after the next release. - - # Docs Contribution Guidelines Thank you for your interest in contributing to the documentation! You will be helping the open source community and other developers interested in learning more about Medusa and using it. @@ -12277,6 +12183,100 @@ console.log("This block can't use semi colons") ~~~ */} +# Translate Medusa Admin + +The Medusa Admin supports multiple languages, with the default being English. In this documentation, you'll learn how to contribute to the community by translating the Medusa Admin to a language you're fluent in. + +{/* vale docs.We = NO */} + +You can contribute either by translating the admin to a new language, or fixing translations for existing languages. As we can't validate every language's translations, some translations may be incorrect. Your contribution is welcome to fix any translation errors you find. + +{/* vale docs.We = YES */} + +Check out the translated languages either in the admin dashboard's settings or on [GitHub](https://github.com/medusajs/medusa/blob/develop/packages/admin/dashboard/src/i18n/languages.ts). + +*** + +## How to Contribute Translation + +1. Clone the [Medusa monorepository](https://github.com/medusajs/medusa) to your local machine: + +```bash +git clone https://github.com/medusajs/medusa.git +``` + +If you already have it cloned, make sure to pull the latest changes from the `develop` branch. + +2. Install the monorepository's dependencies. Since it's a Yarn workspace, it's highly recommended to use yarn: + +```bash +yarn install +``` + +3. Create a branch that you'll use to open the pull request later: + +```bash +git checkout -b feat/translate- +``` + +Where `` is your language name. For example, `feat/translate-da`. + +4. Translation files are under `packages/admin/dashboard/src/i18n/translations` as JSON files whose names are the ISO-2 name of the language. + - If you're adding a new language, copy the file `packages/admin/dashboard/src/i18n/translations/en.json` and paste it with the ISO-2 name for your language. For example, if you're adding Danish translations, copy the `en.json` file and paste it as `packages/admin/dashboard/src/i18n/translations/de.json`. + - If you're fixing a translation, find the JSON file of the language under `packages/admin/dashboard/src/i18n/translations`. + +5. Start translating the keys in the JSON file (or updating the targeted ones). All keys in the JSON file must be translated, and your PR tests will fail otherwise. + - You can check whether the JSON file is valid by running the following command in `packages/admin/dashboard`, replacing `da.json` with the JSON file's name: + +```bash title="packages/admin/dashboard" +yarn i18n:validate da.json +``` + +6. After finishing the translation, if you're adding a new language, import its JSON file in `packages/admin/dashboard/src/i18n/translations/index.ts` and add it to the exported object: + +```ts title="packages/admin/dashboard/src/i18n/translations/index.ts" highlights={[["2"], ["6"], ["7"], ["8"]]} +// other imports... +import da from "./da.json" + +export default { + // other languages... + da: { + translation: da, + }, +} +``` + +The language's key in the object is the ISO-2 name of the language. + +7. If you're adding a new language, add it to the file `packages/admin/dashboard/src/i18n/languages.ts`: + +```ts title="packages/admin/dashboard/src/i18n/languages.ts" highlights={languageHighlights} +import { da } from "date-fns/locale" +// other imports... + +export const languages: Language[] = [ + // other languages... + { + code: "da", + display_name: "Danish", + ltr: true, + date_locale: da, + }, +] +``` + +`languages` is an array having the following properties: + +- `code`: The ISO-2 name of the language. For example, `da` for Danish. +- `display_name`: The language's name to be displayed in the admin. +- `ltr`: Whether the language supports a left-to-right layout. For example, set this to `false` for languages like Arabic. +- `date_locale`: An instance of the locale imported from the [date-fns/locale](https://date-fns.org/) package. + +8. Once you're done, push the changes into your branch and open a pull request on GitHub. + +Our team will perform a general review on your PR and merge it if no issues are found. The translation will be available in the admin after the next release. + + # Access Workflow Errors In this chapter, you’ll learn how to access errors that occur during a workflow’s execution. @@ -13152,6 +13152,136 @@ const step1 = createStep( ``` +# Execute Another Workflow + +In this chapter, you'll learn how to execute a workflow in another. + +## Execute in a Workflow + +To execute a workflow in another, use the `runAsStep` method that every workflow has. + +For example: + +```ts highlights={workflowsHighlights} collapsibleLines="1-7" expandMoreButton="Show Imports" +import { + createWorkflow, +} from "@medusajs/framework/workflows-sdk" +import { + createProductsWorkflow, +} from "@medusajs/medusa/core-flows" + +const workflow = createWorkflow( + "hello-world", + async (input) => { + const products = createProductsWorkflow.runAsStep({ + input: { + products: [ + // ... + ], + }, + }) + + // ... + } +) +``` + +Instead of invoking the workflow and passing it the container, you use its `runAsStep` method and pass it an object as a parameter. + +The object has an `input` property to pass input to the workflow. + +*** + +## Preparing Input Data + +If you need to perform some data manipulation to prepare the other workflow's input data, use `transform` from the Workflows SDK. + +Learn about transform in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/variable-manipulation/index.html.md). + +For example: + +```ts highlights={transformHighlights} collapsibleLines="1-12" +import { + createWorkflow, + transform, +} from "@medusajs/framework/workflows-sdk" +import { + createProductsWorkflow, +} from "@medusajs/medusa/core-flows" + +type WorkflowInput = { + title: string +} + +const workflow = createWorkflow( + "hello-product", + async (input: WorkflowInput) => { + const createProductsData = transform({ + input, + }, (data) => [ + { + title: `Hello ${data.input.title}`, + }, + ]) + + const products = createProductsWorkflow.runAsStep({ + input: { + products: createProductsData, + }, + }) + + // ... + } +) +``` + +In this example, you use the `transform` function to prepend `Hello` to the title of the product. Then, you pass the result as an input to the `createProductsWorkflow`. + +*** + +## Run Workflow Conditionally + +To run a workflow in another based on a condition, use when-then from the Workflows SDK. + +Learn about when-then in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/conditions/index.html.md). + +For example: + +```ts highlights={whenHighlights} collapsibleLines="1-16" +import { + createWorkflow, + when, +} from "@medusajs/framework/workflows-sdk" +import { + createProductsWorkflow, +} from "@medusajs/medusa/core-flows" +import { + CreateProductWorkflowInputDTO, +} from "@medusajs/framework/types" + +type WorkflowInput = { + product?: CreateProductWorkflowInputDTO + should_create?: boolean +} + +const workflow = createWorkflow( + "hello-product", + async (input: WorkflowInput) => { + const product = when(input, ({ should_create }) => should_create) + .then(() => { + return createProductsWorkflow.runAsStep({ + input: { + products: [input.product], + }, + }) + }) + } +) +``` + +In this example, you use when-then to run the `createProductsWorkflow` only if `should_create` (passed in the `input`) is enabled. + + # Long-Running Workflows In this chapter, you’ll learn what a long-running workflow is and how to configure it. @@ -13440,190 +13570,6 @@ To find a full example of a long-running workflow, refer to the [restaurant-deli In the recipe, you use a long-running workflow that moves an order from placed to completed. The workflow waits for the restaurant to accept the order, the driver to pick up the order, and other external actions. -# Execute Another Workflow - -In this chapter, you'll learn how to execute a workflow in another. - -## Execute in a Workflow - -To execute a workflow in another, use the `runAsStep` method that every workflow has. - -For example: - -```ts highlights={workflowsHighlights} collapsibleLines="1-7" expandMoreButton="Show Imports" -import { - createWorkflow, -} from "@medusajs/framework/workflows-sdk" -import { - createProductsWorkflow, -} from "@medusajs/medusa/core-flows" - -const workflow = createWorkflow( - "hello-world", - async (input) => { - const products = createProductsWorkflow.runAsStep({ - input: { - products: [ - // ... - ], - }, - }) - - // ... - } -) -``` - -Instead of invoking the workflow and passing it the container, you use its `runAsStep` method and pass it an object as a parameter. - -The object has an `input` property to pass input to the workflow. - -*** - -## Preparing Input Data - -If you need to perform some data manipulation to prepare the other workflow's input data, use `transform` from the Workflows SDK. - -Learn about transform in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/variable-manipulation/index.html.md). - -For example: - -```ts highlights={transformHighlights} collapsibleLines="1-12" -import { - createWorkflow, - transform, -} from "@medusajs/framework/workflows-sdk" -import { - createProductsWorkflow, -} from "@medusajs/medusa/core-flows" - -type WorkflowInput = { - title: string -} - -const workflow = createWorkflow( - "hello-product", - async (input: WorkflowInput) => { - const createProductsData = transform({ - input, - }, (data) => [ - { - title: `Hello ${data.input.title}`, - }, - ]) - - const products = createProductsWorkflow.runAsStep({ - input: { - products: createProductsData, - }, - }) - - // ... - } -) -``` - -In this example, you use the `transform` function to prepend `Hello` to the title of the product. Then, you pass the result as an input to the `createProductsWorkflow`. - -*** - -## Run Workflow Conditionally - -To run a workflow in another based on a condition, use when-then from the Workflows SDK. - -Learn about when-then in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/conditions/index.html.md). - -For example: - -```ts highlights={whenHighlights} collapsibleLines="1-16" -import { - createWorkflow, - when, -} from "@medusajs/framework/workflows-sdk" -import { - createProductsWorkflow, -} from "@medusajs/medusa/core-flows" -import { - CreateProductWorkflowInputDTO, -} from "@medusajs/framework/types" - -type WorkflowInput = { - product?: CreateProductWorkflowInputDTO - should_create?: boolean -} - -const workflow = createWorkflow( - "hello-product", - async (input: WorkflowInput) => { - const product = when(input, ({ should_create }) => should_create) - .then(() => { - return createProductsWorkflow.runAsStep({ - input: { - products: [input.product], - }, - }) - }) - } -) -``` - -In this example, you use when-then to run the `createProductsWorkflow` only if `should_create` (passed in the `input`) is enabled. - - -# Run Workflow Steps in Parallel - -In this chapter, you’ll learn how to run workflow steps in parallel. - -## parallelize Utility Function - -If your workflow has steps that don’t rely on one another’s results, run them in parallel using `parallelize` from the Workflows SDK. - -The workflow waits until all steps passed to the `parallelize` function finish executing before continuing to the next step. - -For example: - -```ts highlights={highlights} collapsibleLines="1-12" expandButtonLabel="Show Imports" -import { - createWorkflow, - WorkflowResponse, - parallelize, -} from "@medusajs/framework/workflows-sdk" -import { - createProductStep, - getProductStep, - createPricesStep, - attachProductToSalesChannelStep, -} from "./steps" - -interface WorkflowInput { - title: string -} - -const myWorkflow = createWorkflow( - "my-workflow", - (input: WorkflowInput) => { - const product = createProductStep(input) - - const [prices, productSalesChannel] = parallelize( - createPricesStep(product), - attachProductToSalesChannelStep(product) - ) - - const id = product.id - const refetchedProduct = getProductStep(product.id) - - return new WorkflowResponse(refetchedProduct) - } -) -``` - -The `parallelize` function accepts the steps to run in parallel as a parameter. - -It returns an array of the steps' results in the same order they're passed to the `parallelize` function. - -So, `prices` is the result of `createPricesStep`, and `productSalesChannel` is the result of `attachProductToSalesChannelStep`. - - # Multiple Step Usage in Workflow In this chapter, you'll learn how to use a step multiple times in a workflow. @@ -13698,214 +13644,58 @@ The `config` method accepts an object with a `name` property. Its value is a new The first `useQueryGraphStep` usage has the ID `use-query-graph`, and the second `useQueryGraphStep` usage has the ID `fetch-customers`. -# Retry Failed Steps +# Run Workflow Steps in Parallel -In this chapter, you’ll learn how to configure steps to allow retrial on failure. +In this chapter, you’ll learn how to run workflow steps in parallel. -## Configure a Step’s Retrial +## parallelize Utility Function -By default, when an error occurs in a step, the step and the workflow fail, and the execution stops. +If your workflow has steps that don’t rely on one another’s results, run them in parallel using `parallelize` from the Workflows SDK. -You can configure the step to retry on failure. The `createStep` function can accept a configuration object instead of the step’s name as a first parameter. +The workflow waits until all steps passed to the `parallelize` function finish executing before continuing to the next step. For example: -```ts title="src/workflows/hello-world.ts" highlights={[["10"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - createStep, +```ts highlights={highlights} collapsibleLines="1-12" expandButtonLabel="Show Imports" +import { createWorkflow, WorkflowResponse, + parallelize, } from "@medusajs/framework/workflows-sdk" +import { + createProductStep, + getProductStep, + createPricesStep, + attachProductToSalesChannelStep, +} from "./steps" -const step1 = createStep( - { - name: "step-1", - maxRetries: 2, - }, - async () => { - console.log("Executing step 1") - - throw new Error("Oops! Something happened.") - } -) +interface WorkflowInput { + title: string +} const myWorkflow = createWorkflow( - "hello-world", - function () { - const str1 = step1() + "my-workflow", + (input: WorkflowInput) => { + const product = createProductStep(input) - return new WorkflowResponse({ - message: str1, - }) -}) + const [prices, productSalesChannel] = parallelize( + createPricesStep(product), + attachProductToSalesChannelStep(product) + ) -export default myWorkflow -``` + const id = product.id + const refetchedProduct = getProductStep(product.id) -The step’s configuration object accepts a `maxRetries` property, which is a number indicating the number of times a step can be retried when it fails. - -When you execute the above workflow, you’ll see the following result in the terminal: - -```bash -Executing step 1 -Executing step 1 -Executing step 1 -error: Oops! Something happened. -Error: Oops! Something happened. -``` - -The first line indicates the first time the step was executed, and the next two lines indicate the times the step was retried. After that, the step and workflow fail. - -*** - -## Step Retry Intervals - -By default, a step is retried immediately after it fails. To specify a wait time before a step is retried, pass a `retryInterval` property to the step's configuration object. Its value is a number of seconds to wait before retrying the step. - -For example: - -```ts title="src/workflows/hello-world.ts" highlights={[["5"]]} -const step1 = createStep( - { - name: "step-1", - maxRetries: 2, - retryInterval: 2, // 2 seconds - }, - async () => { - // ... - } + return new WorkflowResponse(refetchedProduct) + } ) ``` -### Interval Changes Workflow to Long-Running +The `parallelize` function accepts the steps to run in parallel as a parameter. -By setting `retryInterval` on a step, a workflow becomes a [long-running workflow](https://docs.medusajs.com/learn/fundamentals/workflows/long-running-workflow/index.html.md) that runs asynchronously in the background. So, you won't receive its result or errors immediately when you execute the workflow. +It returns an array of the steps' results in the same order they're passed to the `parallelize` function. -Instead, you must subscribe to the workflow's execution using the Workflow Engine Module Service. Learn more about it in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/long-running-workflow#access-long-running-workflow-status-and-result/index.html.md). - - -# Workflow Hooks - -In this chapter, you'll learn what a workflow hook is and how to consume them. - -## What is a Workflow Hook? - -A workflow hook is a point in a workflow where you can inject custom functionality as a step function, called a hook handler. - -Medusa exposes hooks in many of its workflows that are used in its API routes. You can consume those hooks to add your custom logic. - -Refer to the [Workflows Reference](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md) to view all workflows and their hooks. - -You want to perform a custom action during a workflow's execution, such as when a product is created. - -*** - -## How to Consume a Hook? - -A workflow has a special `hooks` property which is an object that holds its hooks. - -So, in a TypeScript or JavaScript file created under the `src/workflows/hooks` directory: - -- Import the workflow. -- Access its hook using the `hooks` property. -- Pass the hook a step function as a parameter to consume it. - -For example, to consume the `productsCreated` hook of Medusa's `createProductsWorkflow`, create the file `src/workflows/hooks/product-created.ts` with the following content: - -```ts title="src/workflows/hooks/product-created.ts" highlights={handlerHighlights} -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -createProductsWorkflow.hooks.productsCreated( - async ({ products }, { container }) => { - // TODO perform an action - } -) -``` - -The `productsCreated` hook is available on the workflow's `hooks` property by its name. - -You invoke the hook, passing a step function (the hook handler) as a parameter. - -Now, when a product is created using the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts), your hook handler is executed after the product is created. - -A hook can have only one handler. - -Refer to the [createProductsWorkflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md) to see at which point the hook handler is executed. - -### Hook Handler Parameter - -Since a hook handler is essentially a step function, it receives the hook's input as a first parameter, and an object holding a `container` property as a second parameter. - -Each hook has different input. For example, the `productsCreated` hook receives an object having a `products` property holding the created product. - -### Hook Handler Compensation - -Since the hook handler is a step function, you can set its compensation function as a second parameter of the hook. - -For example: - -```ts title="src/workflows/hooks/product-created.ts" -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -createProductsWorkflow.hooks.productsCreated( - async ({ products }, { container }) => { - // TODO perform an action - - return new StepResponse(undefined, { ids }) - }, - async ({ ids }, { container }) => { - // undo the performed action - } -) -``` - -The compensation function is executed if an error occurs in the workflow to undo the actions performed by the hook handler. - -The compensation function receives as an input the second parameter passed to the `StepResponse` returned by the step function. - -It also accepts as a second parameter an object holding a `container` property to resolve resources from the Medusa container. - -### Additional Data Property - -Medusa's workflows pass in the hook's input an `additional_data` property: - -```ts title="src/workflows/hooks/product-created.ts" highlights={[["4", "additional_data"]]} -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -createProductsWorkflow.hooks.productsCreated( - async ({ products, additional_data }, { container }) => { - // TODO perform an action - } -) -``` - -This property is an object that holds additional data passed to the workflow through the request sent to the API route using the workflow. - -Learn how to pass `additional_data` in requests to API routes in [this chapter](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md). - -### Pass Additional Data to Workflow - -You can also pass that additional data when executing the workflow. Pass it as a parameter to the `.run` method of the workflow: - -```ts title="src/workflows/hooks/product-created.ts" highlights={[["10", "additional_data"]]} -import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" -import { createProductsWorkflow } from "@medusajs/medusa/core-flows" - -export async function POST(req: MedusaRequest, res: MedusaResponse) { - await createProductsWorkflow(req.scope).run({ - input: { - products: [ - // ... - ], - additional_data: { - custom_field: "test", - }, - }, - }) -} -``` - -Your hook handler then receives that passed data in the `additional_data` object. +So, `prices` is the result of `createPricesStep`, and `productSalesChannel` is the result of `attachProductToSalesChannelStep`. # Store Workflow Executions @@ -14053,6 +13843,92 @@ if (workflowExecution.state === "failed") { Other state values include `done`, `invoking`, and `compensating`. +# Retry Failed Steps + +In this chapter, you’ll learn how to configure steps to allow retrial on failure. + +## Configure a Step’s Retrial + +By default, when an error occurs in a step, the step and the workflow fail, and the execution stops. + +You can configure the step to retry on failure. The `createStep` function can accept a configuration object instead of the step’s name as a first parameter. + +For example: + +```ts title="src/workflows/hello-world.ts" highlights={[["10"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + createStep, + createWorkflow, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" + +const step1 = createStep( + { + name: "step-1", + maxRetries: 2, + }, + async () => { + console.log("Executing step 1") + + throw new Error("Oops! Something happened.") + } +) + +const myWorkflow = createWorkflow( + "hello-world", + function () { + const str1 = step1() + + return new WorkflowResponse({ + message: str1, + }) +}) + +export default myWorkflow +``` + +The step’s configuration object accepts a `maxRetries` property, which is a number indicating the number of times a step can be retried when it fails. + +When you execute the above workflow, you’ll see the following result in the terminal: + +```bash +Executing step 1 +Executing step 1 +Executing step 1 +error: Oops! Something happened. +Error: Oops! Something happened. +``` + +The first line indicates the first time the step was executed, and the next two lines indicate the times the step was retried. After that, the step and workflow fail. + +*** + +## Step Retry Intervals + +By default, a step is retried immediately after it fails. To specify a wait time before a step is retried, pass a `retryInterval` property to the step's configuration object. Its value is a number of seconds to wait before retrying the step. + +For example: + +```ts title="src/workflows/hello-world.ts" highlights={[["5"]]} +const step1 = createStep( + { + name: "step-1", + maxRetries: 2, + retryInterval: 2, // 2 seconds + }, + async () => { + // ... + } +) +``` + +### Interval Changes Workflow to Long-Running + +By setting `retryInterval` on a step, a workflow becomes a [long-running workflow](https://docs.medusajs.com/learn/fundamentals/workflows/long-running-workflow/index.html.md) that runs asynchronously in the background. So, you won't receive its result or errors immediately when you execute the workflow. + +Instead, you must subscribe to the workflow's execution using the Workflow Engine Module Service. Learn more about it in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/long-running-workflow#access-long-running-workflow-status-and-result/index.html.md). + + # Variable Manipulation in Workflows with transform In this chapter, you'll learn how to use `transform` from the Workflows SDK to manipulate variables in a workflow. @@ -14258,90 +14134,128 @@ const myWorkflow = createWorkflow( ``` -# Workflow Timeout +# Workflow Hooks -In this chapter, you’ll learn how to set a timeout for workflows and steps. +In this chapter, you'll learn what a workflow hook is and how to consume them. -## What is a Workflow Timeout? +## What is a Workflow Hook? -By default, a workflow doesn’t have a timeout. It continues execution until it’s finished or an error occurs. +A workflow hook is a point in a workflow where you can inject custom functionality as a step function, called a hook handler. -You can configure a workflow’s timeout to indicate how long the workflow can execute. If a workflow's execution time passes the configured timeout, it is failed and an error is thrown. +Medusa exposes hooks in many of its workflows that are used in its API routes. You can consume those hooks to add your custom logic. -### Timeout Doesn't Stop Step Execution +Refer to the [Workflows Reference](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md) to view all workflows and their hooks. -Configuring a timeout doesn't stop the execution of a step in progress. The timeout only affects the status of the workflow and its result. +You want to perform a custom action during a workflow's execution, such as when a product is created. *** -## Configure Workflow Timeout +## How to Consume a Hook? -The `createWorkflow` function can accept a configuration object instead of the workflow’s name. +A workflow has a special `hooks` property which is an object that holds its hooks. -In the configuration object, you pass a `timeout` property, whose value is a number indicating the timeout in seconds. +So, in a TypeScript or JavaScript file created under the `src/workflows/hooks` directory: -For example: +- Import the workflow. +- Access its hook using the `hooks` property. +- Pass the hook a step function as a parameter to consume it. -```ts title="src/workflows/hello-world.ts" highlights={[["16"]]} collapsibleLines="1-13" expandButtonLabel="Show More" -import { - createStep, - createWorkflow, - WorkflowResponse, -} from "@medusajs/framework/workflows-sdk" +For example, to consume the `productsCreated` hook of Medusa's `createProductsWorkflow`, create the file `src/workflows/hooks/product-created.ts` with the following content: -const step1 = createStep( - "step-1", - async () => { - // ... +```ts title="src/workflows/hooks/product-created.ts" highlights={handlerHighlights} +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +createProductsWorkflow.hooks.productsCreated( + async ({ products }, { container }) => { + // TODO perform an action } ) - -const myWorkflow = createWorkflow({ - name: "hello-world", - timeout: 2, // 2 seconds -}, function () { - const str1 = step1() - - return new WorkflowResponse({ - message: str1, - }) -}) - -export default myWorkflow - ``` -This workflow's executions fail if they run longer than two seconds. +The `productsCreated` hook is available on the workflow's `hooks` property by its name. -A workflow’s timeout error is returned in the `errors` property of the workflow’s execution, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/access-workflow-errors/index.html.md). The error’s name is `TransactionTimeoutError`. +You invoke the hook, passing a step function (the hook handler) as a parameter. -*** +Now, when a product is created using the [Create Product API route](https://docs.medusajs.com/api/admin#products_postproducts), your hook handler is executed after the product is created. -## Configure Step Timeout +A hook can have only one handler. -Alternatively, you can configure the timeout for a step rather than the entire workflow. +Refer to the [createProductsWorkflow reference](https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow/index.html.md) to see at which point the hook handler is executed. -As mentioned in the previous section, the timeout doesn't stop the execution of the step. It only affects the step's status and output. +### Hook Handler Parameter -The step’s configuration object accepts a `timeout` property, whose value is a number indicating the timeout in seconds. +Since a hook handler is essentially a step function, it receives the hook's input as a first parameter, and an object holding a `container` property as a second parameter. + +Each hook has different input. For example, the `productsCreated` hook receives an object having a `products` property holding the created product. + +### Hook Handler Compensation + +Since the hook handler is a step function, you can set its compensation function as a second parameter of the hook. For example: -```tsx -const step1 = createStep( - { - name: "step-1", - timeout: 2, // 2 seconds +```ts title="src/workflows/hooks/product-created.ts" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +createProductsWorkflow.hooks.productsCreated( + async ({ products }, { container }) => { + // TODO perform an action + + return new StepResponse(undefined, { ids }) }, - async () => { - // ... + async ({ ids }, { container }) => { + // undo the performed action } ) ``` -This step's executions fail if they run longer than two seconds. +The compensation function is executed if an error occurs in the workflow to undo the actions performed by the hook handler. -A step’s timeout error is returned in the `errors` property of the workflow’s execution, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/access-workflow-errors/index.html.md). The error’s name is `TransactionStepTimeoutError`. +The compensation function receives as an input the second parameter passed to the `StepResponse` returned by the step function. + +It also accepts as a second parameter an object holding a `container` property to resolve resources from the Medusa container. + +### Additional Data Property + +Medusa's workflows pass in the hook's input an `additional_data` property: + +```ts title="src/workflows/hooks/product-created.ts" highlights={[["4", "additional_data"]]} +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +createProductsWorkflow.hooks.productsCreated( + async ({ products, additional_data }, { container }) => { + // TODO perform an action + } +) +``` + +This property is an object that holds additional data passed to the workflow through the request sent to the API route using the workflow. + +Learn how to pass `additional_data` in requests to API routes in [this chapter](https://docs.medusajs.com/learn/fundamentals/api-routes/additional-data/index.html.md). + +### Pass Additional Data to Workflow + +You can also pass that additional data when executing the workflow. Pass it as a parameter to the `.run` method of the workflow: + +```ts title="src/workflows/hooks/product-created.ts" highlights={[["10", "additional_data"]]} +import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http" +import { createProductsWorkflow } from "@medusajs/medusa/core-flows" + +export async function POST(req: MedusaRequest, res: MedusaResponse) { + await createProductsWorkflow(req.scope).run({ + input: { + products: [ + // ... + ], + additional_data: { + custom_field: "test", + }, + }, + }) +} +``` + +Your hook handler then receives that passed data in the `additional_data` object. # Example: Write Integration Tests for API Routes @@ -14910,6 +14824,92 @@ const response = await api.post(`/custom`, form, { ``` +# Workflow Timeout + +In this chapter, you’ll learn how to set a timeout for workflows and steps. + +## What is a Workflow Timeout? + +By default, a workflow doesn’t have a timeout. It continues execution until it’s finished or an error occurs. + +You can configure a workflow’s timeout to indicate how long the workflow can execute. If a workflow's execution time passes the configured timeout, it is failed and an error is thrown. + +### Timeout Doesn't Stop Step Execution + +Configuring a timeout doesn't stop the execution of a step in progress. The timeout only affects the status of the workflow and its result. + +*** + +## Configure Workflow Timeout + +The `createWorkflow` function can accept a configuration object instead of the workflow’s name. + +In the configuration object, you pass a `timeout` property, whose value is a number indicating the timeout in seconds. + +For example: + +```ts title="src/workflows/hello-world.ts" highlights={[["16"]]} collapsibleLines="1-13" expandButtonLabel="Show More" +import { + createStep, + createWorkflow, + WorkflowResponse, +} from "@medusajs/framework/workflows-sdk" + +const step1 = createStep( + "step-1", + async () => { + // ... + } +) + +const myWorkflow = createWorkflow({ + name: "hello-world", + timeout: 2, // 2 seconds +}, function () { + const str1 = step1() + + return new WorkflowResponse({ + message: str1, + }) +}) + +export default myWorkflow + +``` + +This workflow's executions fail if they run longer than two seconds. + +A workflow’s timeout error is returned in the `errors` property of the workflow’s execution, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/access-workflow-errors/index.html.md). The error’s name is `TransactionTimeoutError`. + +*** + +## Configure Step Timeout + +Alternatively, you can configure the timeout for a step rather than the entire workflow. + +As mentioned in the previous section, the timeout doesn't stop the execution of the step. It only affects the step's status and output. + +The step’s configuration object accepts a `timeout` property, whose value is a number indicating the timeout in seconds. + +For example: + +```tsx +const step1 = createStep( + { + name: "step-1", + timeout: 2, // 2 seconds + }, + async () => { + // ... + } +) +``` + +This step's executions fail if they run longer than two seconds. + +A step’s timeout error is returned in the `errors` property of the workflow’s execution, as explained in [this chapter](https://docs.medusajs.com/learn/fundamentals/workflows/access-workflow-errors/index.html.md). The error’s name is `TransactionStepTimeoutError`. + + # Example: Integration Tests for a Module In this chapter, find an example of writing an integration test for a module using [moduleIntegrationTestRunner](https://docs.medusajs.com/learn/debugging-and-testing/testing-tools/modules-tests/index.html.md) from Medusa's Testing Framework. @@ -16462,6 +16462,160 @@ Medusa provides the following payment providers out-of-the-box. You can use them *** +# Product Module + +In this section of the documentation, you will find resources to learn more about the Product Module and how to use it in your application. + +Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/products/index.html.md) to learn how to manage products using the dashboard. + +Medusa has product related features available out-of-the-box through the Product Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in commerce modules, such as this Product Module. + +Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). + +## Product Features + +- [Products Management](https://docs.medusajs.com/references/product/models/Product/index.html.md): Store and manage products. Products have custom options, such as color or size, and each variant in the product sets the value for these options. +- [Product Organization](https://docs.medusajs.com/references/product/models/index.html.md): The Product Module provides different data models used to organize products, including categories, collections, tags, and more. +- [Bundled and Multi-Part Products](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/inventory-kit/index.html.md): Create and manage inventory kits for a single product, allowing you to implement use cases like bundled or multi-part products. + +*** + +## How to Use the Product Module + +In your Medusa application, you build flows around commerce modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. + +You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. + +For example: + +```ts title="src/workflows/create-product.ts" highlights={highlights} +import { + createWorkflow, + WorkflowResponse, + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" + +const createProductStep = createStep( + "create-product", + async ({}, { container }) => { + const productService = container.resolve(Modules.PRODUCT) + + const product = await productService.createProducts({ + title: "Medusa Shirt", + options: [ + { + title: "Color", + values: ["Black", "White"], + }, + ], + variants: [ + { + title: "Black Shirt", + options: { + Color: "Black", + }, + }, + ], + }) + + return new StepResponse({ product }, product.id) + }, + async (productId, { container }) => { + if (!productId) { + return + } + const productService = container.resolve(Modules.PRODUCT) + + await productService.deleteProducts([productId]) + } +) + +export const createProductWorkflow = createWorkflow( + "create-product", + () => { + const { product } = createProductStep() + + return new WorkflowResponse({ + product, + }) + } +) +``` + +You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: + +### API Route + +```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { createProductWorkflow } from "../../workflows/create-product" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await createProductWorkflow(req.scope) + .run() + + res.send(result) +} +``` + +### Subscriber + +```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { createProductWorkflow } from "../workflows/create-product" + +export default async function handleUserCreated({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const { result } = await createProductWorkflow(container) + .run() + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "user.created", +} +``` + +### Scheduled Job + +```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} +import { MedusaContainer } from "@medusajs/framework/types" +import { createProductWorkflow } from "../workflows/create-product" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await createProductWorkflow(container) + .run() + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: `0 0 * * *`, +} +``` + +Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). + +*** + + # Pricing Module In this section of the documentation, you will find resources to learn more about the Pricing Module and how to use it in your application. @@ -16759,160 +16913,6 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** -# Product Module - -In this section of the documentation, you will find resources to learn more about the Product Module and how to use it in your application. - -Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/products/index.html.md) to learn how to manage products using the dashboard. - -Medusa has product related features available out-of-the-box through the Product Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in commerce modules, such as this Product Module. - -Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). - -## Product Features - -- [Products Management](https://docs.medusajs.com/references/product/models/Product/index.html.md): Store and manage products. Products have custom options, such as color or size, and each variant in the product sets the value for these options. -- [Product Organization](https://docs.medusajs.com/references/product/models/index.html.md): The Product Module provides different data models used to organize products, including categories, collections, tags, and more. -- [Bundled and Multi-Part Products](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/inventory-kit/index.html.md): Create and manage inventory kits for a single product, allowing you to implement use cases like bundled or multi-part products. - -*** - -## How to Use the Product Module - -In your Medusa application, you build flows around commerce modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. - -You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. - -For example: - -```ts title="src/workflows/create-product.ts" highlights={highlights} -import { - createWorkflow, - WorkflowResponse, - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" - -const createProductStep = createStep( - "create-product", - async ({}, { container }) => { - const productService = container.resolve(Modules.PRODUCT) - - const product = await productService.createProducts({ - title: "Medusa Shirt", - options: [ - { - title: "Color", - values: ["Black", "White"], - }, - ], - variants: [ - { - title: "Black Shirt", - options: { - Color: "Black", - }, - }, - ], - }) - - return new StepResponse({ product }, product.id) - }, - async (productId, { container }) => { - if (!productId) { - return - } - const productService = container.resolve(Modules.PRODUCT) - - await productService.deleteProducts([productId]) - } -) - -export const createProductWorkflow = createWorkflow( - "create-product", - () => { - const { product } = createProductStep() - - return new WorkflowResponse({ - product, - }) - } -) -``` - -You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: - -### API Route - -```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { createProductWorkflow } from "../../workflows/create-product" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await createProductWorkflow(req.scope) - .run() - - res.send(result) -} -``` - -### Subscriber - -```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { createProductWorkflow } from "../workflows/create-product" - -export default async function handleUserCreated({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const { result } = await createProductWorkflow(container) - .run() - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "user.created", -} -``` - -### Scheduled Job - -```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} -import { MedusaContainer } from "@medusajs/framework/types" -import { createProductWorkflow } from "../workflows/create-product" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await createProductWorkflow(container) - .run() - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: `0 0 * * *`, -} -``` - -Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). - -*** - - # Sales Channel Module In this section of the documentation, you will find resources to learn more about the Sales Channel Module and how to use it in your application. @@ -17351,150 +17351,6 @@ Learn more about workflows in [this documentation](https://docs.medusajs.com/doc *** -# Tax Module - -In this section of the documentation, you will find resources to learn more about the Tax Module and how to use it in your application. - -Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/tax-regions/index.html.md) to learn how to manage tax regions using the dashboard. - -Medusa has tax related features available out-of-the-box through the Tax Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in commerce modules, such as this Tax Module. - -Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). - -## Tax Features - -- [Tax Settings Per Region](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/tax-region/index.html.md): Set different tax settings for each tax region. -- [Tax Rates and Rules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/tax-rates-and-rules/index.html.md): Manage each region's default tax rates and override them with conditioned tax rates. -- [Retrieve Tax Lines for carts and orders](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/tax-calculation-with-provider/index.html.md): Calculate and retrieve the tax lines of a cart or order's line items and shipping methods with tax providers. - -*** - -## How to Use Tax Module's Service - -In your Medusa application, you build flows around commerce modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. - -You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. - -For example: - -```ts title="src/workflows/create-tax-region.ts" highlights={highlights} -import { - createWorkflow, - WorkflowResponse, - createStep, - StepResponse, -} from "@medusajs/framework/workflows-sdk" -import { Modules } from "@medusajs/framework/utils" - -const createTaxRegionStep = createStep( - "create-tax-region", - async ({}, { container }) => { - const taxModuleService = container.resolve(Modules.TAX) - - const taxRegion = await taxModuleService.createTaxRegions({ - country_code: "us", - }) - - return new StepResponse({ taxRegion }, taxRegion.id) - }, - async (taxRegionId, { container }) => { - if (!taxRegionId) { - return - } - const taxModuleService = container.resolve(Modules.TAX) - - await taxModuleService.deleteTaxRegions([taxRegionId]) - } -) - -export const createTaxRegionWorkflow = createWorkflow( - "create-tax-region", - () => { - const { taxRegion } = createTaxRegionStep() - - return new WorkflowResponse({ taxRegion }) - } -) -``` - -You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: - -### API Route - -```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import type { - MedusaRequest, - MedusaResponse, -} from "@medusajs/framework/http" -import { createTaxRegionWorkflow } from "../../workflows/create-tax-region" - -export async function GET( - req: MedusaRequest, - res: MedusaResponse -) { - const { result } = await createTaxRegionWorkflow(req.scope) - .run() - - res.send(result) -} -``` - -### Subscriber - -```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" -import { - type SubscriberConfig, - type SubscriberArgs, -} from "@medusajs/framework" -import { createTaxRegionWorkflow } from "../workflows/create-tax-region" - -export default async function handleUserCreated({ - event: { data }, - container, -}: SubscriberArgs<{ id: string }>) { - const { result } = await createTaxRegionWorkflow(container) - .run() - - console.log(result) -} - -export const config: SubscriberConfig = { - event: "user.created", -} -``` - -### Scheduled Job - -```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} -import { MedusaContainer } from "@medusajs/framework/types" -import { createTaxRegionWorkflow } from "../workflows/create-tax-region" - -export default async function myCustomJob( - container: MedusaContainer -) { - const { result } = await createTaxRegionWorkflow(container) - .run() - - console.log(result) -} - -export const config = { - name: "run-once-a-day", - schedule: `0 0 * * *`, -} -``` - -Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). - -*** - -## Configure Tax Module - -The Tax Module accepts options for further configurations. Refer to [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/module-options/index.html.md) for details on the module's options. - -*** - - # User Module In this section of the documentation, you will find resources to learn more about the User Module and how to use it in your application. @@ -17642,32 +17498,148 @@ The User Module accepts options for further configurations. Refer to [this docum *** -# API Key Concepts +# Tax Module -In this document, you’ll learn about the different types of API keys, their expiration and verification. +In this section of the documentation, you will find resources to learn more about the Tax Module and how to use it in your application. -## API Key Types +Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/tax-regions/index.html.md) to learn how to manage tax regions using the dashboard. -There are two types of API keys: +Medusa has tax related features available out-of-the-box through the Tax Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in commerce modules, such as this Tax Module. -- `publishable`: A public key used in client applications, such as a storefront. -- `secret`: A secret key used for authentication and verification purposes, such as an admin user’s authentication token or a password reset token. +Learn more about why modules are isolated in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md). -The API key’s type is stored in the `type` property of the [ApiKey data model](https://docs.medusajs.com/references/api-key/models/ApiKey/index.html.md). +## Tax Features + +- [Tax Settings Per Region](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/tax-region/index.html.md): Set different tax settings for each tax region. +- [Tax Rates and Rules](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/tax-rates-and-rules/index.html.md): Manage each region's default tax rates and override them with conditioned tax rates. +- [Retrieve Tax Lines for carts and orders](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/tax-calculation-with-provider/index.html.md): Calculate and retrieve the tax lines of a cart or order's line items and shipping methods with tax providers. *** -## API Key Expiration +## How to Use Tax Module's Service -An API key expires when it’s revoked using the [revoke method of the module’s main service](https://docs.medusajs.com/references/api-key/revoke/index.html.md). +In your Medusa application, you build flows around commerce modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and reliable roll-back mechanism. -The associated token is no longer usable or verifiable. +You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package. + +For example: + +```ts title="src/workflows/create-tax-region.ts" highlights={highlights} +import { + createWorkflow, + WorkflowResponse, + createStep, + StepResponse, +} from "@medusajs/framework/workflows-sdk" +import { Modules } from "@medusajs/framework/utils" + +const createTaxRegionStep = createStep( + "create-tax-region", + async ({}, { container }) => { + const taxModuleService = container.resolve(Modules.TAX) + + const taxRegion = await taxModuleService.createTaxRegions({ + country_code: "us", + }) + + return new StepResponse({ taxRegion }, taxRegion.id) + }, + async (taxRegionId, { container }) => { + if (!taxRegionId) { + return + } + const taxModuleService = container.resolve(Modules.TAX) + + await taxModuleService.deleteTaxRegions([taxRegionId]) + } +) + +export const createTaxRegionWorkflow = createWorkflow( + "create-tax-region", + () => { + const { taxRegion } = createTaxRegionStep() + + return new WorkflowResponse({ taxRegion }) + } +) +``` + +You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers: + +### API Route + +```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import type { + MedusaRequest, + MedusaResponse, +} from "@medusajs/framework/http" +import { createTaxRegionWorkflow } from "../../workflows/create-tax-region" + +export async function GET( + req: MedusaRequest, + res: MedusaResponse +) { + const { result } = await createTaxRegionWorkflow(req.scope) + .run() + + res.send(result) +} +``` + +### Subscriber + +```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports" +import { + type SubscriberConfig, + type SubscriberArgs, +} from "@medusajs/framework" +import { createTaxRegionWorkflow } from "../workflows/create-tax-region" + +export default async function handleUserCreated({ + event: { data }, + container, +}: SubscriberArgs<{ id: string }>) { + const { result } = await createTaxRegionWorkflow(container) + .run() + + console.log(result) +} + +export const config: SubscriberConfig = { + event: "user.created", +} +``` + +### Scheduled Job + +```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]} +import { MedusaContainer } from "@medusajs/framework/types" +import { createTaxRegionWorkflow } from "../workflows/create-tax-region" + +export default async function myCustomJob( + container: MedusaContainer +) { + const { result } = await createTaxRegionWorkflow(container) + .run() + + console.log(result) +} + +export const config = { + name: "run-once-a-day", + schedule: `0 0 * * *`, +} +``` + +Learn more about workflows in [this documentation](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md). *** -## Token Verification +## Configure Tax Module -To verify a token received as an input or in a request, use the [authenticate method of the module’s main service](https://docs.medusajs.com/references/api-key/authenticate/index.html.md) which validates the token against all non-expired tokens. +The Tax Module accepts options for further configurations. Refer to [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/module-options/index.html.md) for details on the module's options. + +*** # Promotion Module @@ -17914,6 +17886,89 @@ createRemoteLinkStep({ ``` +# API Key Concepts + +In this document, you’ll learn about the different types of API keys, their expiration and verification. + +## API Key Types + +There are two types of API keys: + +- `publishable`: A public key used in client applications, such as a storefront. +- `secret`: A secret key used for authentication and verification purposes, such as an admin user’s authentication token or a password reset token. + +The API key’s type is stored in the `type` property of the [ApiKey data model](https://docs.medusajs.com/references/api-key/models/ApiKey/index.html.md). + +*** + +## API Key Expiration + +An API key expires when it’s revoked using the [revoke method of the module’s main service](https://docs.medusajs.com/references/api-key/revoke/index.html.md). + +The associated token is no longer usable or verifiable. + +*** + +## Token Verification + +To verify a token received as an input or in a request, use the [authenticate method of the module’s main service](https://docs.medusajs.com/references/api-key/authenticate/index.html.md) which validates the token against all non-expired tokens. + + +# Links between Currency Module and Other Modules + +This document showcases the module links defined between the Currency Module and other commerce modules. + +## Summary + +The Currency Module has the following links to other modules: + +Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. + +- [`Currency` data model of Store Module \<> `Currency` data model of Currency Module](#store-module). (Read-only). + +*** + +## Store Module + +The Store Module has a `Currency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol. + +Instead, Medusa defines a read-only link between the Currency Module's `Currency` data model and the [Store Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/store/index.html.md)'s `Currency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the `Currency` data model in the Store Module. + +### Retrieve with Query + +To retrieve the details of a store's currencies with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `supported_currencies.currency.*` in `fields`: + +### query.graph + +```ts +const { data: stores } = await query.graph({ + entity: "store", + fields: [ + "supported_currencies.currency.*", + ], +}) + +// stores.supported_currencies +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: stores } = useQueryGraphStep({ + entity: "store", + fields: [ + "supported_currencies.currency.*", + ], +}) + +// stores.supported_currencies +``` + + # Cart Concepts In this document, you’ll get an overview of the main concepts of a cart. @@ -18506,61 +18561,6 @@ await cartModuleService.setShippingMethodAdjustments( ``` -# Links between Currency Module and Other Modules - -This document showcases the module links defined between the Currency Module and other commerce modules. - -## Summary - -The Currency Module has the following links to other modules: - -Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. - -- [`Currency` data model of Store Module \<> `Currency` data model of Currency Module](#store-module). (Read-only). - -*** - -## Store Module - -The Store Module has a `Currency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol. - -Instead, Medusa defines a read-only link between the Currency Module's `Currency` data model and the [Store Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/store/index.html.md)'s `Currency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the `Currency` data model in the Store Module. - -### Retrieve with Query - -To retrieve the details of a store's currencies with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `supported_currencies.currency.*` in `fields`: - -### query.graph - -```ts -const { data: stores } = await query.graph({ - entity: "store", - fields: [ - "supported_currencies.currency.*", - ], -}) - -// stores.supported_currencies -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: stores } = useQueryGraphStep({ - entity: "store", - fields: [ - "supported_currencies.currency.*", - ], -}) - -// stores.supported_currencies -``` - - # Tax Lines in Cart Module In this document, you’ll learn about tax lines in a cart and how to retrieve tax lines with the Tax Module. @@ -18907,54 +18907,6 @@ For example, if you have a custom module with a `Manager` data model, you can au Learn how to create a custom actor type in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/create-actor-type/index.html.md). -# Auth Providers - -In this document, you’ll learn how the Auth Module handles authentication using providers. - -## What's an Auth Module Provider? - -An auth module provider handles authenticating customers and users, either using custom logic or by integrating a third-party service. - -For example, the EmailPass Auth Module Provider authenticates a user using their email and password, whereas the Google Auth Module Provider authenticates users using their Google account. - -### Auth Providers List - -- [Emailpass](https://docs.medusajs.com/commerce-modules/auth/auth-providers/emailpass/index.html.md) -- [Google](https://docs.medusajs.com/commerce-modules/auth/auth-providers/google/index.html.md) -- [GitHub](https://docs.medusajs.com/commerce-modules/auth/auth-providers/github/index.html.md) - -*** - -## Configure Allowed Auth Providers of Actor Types - -By default, users of all actor types can authenticate with all installed auth module providers. - -To restrict the auth providers used for actor types, use the [authMethodsPerActor option](https://docs.medusajs.com/references/medusa-config#http-authMethodsPerActor-1-3/index.html.md) in Medusa's configurations: - -```ts title="medusa-config.ts" -module.exports = defineConfig({ - projectConfig: { - http: { - authMethodsPerActor: { - user: ["google"], - customer: ["emailpass"], - }, - // ... - }, - // ... - }, -}) -``` - -When you specify the `authMethodsPerActor` configuration, it overrides the default. So, if you don't specify any providers for an actor type, users of that actor type can't authenticate with any provider. - -*** - -## How to Create an Auth Module Provider - -Refer to [this guide](https://docs.medusajs.com/references/auth/provider/index.html.md) to learn how to create an auth module provider. - - # How to Use Authentication Routes In this document, you'll learn about the authentication routes and how to use them to create and log-in users, and reset their password. @@ -19299,6 +19251,54 @@ If the authentication is successful, the request returns an object with a `succe ``` +# Auth Providers + +In this document, you’ll learn how the Auth Module handles authentication using providers. + +## What's an Auth Module Provider? + +An auth module provider handles authenticating customers and users, either using custom logic or by integrating a third-party service. + +For example, the EmailPass Auth Module Provider authenticates a user using their email and password, whereas the Google Auth Module Provider authenticates users using their Google account. + +### Auth Providers List + +- [Emailpass](https://docs.medusajs.com/commerce-modules/auth/auth-providers/emailpass/index.html.md) +- [Google](https://docs.medusajs.com/commerce-modules/auth/auth-providers/google/index.html.md) +- [GitHub](https://docs.medusajs.com/commerce-modules/auth/auth-providers/github/index.html.md) + +*** + +## Configure Allowed Auth Providers of Actor Types + +By default, users of all actor types can authenticate with all installed auth module providers. + +To restrict the auth providers used for actor types, use the [authMethodsPerActor option](https://docs.medusajs.com/references/medusa-config#http-authMethodsPerActor-1-3/index.html.md) in Medusa's configurations: + +```ts title="medusa-config.ts" +module.exports = defineConfig({ + projectConfig: { + http: { + authMethodsPerActor: { + user: ["google"], + customer: ["emailpass"], + }, + // ... + }, + // ... + }, +}) +``` + +When you specify the `authMethodsPerActor` configuration, it overrides the default. So, if you don't specify any providers for an actor type, users of that actor type can't authenticate with any provider. + +*** + +## How to Create an Auth Module Provider + +Refer to [this guide](https://docs.medusajs.com/references/auth/provider/index.html.md) to learn how to create an auth module provider. + + # How to Create an Actor Type In this document, learn how to create an actor type and authenticate its associated data model. @@ -19692,6 +19692,72 @@ In the workflow, you: You can use this workflow when deleting a manager, such as in an API route. +# Auth Module Options + +In this document, you'll learn about the options of the Auth Module. + +## providers + +The `providers` option is an array of auth module providers. + +When the Medusa application starts, these providers are registered and can be used to handle authentication. + +By default, the `emailpass` provider is registered to authenticate customers and admin users. + +For example: + +```ts title="medusa-config.ts" +import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" + +// ... + +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "@medusajs/medusa/auth", + dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], + options: { + providers: [ + { + resolve: "@medusajs/medusa/auth-emailpass", + id: "emailpass", + options: { + // provider options... + }, + }, + ], + }, + }, + ], +}) +``` + +The `providers` option is an array of objects that accept the following properties: + +- `resolve`: A string indicating the package name of the module provider or the path to it relative to the `src` directory. +- `id`: A string indicating the provider's unique name or ID. +- `options`: An optional object of the module provider's options. + +*** + +## Auth CORS + +The Medusa application's authentication API routes are defined under the `/auth` prefix that requires setting the `authCors` property of the `http` configuration. + +By default, the Medusa application you created will have an `AUTH_CORS` environment variable, which is used as the value of `authCors`. + +Refer to [Medusa's configuration guide](https://docs.medusajs.com/references/medusa-config#authCors/index.html.md) to learn more about the `authCors` configuration. + +*** + +## authMethodsPerActor Configuration + +The Medusa application's configuration accept an `authMethodsPerActor` configuration which restricts the allowed auth providers used with an actor type. + +Learn more about the `authMethodsPerActor` configuration in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers#configure-allowed-auth-providers-of-actor-types/index.html.md). + + # How to Handle Password Reset Token Event In this guide, you'll learn how to handle the `auth.password_reset` event, which is emitted when a request is sent to the [Generate Reset Password Token API route](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/authentication-route#generate-reset-password-token-route/index.html.md). @@ -19806,72 +19872,6 @@ The page shows the user password fields to enter their new password, then submit - [Storefront Guide: Reset Customer Password](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/reset-password/index.html.md) -# Auth Module Options - -In this document, you'll learn about the options of the Auth Module. - -## providers - -The `providers` option is an array of auth module providers. - -When the Medusa application starts, these providers are registered and can be used to handle authentication. - -By default, the `emailpass` provider is registered to authenticate customers and admin users. - -For example: - -```ts title="medusa-config.ts" -import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" - -// ... - -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "@medusajs/medusa/auth", - dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], - options: { - providers: [ - { - resolve: "@medusajs/medusa/auth-emailpass", - id: "emailpass", - options: { - // provider options... - }, - }, - ], - }, - }, - ], -}) -``` - -The `providers` option is an array of objects that accept the following properties: - -- `resolve`: A string indicating the package name of the module provider or the path to it relative to the `src` directory. -- `id`: A string indicating the provider's unique name or ID. -- `options`: An optional object of the module provider's options. - -*** - -## Auth CORS - -The Medusa application's authentication API routes are defined under the `/auth` prefix that requires setting the `authCors` property of the `http` configuration. - -By default, the Medusa application you created will have an `AUTH_CORS` environment variable, which is used as the value of `authCors`. - -Refer to [Medusa's configuration guide](https://docs.medusajs.com/references/medusa-config#authCors/index.html.md) to learn more about the `authCors` configuration. - -*** - -## authMethodsPerActor Configuration - -The Medusa application's configuration accept an `authMethodsPerActor` configuration which restricts the allowed auth providers used with an actor type. - -Learn more about the `authMethodsPerActor` configuration in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/auth/auth-providers#configure-allowed-auth-providers-of-actor-types/index.html.md). - - # Customer Accounts In this document, you’ll learn how registered and unregistered accounts are distinguished in the Medusa application. @@ -20070,6 +20070,33 @@ const { data: customers } = useQueryGraphStep({ ``` +# Fulfillment Module Provider + +In this document, you’ll learn what a fulfillment module provider is. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/locations-and-shipping/locations#manage-fulfillment-providers/index.html.md) to learn how to add a fulfillment provider to a location using the dashboard. + +## What’s a Fulfillment Module Provider? + +A fulfillment module provider handles fulfilling items, typically using a third-party integration. + +Fulfillment module providers registered in the Fulfillment Module's [options](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/module-options/index.html.md) are stored and represented by the [FulfillmentProvider data model](https://docs.medusajs.com/references/fulfillment/models/FulfillmentProvider/index.html.md). + +*** + +## Configure Fulfillment Providers + +The Fulfillment Module accepts a `providers` option that allows you to register providers in your application. + +Learn more about the `providers` option in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/module-options/index.html.md). + +*** + +## How to Create a Fulfillment Provider? + +Refer to [this guide](https://docs.medusajs.com/references/fulfillment/provider/index.html.md) to learn how to create a fulfillment module provider. + + # Fulfillment Concepts In this document, you’ll learn about some basic fulfillment concepts. @@ -20116,31 +20143,57 @@ A shipping profile defines a type of items that are shipped in a similar manner. A shipping profile is represented by the [ShippingProfile data model](https://docs.medusajs.com/references/fulfillment/models/ShippingProfile/index.html.md). It only defines the profile’s details, but it’s associated with the shipping options available for the item type. -# Fulfillment Module Provider +# Item Fulfillment -In this document, you’ll learn what a fulfillment module provider is. +In this document, you’ll learn about the concepts of item fulfillment. -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/locations-and-shipping/locations#manage-fulfillment-providers/index.html.md) to learn how to add a fulfillment provider to a location using the dashboard. +## Fulfillment Data Model -## What’s a Fulfillment Module Provider? - -A fulfillment module provider handles fulfilling items, typically using a third-party integration. - -Fulfillment module providers registered in the Fulfillment Module's [options](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/module-options/index.html.md) are stored and represented by the [FulfillmentProvider data model](https://docs.medusajs.com/references/fulfillment/models/FulfillmentProvider/index.html.md). +A fulfillment is the shipping and delivery of one or more items to the customer. It’s represented by the [Fulfillment data model](https://docs.medusajs.com/references/fulfillment/models/Fulfillment/index.html.md). *** -## Configure Fulfillment Providers +## Fulfillment Processing by a Fulfillment Provider -The Fulfillment Module accepts a `providers` option that allows you to register providers in your application. +A fulfillment is associated with a fulfillment provider that handles all its processing, such as creating a shipment for the fulfillment’s items. -Learn more about the `providers` option in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/module-options/index.html.md). +The fulfillment is also associated with a shipping option of that provider, which determines how the item is shipped. + +![A diagram showcasing the relation between a fulfillment, fulfillment provider, and shipping option](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331947/Medusa%20Resources/fulfillment-shipping-option_jk9ndp.jpg) *** -## How to Create a Fulfillment Provider? +## data Property -Refer to [this guide](https://docs.medusajs.com/references/fulfillment/provider/index.html.md) to learn how to create a fulfillment module provider. +The `Fulfillment` data model has a `data` property that holds any necessary data for the third-party fulfillment provider to process the fulfillment. + +For example, the `data` property can hold the ID of the fulfillment in the third-party provider. The associated fulfillment provider then uses it whenever it retrieves the fulfillment’s details. + +*** + +## Fulfillment Items + +A fulfillment is used to fulfill one or more items. Each item is represented by the `FulfillmentItem` data model. + +The fulfillment item holds details relevant to fulfilling the item, such as barcode, SKU, and quantity to fulfill. + +![A diagram showcasing the relation between fulfillment and fulfillment items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712332114/Medusa%20Resources/fulfillment-item_etzxb0.jpg) + +*** + +## Fulfillment Label + +Once a shipment is created for the fulfillment, you can store its tracking number, URL, or other related details as a label, represented by the `FulfillmentLabel` data model. + +*** + +## Fulfillment Status + +The `Fulfillment` data model has three properties to keep track of the current status of the fulfillment: + +- `packed_at`: The date the fulfillment was packed. If set, then the fulfillment has been packed. +- `shipped_at`: The date the fulfillment was shipped. If set, then the fulfillment has been shipped. +- `delivered_at`: The date the fulfillment was delivered. If set, then the fulfillment has been delivered. # Links between Fulfillment Module and Other Modules @@ -20501,59 +20554,6 @@ createRemoteLinkStep({ ``` -# Item Fulfillment - -In this document, you’ll learn about the concepts of item fulfillment. - -## Fulfillment Data Model - -A fulfillment is the shipping and delivery of one or more items to the customer. It’s represented by the [Fulfillment data model](https://docs.medusajs.com/references/fulfillment/models/Fulfillment/index.html.md). - -*** - -## Fulfillment Processing by a Fulfillment Provider - -A fulfillment is associated with a fulfillment provider that handles all its processing, such as creating a shipment for the fulfillment’s items. - -The fulfillment is also associated with a shipping option of that provider, which determines how the item is shipped. - -![A diagram showcasing the relation between a fulfillment, fulfillment provider, and shipping option](https://res.cloudinary.com/dza7lstvk/image/upload/v1712331947/Medusa%20Resources/fulfillment-shipping-option_jk9ndp.jpg) - -*** - -## data Property - -The `Fulfillment` data model has a `data` property that holds any necessary data for the third-party fulfillment provider to process the fulfillment. - -For example, the `data` property can hold the ID of the fulfillment in the third-party provider. The associated fulfillment provider then uses it whenever it retrieves the fulfillment’s details. - -*** - -## Fulfillment Items - -A fulfillment is used to fulfill one or more items. Each item is represented by the `FulfillmentItem` data model. - -The fulfillment item holds details relevant to fulfilling the item, such as barcode, SKU, and quantity to fulfill. - -![A diagram showcasing the relation between fulfillment and fulfillment items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712332114/Medusa%20Resources/fulfillment-item_etzxb0.jpg) - -*** - -## Fulfillment Label - -Once a shipment is created for the fulfillment, you can store its tracking number, URL, or other related details as a label, represented by the `FulfillmentLabel` data model. - -*** - -## Fulfillment Status - -The `Fulfillment` data model has three properties to keep track of the current status of the fulfillment: - -- `packed_at`: The date the fulfillment was packed. If set, then the fulfillment has been packed. -- `shipped_at`: The date the fulfillment was shipped. If set, then the fulfillment has been shipped. -- `delivered_at`: The date the fulfillment was delivered. If set, then the fulfillment has been delivered. - - # Fulfillment Module Options In this document, you'll learn about the options of the Fulfillment Module. @@ -20767,6 +20767,145 @@ This flow is implemented within the [confirmReturnReceiveWorkflow](https://docs. If a returned item is considered damaged or is dismissed, its quantity doesn't increment the `stocked_quantity` of the inventory item's level. +# Links between Inventory Module and Other Modules + +This document showcases the module links defined between the Inventory Module and other commerce modules. + +## Summary + +The Inventory Module has the following links to other modules: + +Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. + +- [`ProductVariant` data model of Product Module \<> `InventoryItem` data model](#product-module). +- [`InventoryLevel` data model \<> `StockLocation` data model of Stock Location Module](#stock-location-module). (Read-only). + +*** + +## Product Module + +Each product variant has different inventory details. Medusa defines a link between the `ProductVariant` and `InventoryItem` data models. + +![A diagram showcasing an example of how data models from the Inventory and Product Module are linked.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709658720/Medusa%20Resources/inventory-product_ejnray.jpg) + +A product variant whose `manage_inventory` property is enabled has an associated inventory item. Through that inventory's items relations in the Inventory Module, you can manage and check the variant's inventory quantity. + +Learn more about product variant's inventory management in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/product/variant-inventory/index.html.md). + +### Retrieve with Query + +To retrieve the product variants of an inventory item with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `variants.*` in `fields`: + +### query.graph + +```ts +const { data: inventoryItems } = await query.graph({ + entity: "inventory_item", + fields: [ + "variants.*", + ], +}) + +// inventoryItems.variants +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: inventoryItems } = useQueryGraphStep({ + entity: "inventory_item", + fields: [ + "variants.*", + ], +}) + +// inventoryItems.variants +``` + +### Manage with Link + +To manage the variants of an inventory item, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.PRODUCT]: { + variant_id: "variant_123", + }, + [Modules.INVENTORY]: { + inventory_item_id: "iitem_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.PRODUCT]: { + variant_id: "variant_123", + }, + [Modules.INVENTORY]: { + inventory_item_id: "iitem_123", + }, +}) +``` + +*** + +## Stock Location Module + +Medusa defines a read-only link between the `InventoryLevel` data model and the [Stock Location Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/stock-location/index.html.md)'s `StockLocation` data model. This means you can retrieve the details of an inventory level's stock locations, but you don't manage the links in a pivot table in the database. The stock location of an inventory level is determined by the `location_id` property of the `InventoryLevel` data model. + +### Retrieve with Query + +To retrieve the stock locations of an inventory level with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `stock_locations.*` in `fields`: + +### query.graph + +```ts +const { data: inventoryLevels } = await query.graph({ + entity: "inventory_level", + fields: [ + "stock_locations.*", + ], +}) + +// inventoryLevels.stock_locations +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: inventoryLevels } = useQueryGraphStep({ + entity: "inventory_level", + fields: [ + "stock_locations.*", + ], +}) + +// inventoryLevels.stock_locations +``` + + # Inventory Kits In this guide, you'll learn how inventory kits can be used in the Medusa application to support use cases like multi-part products, bundled products, and shared inventory across products. @@ -21155,143 +21294,53 @@ The bundled product has the same inventory items as those of the products part o You can now [execute the workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows#3-execute-the-workflow/index.html.md) in [API routes](https://docs.medusajs.com/docs/learn/fundamentals/api-routes/index.html.md), [scheduled jobs](https://docs.medusajs.com/docs/learn/fundamentals/scheduled-jobs/index.html.md), or [subscribers](https://docs.medusajs.com/docs/learn/fundamentals/events-and-subscribers/index.html.md). -# Links between Inventory Module and Other Modules +# Order Concepts -This document showcases the module links defined between the Inventory Module and other commerce modules. +In this document, you’ll learn about orders and related concepts -## Summary +## Order Items -The Inventory Module has the following links to other modules: +The items purchased in the order are represented by the [OrderItem data model](https://docs.medusajs.com/references/order/models/OrderItem/index.html.md). An order can have multiple items. -Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. +![A diagram showcasing the relation between an order and its items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712304722/Medusa%20Resources/order-order-items_uvckxd.jpg) -- [`ProductVariant` data model of Product Module \<> `InventoryItem` data model](#product-module). -- [`InventoryLevel` data model \<> `StockLocation` data model of Stock Location Module](#stock-location-module). (Read-only). +### Item’s Product Details + +The details of the purchased products are represented by the [LineItem data model](https://docs.medusajs.com/references/order/models/OrderLineItem/index.html.md). Not only does a line item hold the details of the product, but also details related to its price, adjustments due to promotions, and taxes. *** -## Product Module +## Order’s Shipping Method -Each product variant has different inventory details. Medusa defines a link between the `ProductVariant` and `InventoryItem` data models. +An order has one or more shipping methods used to handle item shipment. -![A diagram showcasing an example of how data models from the Inventory and Product Module are linked.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709658720/Medusa%20Resources/inventory-product_ejnray.jpg) +Each shipping method is represented by the [OrderShippingMethod data model](https://docs.medusajs.com/references/order/models/OrderShippingMethod/index.html.md) that holds its details. The shipping method is linked to the order through the [OrderShipping data model](https://docs.medusajs.com/references/order/models/OrderShipping/index.html.md). -A product variant whose `manage_inventory` property is enabled has an associated inventory item. Through that inventory's items relations in the Inventory Module, you can manage and check the variant's inventory quantity. +![A diagram showcasing the relation between an order and its items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1719570409/Medusa%20Resources/order-shipping-method_tkggvd.jpg) -Learn more about product variant's inventory management in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/product/variant-inventory/index.html.md). +### data Property -### Retrieve with Query +When fulfilling the order, you can use a third-party fulfillment provider that requires additional custom data to be passed along from the order creation process. -To retrieve the product variants of an inventory item with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `variants.*` in `fields`: +The `OrderShippingMethod` data model has a `data` property. It’s an object used to store custom data relevant later for fulfillment. -### query.graph - -```ts -const { data: inventoryItems } = await query.graph({ - entity: "inventory_item", - fields: [ - "variants.*", - ], -}) - -// inventoryItems.variants -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: inventoryItems } = useQueryGraphStep({ - entity: "inventory_item", - fields: [ - "variants.*", - ], -}) - -// inventoryItems.variants -``` - -### Manage with Link - -To manage the variants of an inventory item, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.PRODUCT]: { - variant_id: "variant_123", - }, - [Modules.INVENTORY]: { - inventory_item_id: "iitem_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.PRODUCT]: { - variant_id: "variant_123", - }, - [Modules.INVENTORY]: { - inventory_item_id: "iitem_123", - }, -}) -``` +The Medusa application passes the `data` property to the Fulfillment Module when fulfilling items. *** -## Stock Location Module +## Order Totals -Medusa defines a read-only link between the `InventoryLevel` data model and the [Stock Location Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/stock-location/index.html.md)'s `StockLocation` data model. This means you can retrieve the details of an inventory level's stock locations, but you don't manage the links in a pivot table in the database. The stock location of an inventory level is determined by the `location_id` property of the `InventoryLevel` data model. +The order’s total amounts (including tax total, total after an item is returned, etc…) are represented by the [OrderSummary data model](https://docs.medusajs.com/references/order/models/OrderSummary/index.html.md). -### Retrieve with Query +*** -To retrieve the stock locations of an inventory level with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `stock_locations.*` in `fields`: +## Order Payments -### query.graph +Payments made on an order, whether they’re capture or refund payments, are recorded as transactions represented by the [OrderTransaction data model](https://docs.medusajs.com/references/order/models/OrderTransaction/index.html.md). -```ts -const { data: inventoryLevels } = await query.graph({ - entity: "inventory_level", - fields: [ - "stock_locations.*", - ], -}) +An order can have multiple transactions. The sum of these transactions must be equal to the order summary’s total. Otherwise, there’s an outstanding amount. -// inventoryLevels.stock_locations -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: inventoryLevels } = useQueryGraphStep({ - entity: "inventory_level", - fields: [ - "stock_locations.*", - ], -}) - -// inventoryLevels.stock_locations -``` +Learn more about transactions in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/transactions/index.html.md). # Order Claim @@ -21348,59 +21397,6 @@ The [Transaction data model](https://docs.medusajs.com/references/order/models/O When a claim is confirmed, the order’s version is incremented. -# Order Exchange - -In this document, you’ll learn about order exchanges. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/orders/exchanges/index.html.md) to learn how to manage an order's exchanges using the dashboard. - -## What is an Exchange? - -An exchange is the replacement of an item that the customer ordered with another. - -A merchant creates the exchange, specifying the items to be replaced and the new items to be sent. - -The [OrderExchange data model](https://docs.medusajs.com/references/order/models/OrderExchange/index.html.md) represents an exchange. - -*** - -## Returned and New Items - -When the exchange is created, a return, represented by the [Return data model](https://docs.medusajs.com/references/order/models/Return/index.html.md), is created to handle receiving the items back from the customer. - -Learn more about returns in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return/index.html.md). - -The [OrderExchangeItem data model](https://docs.medusajs.com/references/order/models/OrderExchangeItem/index.html.md) represents the new items to be sent to the customer. - -*** - -## Exchange Shipping Methods - -An exchange has shipping methods used to send the new items to the customer. They’re represented by the [OrderShippingMethod data model](https://docs.medusajs.com/references/order/models/OrderShippingMethod/index.html.md). - -The shipping methods for the returned items are associated with the exchange's return, as explained in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return#return-shipping-methods/index.html.md). - -*** - -## Exchange Payment - -The `Exchange` data model has a `difference_due` property that stores the outstanding amount. - -|Condition|Result| -|---|---|---| -|\`difference\_due \< 0\`|Merchant owes the customer a refund of the | -|\`difference\_due > 0\`|Merchant requires additional payment from the customer of the | -|\`difference\_due = 0\`|No payment processing is required.| - -Any payment or refund made is stored in the [Transaction data model](https://docs.medusajs.com/references/order/models/OrderTransaction/index.html.md). - -*** - -## How Exchanges Impact an Order’s Version - -When an exchange is confirmed, the order’s version is incremented. - - # Order Edit In this document, you'll learn about order edits. @@ -21458,53 +21454,209 @@ Once the Order Edit is confirmed, any additional payment or refund required can This is determined by the comparison between the `OrderSummary` and the order's transactions, as mentioned in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/transactions#checking-outstanding-amount/index.html.md). -# Order Concepts +# Order Exchange -In this document, you’ll learn about orders and related concepts +In this document, you’ll learn about order exchanges. -## Order Items +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/orders/exchanges/index.html.md) to learn how to manage an order's exchanges using the dashboard. -The items purchased in the order are represented by the [OrderItem data model](https://docs.medusajs.com/references/order/models/OrderItem/index.html.md). An order can have multiple items. +## What is an Exchange? -![A diagram showcasing the relation between an order and its items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1712304722/Medusa%20Resources/order-order-items_uvckxd.jpg) +An exchange is the replacement of an item that the customer ordered with another. -### Item’s Product Details +A merchant creates the exchange, specifying the items to be replaced and the new items to be sent. -The details of the purchased products are represented by the [LineItem data model](https://docs.medusajs.com/references/order/models/OrderLineItem/index.html.md). Not only does a line item hold the details of the product, but also details related to its price, adjustments due to promotions, and taxes. +The [OrderExchange data model](https://docs.medusajs.com/references/order/models/OrderExchange/index.html.md) represents an exchange. *** -## Order’s Shipping Method +## Returned and New Items -An order has one or more shipping methods used to handle item shipment. +When the exchange is created, a return, represented by the [Return data model](https://docs.medusajs.com/references/order/models/Return/index.html.md), is created to handle receiving the items back from the customer. -Each shipping method is represented by the [OrderShippingMethod data model](https://docs.medusajs.com/references/order/models/OrderShippingMethod/index.html.md) that holds its details. The shipping method is linked to the order through the [OrderShipping data model](https://docs.medusajs.com/references/order/models/OrderShipping/index.html.md). +Learn more about returns in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return/index.html.md). -![A diagram showcasing the relation between an order and its items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1719570409/Medusa%20Resources/order-shipping-method_tkggvd.jpg) - -### data Property - -When fulfilling the order, you can use a third-party fulfillment provider that requires additional custom data to be passed along from the order creation process. - -The `OrderShippingMethod` data model has a `data` property. It’s an object used to store custom data relevant later for fulfillment. - -The Medusa application passes the `data` property to the Fulfillment Module when fulfilling items. +The [OrderExchangeItem data model](https://docs.medusajs.com/references/order/models/OrderExchangeItem/index.html.md) represents the new items to be sent to the customer. *** -## Order Totals +## Exchange Shipping Methods -The order’s total amounts (including tax total, total after an item is returned, etc…) are represented by the [OrderSummary data model](https://docs.medusajs.com/references/order/models/OrderSummary/index.html.md). +An exchange has shipping methods used to send the new items to the customer. They’re represented by the [OrderShippingMethod data model](https://docs.medusajs.com/references/order/models/OrderShippingMethod/index.html.md). + +The shipping methods for the returned items are associated with the exchange's return, as explained in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/return#return-shipping-methods/index.html.md). *** -## Order Payments +## Exchange Payment -Payments made on an order, whether they’re capture or refund payments, are recorded as transactions represented by the [OrderTransaction data model](https://docs.medusajs.com/references/order/models/OrderTransaction/index.html.md). +The `Exchange` data model has a `difference_due` property that stores the outstanding amount. -An order can have multiple transactions. The sum of these transactions must be equal to the order summary’s total. Otherwise, there’s an outstanding amount. +|Condition|Result| +|---|---|---| +|\`difference\_due \< 0\`|Merchant owes the customer a refund of the | +|\`difference\_due > 0\`|Merchant requires additional payment from the customer of the | +|\`difference\_due = 0\`|No payment processing is required.| -Learn more about transactions in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/transactions/index.html.md). +Any payment or refund made is stored in the [Transaction data model](https://docs.medusajs.com/references/order/models/OrderTransaction/index.html.md). + +*** + +## How Exchanges Impact an Order’s Version + +When an exchange is confirmed, the order’s version is incremented. + + +# Order Versioning + +In this document, you’ll learn how an order and its details are versioned. + +## What's Versioning? + +Versioning means assigning a version number to a record, such as an order and its items. This is useful to view the different versions of the order following changes in its lifetime. + +When changes are made on an order, such as an item is added or returned, the order's version changes. + +*** + +## version Property + +The `Order` and `OrderSummary` data models have a `version` property that indicates the current version. By default, its value is `1`. + +Other order-related data models, such as `OrderItem`, also has a `version` property, but it indicates the version it belongs to. + +*** + +## How the Version Changes + +When the order is changed, such as an item is exchanged, this changes the version of the order and its related data: + +1. The version of the order and its summary is incremented. +2. Related order data that have a `version` property, such as the `OrderItem`, are duplicated. The duplicated item has the new version, whereas the original item has the previous version. + +When the order is retrieved, only the related data having the same version is retrieved. + + +# Promotions Adjustments in Orders + +In this document, you’ll learn how a promotion is applied to an order’s items and shipping methods using adjustment lines. + +## What are Adjustment Lines? + +An adjustment line indicates a change to a line item or a shipping method’s amount. It’s used to apply promotions or discounts on an order. + +The [OrderLineItemAdjustment data model](https://docs.medusajs.com/references/order/models/OrderLineItemAdjustment/index.html.md) represents changes on a line item, and the [OrderShippingMethodAdjustment data model](https://docs.medusajs.com/references/order/models/OrderShippingMethodAdjustment/index.html.md) represents changes on a shipping method. + +![A diagram showcasing the relation between an order, its items and shipping methods, and their adjustment lines](https://res.cloudinary.com/dza7lstvk/image/upload/v1712306017/Medusa%20Resources/order-adjustments_myflir.jpg) + +The `amount` property of the adjustment line indicates the amount to be discounted from the original amount. + +The ID of the applied promotion is stored in the `promotion_id` property of the adjustment line. + +*** + +## Discountable Option + +The `OrderLineItem` data model has an `is_discountable` property that indicates whether promotions can be applied to the line item. It’s enabled by default. + +When disabled, a promotion can’t be applied to a line item. In the context of the Promotion Module, the promotion isn’t applied to the line item even if it matches its rules. + +*** + +## Promotion Actions + +When using the Order and Promotion modules together, use the [computeActions method of the Promotion Module’s main service](https://docs.medusajs.com/references/promotion/computeActions/index.html.md). It retrieves the actions of line items and shipping methods. + +Learn more about actions in the [Promotion Module’s documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/actions/index.html.md). + +```ts collapsibleLines="1-10" expandButtonLabel="Show Imports" +import { + ComputeActionAdjustmentLine, + ComputeActionItemLine, + ComputeActionShippingLine, + // ... +} from "@medusajs/framework/types" + +// ... + +// retrieve the order +const order = await orderModuleService.retrieveOrder("ord_123", { + relations: [ + "items.item.adjustments", + "shipping_methods.shipping_method.adjustments", + ], +}) +// retrieve the line item adjustments +const lineItemAdjustments: ComputeActionItemLine[] = [] +order.items.forEach((item) => { + const filteredAdjustments = item.adjustments?.filter( + (adjustment) => adjustment.code !== undefined + ) as unknown as ComputeActionAdjustmentLine[] + if (filteredAdjustments.length) { + lineItemAdjustments.push({ + ...item, + ...item.detail, + adjustments: filteredAdjustments, + }) + } +}) + +//retrieve shipping method adjustments +const shippingMethodAdjustments: ComputeActionShippingLine[] = + [] +order.shipping_methods.forEach((shippingMethod) => { + const filteredAdjustments = + shippingMethod.adjustments?.filter( + (adjustment) => adjustment.code !== undefined + ) as unknown as ComputeActionAdjustmentLine[] + if (filteredAdjustments.length) { + shippingMethodAdjustments.push({ + ...shippingMethod, + adjustments: filteredAdjustments, + }) + } +}) + +// compute actions +const actions = await promotionModuleService.computeActions( + ["promo_123"], + { + items: lineItemAdjustments, + shipping_methods: shippingMethodAdjustments, + // TODO infer from cart or region + currency_code: "usd", + } +) +``` + +The `computeActions` method accepts the existing adjustments of line items and shipping methods to compute the actions accurately. + +Then, use the returned `addItemAdjustment` and `addShippingMethodAdjustment` actions to set the order’s line items and the shipping method’s adjustments. + +```ts collapsibleLines="1-9" expandButtonLabel="Show Imports" +import { + AddItemAdjustmentAction, + AddShippingMethodAdjustment, + // ... +} from "@medusajs/framework/types" + +// ... + +await orderModuleService.setOrderLineItemAdjustments( + order.id, + actions.filter( + (action) => action.action === "addItemAdjustment" + ) as AddItemAdjustmentAction[] +) + +await orderModuleService.setOrderShippingMethodAdjustments( + order.id, + actions.filter( + (action) => + action.action === "addShippingMethodAdjustment" + ) as AddShippingMethodAdjustment[] +) +``` # Links between Order Module and Other Modules @@ -22029,36 +22181,6 @@ const { data: orders } = useQueryGraphStep({ ``` -# Order Versioning - -In this document, you’ll learn how an order and its details are versioned. - -## What's Versioning? - -Versioning means assigning a version number to a record, such as an order and its items. This is useful to view the different versions of the order following changes in its lifetime. - -When changes are made on an order, such as an item is added or returned, the order's version changes. - -*** - -## version Property - -The `Order` and `OrderSummary` data models have a `version` property that indicates the current version. By default, its value is `1`. - -Other order-related data models, such as `OrderItem`, also has a `version` property, but it indicates the version it belongs to. - -*** - -## How the Version Changes - -When the order is changed, such as an item is exchanged, this changes the version of the order and its related data: - -1. The version of the order and its summary is incremented. -2. Related order data that have a `version` property, such as the `OrderItem`, are duplicated. The duplicated item has the new version, whereas the original item has the previous version. - -When the order is retrieved, only the related data having the same version is retrieved. - - # Order Return In this document, you’ll learn about order returns. @@ -22120,128 +22242,6 @@ The order’s version is incremented when: 2. A return is marked as received. -# Promotions Adjustments in Orders - -In this document, you’ll learn how a promotion is applied to an order’s items and shipping methods using adjustment lines. - -## What are Adjustment Lines? - -An adjustment line indicates a change to a line item or a shipping method’s amount. It’s used to apply promotions or discounts on an order. - -The [OrderLineItemAdjustment data model](https://docs.medusajs.com/references/order/models/OrderLineItemAdjustment/index.html.md) represents changes on a line item, and the [OrderShippingMethodAdjustment data model](https://docs.medusajs.com/references/order/models/OrderShippingMethodAdjustment/index.html.md) represents changes on a shipping method. - -![A diagram showcasing the relation between an order, its items and shipping methods, and their adjustment lines](https://res.cloudinary.com/dza7lstvk/image/upload/v1712306017/Medusa%20Resources/order-adjustments_myflir.jpg) - -The `amount` property of the adjustment line indicates the amount to be discounted from the original amount. - -The ID of the applied promotion is stored in the `promotion_id` property of the adjustment line. - -*** - -## Discountable Option - -The `OrderLineItem` data model has an `is_discountable` property that indicates whether promotions can be applied to the line item. It’s enabled by default. - -When disabled, a promotion can’t be applied to a line item. In the context of the Promotion Module, the promotion isn’t applied to the line item even if it matches its rules. - -*** - -## Promotion Actions - -When using the Order and Promotion modules together, use the [computeActions method of the Promotion Module’s main service](https://docs.medusajs.com/references/promotion/computeActions/index.html.md). It retrieves the actions of line items and shipping methods. - -Learn more about actions in the [Promotion Module’s documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/promotion/actions/index.html.md). - -```ts collapsibleLines="1-10" expandButtonLabel="Show Imports" -import { - ComputeActionAdjustmentLine, - ComputeActionItemLine, - ComputeActionShippingLine, - // ... -} from "@medusajs/framework/types" - -// ... - -// retrieve the order -const order = await orderModuleService.retrieveOrder("ord_123", { - relations: [ - "items.item.adjustments", - "shipping_methods.shipping_method.adjustments", - ], -}) -// retrieve the line item adjustments -const lineItemAdjustments: ComputeActionItemLine[] = [] -order.items.forEach((item) => { - const filteredAdjustments = item.adjustments?.filter( - (adjustment) => adjustment.code !== undefined - ) as unknown as ComputeActionAdjustmentLine[] - if (filteredAdjustments.length) { - lineItemAdjustments.push({ - ...item, - ...item.detail, - adjustments: filteredAdjustments, - }) - } -}) - -//retrieve shipping method adjustments -const shippingMethodAdjustments: ComputeActionShippingLine[] = - [] -order.shipping_methods.forEach((shippingMethod) => { - const filteredAdjustments = - shippingMethod.adjustments?.filter( - (adjustment) => adjustment.code !== undefined - ) as unknown as ComputeActionAdjustmentLine[] - if (filteredAdjustments.length) { - shippingMethodAdjustments.push({ - ...shippingMethod, - adjustments: filteredAdjustments, - }) - } -}) - -// compute actions -const actions = await promotionModuleService.computeActions( - ["promo_123"], - { - items: lineItemAdjustments, - shipping_methods: shippingMethodAdjustments, - // TODO infer from cart or region - currency_code: "usd", - } -) -``` - -The `computeActions` method accepts the existing adjustments of line items and shipping methods to compute the actions accurately. - -Then, use the returned `addItemAdjustment` and `addShippingMethodAdjustment` actions to set the order’s line items and the shipping method’s adjustments. - -```ts collapsibleLines="1-9" expandButtonLabel="Show Imports" -import { - AddItemAdjustmentAction, - AddShippingMethodAdjustment, - // ... -} from "@medusajs/framework/types" - -// ... - -await orderModuleService.setOrderLineItemAdjustments( - order.id, - actions.filter( - (action) => action.action === "addItemAdjustment" - ) as AddItemAdjustmentAction[] -) - -await orderModuleService.setOrderShippingMethodAdjustments( - order.id, - actions.filter( - (action) => - action.action === "addShippingMethodAdjustment" - ) as AddShippingMethodAdjustment[] -) -``` - - # Order Change In this document, you'll learn about the Order Change data model and possible actions in it. @@ -22798,6 +22798,125 @@ The `providers` option is an array of objects that accept the following properti - `options`: An optional object of the module provider's options. +# Payment + +In this document, you’ll learn what a payment is and how it's created, captured, and refunded. + +## What's a Payment? + +When a payment session is authorized, a payment, represented by the [Payment data model](https://docs.medusajs.com/references/payment/models/Payment/index.html.md), is created. This payment can later be captured or refunded. + +A payment carries many of the data and relations of a payment session: + +- It belongs to the same payment collection. +- It’s associated with the same payment provider, which handles further payment processing. +- It stores the payment session’s `data` property in its `data` property, as it’s still useful for the payment provider’s processing. + +*** + +## Capture Payments + +When a payment is captured, a capture, represented by the [Capture data model](https://docs.medusajs.com/references/payment/models/Capture/index.html.md), is created. It holds details related to the capture, such as the amount, the capture date, and more. + +The payment can also be captured incrementally, each time a capture record is created for that amount. + +![A diagram showcasing how a payment's multiple captures are stored](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565445/Medusa%20Resources/payment-capture_f5fve1.jpg) + +*** + +## Refund Payments + +When a payment is refunded, a refund, represented by the [Refund data model](https://docs.medusajs.com/references/payment/models/Refund/index.html.md), is created. It holds details related to the refund, such as the amount, refund date, and more. + +A payment can be refunded multiple times, and each time a refund record is created. + +![A diagram showcasing how a payment's multiple refunds are stored](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565555/Medusa%20Resources/payment-refund_lgfvyy.jpg) + + +# Payment Module Provider + +In this document, you’ll learn what a payment module provider is. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/regions/index.html.md) to learn how to manage the payment providers available in a region using the dashboard. + +## What's a Payment Module Provider? + +A payment module provider registers a payment provider that handles payment processing in the Medusa application. It integrates third-party payment providers, such as Stripe. + +To authorize a payment amount with a payment provider, a payment session is created and associated with that payment provider. The payment provider is then used to handle the authorization. + +After the payment session is authorized, the payment provider is associated with the resulting payment and handles its payment processing, such as to capture or refund payment. + +### List of Payment Module Providers + +- [Stripe](https://docs.medusajs.com/commerce-modules/payment/payment-provider/stripe/index.html.md) + +*** + +## System Payment Provider + +The Payment Module provides a `system` payment provider that acts as a placeholder payment provider. + +It doesn’t handle payment processing and delegates that to the merchant. It acts similarly to a cash-on-delivery (COD) payment method. + +*** + +## How are Payment Providers Created? + +A payment provider is a module whose main service extends the `AbstractPaymentProvider` imported from `@medusajs/framework/utils`. + +Refer to [this guide](https://docs.medusajs.com/references/payment/provider/index.html.md) on how to create a payment provider for the Payment Module. + +*** + +## Configure Payment Providers + +The Payment Module accepts a `providers` option that allows you to register providers in your application. + +Learn more about this option in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/payment/module-options#providers/index.html.md). + +*** + +## PaymentProvider Data Model + +When the Medusa application starts and registers the payment providers, it also creates a record of the `PaymentProvider` data model if none exists. + +This data model is used to reference a payment provider and determine whether it’s installed in the application. + + +# Payment Session + +In this document, you’ll learn what a payment session is. + +## What's a Payment Session? + +A payment session, represented by the [PaymentSession data model](https://docs.medusajs.com/references/payment/models/PaymentSession/index.html.md), is a payment amount to be authorized. It’s associated with a payment provider that handles authorizing it. + +A payment collection can have multiple payment sessions. Using this feature, you can implement payment in installments or payments using multiple providers. + +![Diagram showcasing how every payment session has a different payment provider](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565056/Medusa%20Resources/payment-session-provider_guxzqt.jpg) + +*** + +## data Property + +Payment providers may need additional data to process the payment later. The `PaymentSession` data model has a `data` property used to store that data. + +For example, the customer's ID in Stripe is stored in the `data` property. + +*** + +## Payment Session Status + +The `status` property of a payment session indicates its current status. Its value can be: + +- `pending`: The payment session is awaiting authorization. +- `requires_more`: The payment session requires an action before it’s authorized. For example, to enter a 3DS code. +- `authorized`: The payment session is authorized. +- `error`: An error occurred while authorizing the payment. +- `canceled`: The authorization of the payment session has been canceled. + + # Accept Payment Flow In this document, you’ll learn how to implement an accept-payment flow using workflows or the Payment Module's main service. @@ -23002,125 +23121,6 @@ It also implements the payment flow during checkout as explained in [this docume ![Diagram showcasing the relation between the Payment and Cart modules](https://res.cloudinary.com/dza7lstvk/image/upload/v1711537849/Medusa%20Resources/cart-payment_ixziqm.jpg) -# Payment - -In this document, you’ll learn what a payment is and how it's created, captured, and refunded. - -## What's a Payment? - -When a payment session is authorized, a payment, represented by the [Payment data model](https://docs.medusajs.com/references/payment/models/Payment/index.html.md), is created. This payment can later be captured or refunded. - -A payment carries many of the data and relations of a payment session: - -- It belongs to the same payment collection. -- It’s associated with the same payment provider, which handles further payment processing. -- It stores the payment session’s `data` property in its `data` property, as it’s still useful for the payment provider’s processing. - -*** - -## Capture Payments - -When a payment is captured, a capture, represented by the [Capture data model](https://docs.medusajs.com/references/payment/models/Capture/index.html.md), is created. It holds details related to the capture, such as the amount, the capture date, and more. - -The payment can also be captured incrementally, each time a capture record is created for that amount. - -![A diagram showcasing how a payment's multiple captures are stored](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565445/Medusa%20Resources/payment-capture_f5fve1.jpg) - -*** - -## Refund Payments - -When a payment is refunded, a refund, represented by the [Refund data model](https://docs.medusajs.com/references/payment/models/Refund/index.html.md), is created. It holds details related to the refund, such as the amount, refund date, and more. - -A payment can be refunded multiple times, and each time a refund record is created. - -![A diagram showcasing how a payment's multiple refunds are stored](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565555/Medusa%20Resources/payment-refund_lgfvyy.jpg) - - -# Payment Module Provider - -In this document, you’ll learn what a payment module provider is. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/regions/index.html.md) to learn how to manage the payment providers available in a region using the dashboard. - -## What's a Payment Module Provider? - -A payment module provider registers a payment provider that handles payment processing in the Medusa application. It integrates third-party payment providers, such as Stripe. - -To authorize a payment amount with a payment provider, a payment session is created and associated with that payment provider. The payment provider is then used to handle the authorization. - -After the payment session is authorized, the payment provider is associated with the resulting payment and handles its payment processing, such as to capture or refund payment. - -### List of Payment Module Providers - -- [Stripe](https://docs.medusajs.com/commerce-modules/payment/payment-provider/stripe/index.html.md) - -*** - -## System Payment Provider - -The Payment Module provides a `system` payment provider that acts as a placeholder payment provider. - -It doesn’t handle payment processing and delegates that to the merchant. It acts similarly to a cash-on-delivery (COD) payment method. - -*** - -## How are Payment Providers Created? - -A payment provider is a module whose main service extends the `AbstractPaymentProvider` imported from `@medusajs/framework/utils`. - -Refer to [this guide](https://docs.medusajs.com/references/payment/provider/index.html.md) on how to create a payment provider for the Payment Module. - -*** - -## Configure Payment Providers - -The Payment Module accepts a `providers` option that allows you to register providers in your application. - -Learn more about this option in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/payment/module-options#providers/index.html.md). - -*** - -## PaymentProvider Data Model - -When the Medusa application starts and registers the payment providers, it also creates a record of the `PaymentProvider` data model if none exists. - -This data model is used to reference a payment provider and determine whether it’s installed in the application. - - -# Payment Session - -In this document, you’ll learn what a payment session is. - -## What's a Payment Session? - -A payment session, represented by the [PaymentSession data model](https://docs.medusajs.com/references/payment/models/PaymentSession/index.html.md), is a payment amount to be authorized. It’s associated with a payment provider that handles authorizing it. - -A payment collection can have multiple payment sessions. Using this feature, you can implement payment in installments or payments using multiple providers. - -![Diagram showcasing how every payment session has a different payment provider](https://res.cloudinary.com/dza7lstvk/image/upload/v1711565056/Medusa%20Resources/payment-session-provider_guxzqt.jpg) - -*** - -## data Property - -Payment providers may need additional data to process the payment later. The `PaymentSession` data model has a `data` property used to store that data. - -For example, the customer's ID in Stripe is stored in the `data` property. - -*** - -## Payment Session Status - -The `status` property of a payment session indicates its current status. Its value can be: - -- `pending`: The payment session is awaiting authorization. -- `requires_more`: The payment session requires an action before it’s authorized. For example, to enter a 3DS code. -- `authorized`: The payment session is authorized. -- `error`: An error occurred while authorizing the payment. -- `canceled`: The authorization of the payment session has been canceled. - - # Webhook Events In this document, you’ll learn how the Payment Module supports listening to webhook events. @@ -23157,681 +23157,6 @@ If the event's details indicate that the payment should be captured, then the [c After the payment webhook actions are processed and the payment is authorized or captured, the Medusa application completes the cart associated with the payment's collection if it's not completed yet. -# Pricing Concepts - -In this document, you’ll learn about the main concepts in the Pricing Module. - -## Price Set - -A [PriceSet](https://docs.medusajs.com/references/pricing/models/PriceSet/index.html.md) represents a collection of prices that are linked to a resource (for example, a product or a shipping option). - -Each of these prices are represented by the [Price data module](https://docs.medusajs.com/references/pricing/models/Price/index.html.md). - -![A diagram showcasing the relation between the price set and price](https://res.cloudinary.com/dza7lstvk/image/upload/v1709648650/Medusa%20Resources/price-set-money-amount_xeees0.jpg) - -*** - -## Price List - -A [PriceList](https://docs.medusajs.com/references/pricing/models/PriceList/index.html.md) is a group of prices only enabled if their conditions and rules are satisfied. - -A price list has optional `start_date` and `end_date` properties that indicate the date range in which a price list can be applied. - -Its associated prices are represented by the `Price` data model. - - -# Links between Pricing Module and Other Modules - -This document showcases the module links defined between the Pricing Module and other commerce modules. - -## Summary - -The Pricing Module has the following links to other modules: - -- [`ShippingOption` data model of Fulfillment Module \<> `PriceSet` data model](#fulfillment-module). -- [`ProductVariant` data model of Product Module \<> `PriceSet` data model](#product-module). - -*** - -## Fulfillment Module - -The Fulfillment Module provides fulfillment-related functionalities, including shipping options that the customer chooses from when they place their order. However, it doesn't provide pricing-related functionalities for these options. - -Medusa defines a link between the `PriceSet` and `ShippingOption` data models. A shipping option's price is stored as a price set. - -![A diagram showcasing an example of how data models from the Pricing and Fulfillment modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716561747/Medusa%20Resources/pricing-fulfillment_spywwa.jpg) - -### Retrieve with Query - -To retrieve the shipping option of a price set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `shipping_option.*` in `fields`: - -### query.graph - -```ts -const { data: priceSets } = await query.graph({ - entity: "price_set", - fields: [ - "shipping_option.*", - ], -}) - -// priceSets.shipping_option -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: priceSets } = useQueryGraphStep({ - entity: "price_set", - fields: [ - "shipping_option.*", - ], -}) - -// priceSets.shipping_option -``` - -### Manage with Link - -To manage the price set of a shipping option, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.FULFILLMENT]: { - shipping_option_id: "so_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.FULFILLMENT]: { - shipping_option_id: "so_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - -*** - -## Product Module - -The Product Module doesn't store or manage the prices of product variants. - -Medusa defines a link between the `ProductVariant` and the `PriceSet`. A product variant’s prices are stored as prices belonging to a price set. - -![A diagram showcasing an example of how data models from the Pricing and Product Module are linked. The PriceSet is linked to the ProductVariant of the Product Module.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709651039/Medusa%20Resources/pricing-product_m4xaut.jpg) - -So, when you want to add prices for a product variant, you create a price set and add the prices to it. - -You can then benefit from adding rules to prices or using the `calculatePrices` method to retrieve the price of a product variant within a specified context. - -### Retrieve with Query - -To retrieve the variant of a price set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `variant.*` in `fields`: - -### query.graph - -```ts -const { data: priceSets } = await query.graph({ - entity: "price_set", - fields: [ - "variant.*", - ], -}) - -// priceSets.variant -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: priceSets } = useQueryGraphStep({ - entity: "price_set", - fields: [ - "variant.*", - ], -}) - -// priceSets.variant -``` - -### Manage with Link - -To manage the price set of a variant, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.PRODUCT]: { - variant_id: "variant_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.PRODUCT]: { - variant_id: "variant_123", - }, - [Modules.PRICING]: { - price_set_id: "pset_123", - }, -}) -``` - - -# Prices Calculation - -In this document, you'll learn how prices are calculated when you use the [calculatePrices method](https://docs.medusajs.com/references/pricing/calculatePrices/index.html.md) of the Pricing Module's main service. - -## calculatePrices Method - -The [calculatePrices method](https://docs.medusajs.com/references/pricing/calculatePrices/index.html.md) accepts as parameters the ID of one or more price sets and a context. - -It returns a price object with the best matching price for each price set. - -### Calculation Context - -The calculation context is an optional object passed as a second parameter to the `calculatePrices` method. It accepts rules to restrict the selected prices in the price set. - -For example: - -```ts -const price = await pricingModuleService.calculatePrices( - { id: [priceSetId] }, - { - context: { - currency_code: currencyCode, - region_id: "reg_123", - }, - } -) -``` - -In this example, you retrieve the prices in a price set for the specified currency code and region ID. - -### Returned Price Object - -For each price set, the `calculatePrices` method selects two prices: - -- A calculated price: Either a price that belongs to a price list and best matches the specified context, or the same as the original price. -- An original price, which is either: - - The same price as the calculated price if the price list it belongs to is of type `override`; - - Or a price that doesn't belong to a price list and best matches the specified context. - -Both prices are returned in an object that has the following properties: - -- id: (\`string\`) The ID of the price set from which the price was selected. -- is\_calculated\_price\_price\_list: (\`boolean\`) Whether the calculated price belongs to a price list. -- calculated\_amount: (\`number\`) The amount of the calculated price, or \`null\` if there isn't a calculated price. This is the amount shown to the customer. -- is\_original\_price\_price\_list: (\`boolean\`) Whether the original price belongs to a price list. -- original\_amount: (\`number\`) The amount of the original price, or \`null\` if there isn't an original price. This amount is useful to compare with the \`calculated\_amount\`, such as to check for discounted value. -- currency\_code: (\`string\`) The currency code of the calculated price, or \`null\` if there isn't a calculated price. -- is\_calculated\_price\_tax\_inclusive: (\`boolean\`) Whether the calculated price is tax inclusive. Learn more about tax-inclusivity in \[this document]\(../tax-inclusive-pricing/page.mdx) -- is\_original\_price\_tax\_inclusive: (\`boolean\`) Whether the original price is tax inclusive. Learn more about tax-inclusivity in \[this document]\(../tax-inclusive-pricing/page.mdx) -- calculated\_price: (\`object\`) The calculated price's price details. - - - id: (\`string\`) The ID of the price. - - - price\_list\_id: (\`string\`) The ID of the associated price list. - - - price\_list\_type: (\`string\`) The price list's type. For example, \`sale\`. - - - min\_quantity: (\`number\`) The price's min quantity condition. - - - max\_quantity: (\`number\`) The price's max quantity condition. -- original\_price: (\`object\`) The original price's price details. - - - id: (\`string\`) The ID of the price. - - - price\_list\_id: (\`string\`) The ID of the associated price list. - - - price\_list\_type: (\`string\`) The price list's type. For example, \`sale\`. - - - min\_quantity: (\`number\`) The price's min quantity condition. - - - max\_quantity: (\`number\`) The price's max quantity condition. - -*** - -## Examples - -Consider the following price set: - -```ts -const priceSet = await pricingModuleService.createPriceSets({ - prices: [ - // default price - { - amount: 500, - currency_code: "EUR", - rules: {}, - }, - // prices with rules - { - amount: 400, - currency_code: "EUR", - rules: { - region_id: "reg_123", - }, - }, - { - amount: 450, - currency_code: "EUR", - rules: { - city: "krakow", - }, - }, - { - amount: 500, - currency_code: "EUR", - rules: { - city: "warsaw", - region_id: "reg_123", - }, - }, - ], -}) -``` - -### Default Price Selection - -### Code - -```ts -const price = await pricingModuleService.calculatePrices( - { id: [priceSet.id] }, - { - context: { - currency_code: "EUR" - } - } -) -``` - -### Result - -### Calculate Prices with Rules - -### Code - -```ts -const price = await pricingModuleService.calculatePrices( - { id: [priceSet.id] }, - { - context: { - currency_code: "EUR", - region_id: "reg_123", - city: "krakow" - } - } -) -``` - -### Result - -### Price Selection with Price List - -### Code - -```ts -const priceList = pricingModuleService.createPriceLists([{ - title: "Summer Price List", - description: "Price list for summer sale", - starts_at: Date.parse("01/10/2023").toString(), - ends_at: Date.parse("31/10/2023").toString(), - rules: { - region_id: ['PL'] - }, - type: "sale", - prices: [ - { - amount: 400, - currency_code: "EUR", - price_set_id: priceSet.id, - }, - { - amount: 450, - currency_code: "EUR", - price_set_id: priceSet.id, - }, - ], -}]); - -const price = await pricingModuleService.calculatePrices( - { id: [priceSet.id] }, - { - context: { - currency_code: "EUR", - region_id: "PL", - city: "krakow" - } - } -) -``` - -### Result - - -# Price Rules - -In this document, you'll learn about price rules for price sets and price lists. - -## Price Rule - -You can restrict prices by rules. Each rule of a price is represented by the [PriceRule data model](https://docs.medusajs.com/references/pricing/models/PriceRule/index.html.md). - -The `Price` data model has a `rules_count` property, which indicates how many rules, represented by `PriceRule`, are applied to the price. - -For exmaple, you create a price restricted to `10557` zip codes. - -![A diagram showcasing the relation between the PriceRule and Price](https://res.cloudinary.com/dza7lstvk/image/upload/v1709648772/Medusa%20Resources/price-rule-1_vy8bn9.jpg) - -A price can have multiple price rules. - -For example, a price can be restricted by a region and a zip code. - -![A diagram showcasing the relation between the PriceRule and Price with multiple rules.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709649296/Medusa%20Resources/price-rule-3_pwpocz.jpg) - -*** - -## Price List Rules - -Rules applied to a price list are represented by the [PriceListRule data model](https://docs.medusajs.com/references/pricing/models/PriceListRule/index.html.md). - -The `rules_count` property of a `PriceList` indicates how many rules are applied to it. - -![A diagram showcasing the relation between the PriceSet, PriceList, Price, RuleType, and PriceListRuleValue](https://res.cloudinary.com/dza7lstvk/image/upload/v1709641999/Medusa%20Resources/price-list_zd10yd.jpg) - - -# Tax-Inclusive Pricing - -In this document, you’ll learn about tax-inclusive pricing and how it's used when calculating prices. - -## What is Tax-Inclusive Pricing? - -A tax-inclusive price is a price of a resource that includes taxes. Medusa calculates the tax amount from the price rather than adds the amount to it. - -For example, if a product’s price is $50, the tax rate is 2%, and tax-inclusive pricing is enabled, then the product's price is $49, and the applied tax amount is $1. - -*** - -## How is Tax-Inclusive Pricing Set? - -The [PricePreference data model](https://docs.medusajs.com/references/pricing/models/PricePreference/index.html.md) holds the tax-inclusive setting for a context. It has two properties that indicate the context: - -- `attribute`: The name of the attribute to compare against. For example, `region_id` or `currency_code`. -- `value`: The attribute’s value. For example, `reg_123` or `usd`. - -Only `region_id` and `currency_code` are supported as an `attribute` at the moment. - -The `is_tax_inclusive` property indicates whether tax-inclusivity is enabled in the specified context. - -For example: - -```json -{ - "attribute": "currency_code", - "value": "USD", - "is_tax_inclusive": true, -} -``` - -In this example, tax-inclusivity is enabled for the `USD` currency code. - -*** - -## Tax-Inclusive Pricing in Price Calculation - -### Tax Context - -As mentioned in the [Price Calculation documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#calculation-context/index.html.md), The `calculatePrices` method accepts as a parameter a calculation context. - -To get accurate tax results, pass the `region_id` and / or `currency_code` in the calculation context. - -### Returned Tax Properties - -The `calculatePrices` method returns two properties related to tax-inclusivity: - -Learn more about the returned properties in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#returned-price-object/index.html.md). - -- `is_calculated_price_tax_inclusive`: Whether the selected `calculated_price` is tax-inclusive. -- `is_original_price_tax_inclusive` : Whether the selected `original_price` is tax-inclusive. - -A price is considered tax-inclusive if: - -1. It belongs to the region or currency code specified in the calculation context; -2. and the region or currency code has a price preference with `is_tax_inclusive` enabled. - -### Tax Context Precedence - -A region’s price preference’s `is_tax_inclusive`'s value takes higher precedence in determining whether a price is tax-inclusive if: - -- both the `region_id` and `currency_code` are provided in the calculation context; -- the selected price belongs to the region; -- and the region has a price preference - - -# Links between Region Module and Other Modules - -This document showcases the module links defined between the Region Module and other commerce modules. - -## Summary - -The Region Module has the following links to other modules: - -Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. - -- [`Region` data model \<> `Cart` data model of the Cart Module](#cart-module). (Read-only) -- [`Region` data model \<> `Order` data model of the Order Module](#order-module). (Read-only) -- [`Region` data model \<> `PaymentProvider` data model of the Payment Module](#payment-module). - -*** - -## Cart Module - -Medusa defines a read-only link between the `Region` data model and the [Cart Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/index.html.md)'s `Cart` data model. This means you can retrieve the details of a region's carts, but you don't manage the links in a pivot table in the database. The region of a cart is determined by the `region_id` property of the `Cart` data model. - -### Retrieve with Query - -To retrieve the carts of a region with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `carts.*` in `fields`: - -### query.graph - -```ts -const { data: regions } = await query.graph({ - entity: "region", - fields: [ - "carts.*", - ], -}) - -// regions.carts -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: regions } = useQueryGraphStep({ - entity: "region", - fields: [ - "carts.*", - ], -}) - -// regions.carts -``` - -*** - -## Order Module - -Medusa defines a read-only link between the `Region` data model and the [Cart Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/index.html.md)'s `Cart` data model. This means you can retrieve the details of a region's orders, but you don't manage the links in a pivot table in the database. The region of an order is determined by the `region_id` property of the `Order` data model. - -### Retrieve with Query - -To retrieve the orders of a region with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `orders.*` in `fields`: - -### query.graph - -```ts -const { data: regions } = await query.graph({ - entity: "region", - fields: [ - "orders.*", - ], -}) - -// regions.orders -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: regions } = useQueryGraphStep({ - entity: "region", - fields: [ - "orders.*", - ], -}) - -// regions.orders -``` - -*** - -## Payment Module - -You can specify for each region which payment providers are available for use. - -Medusa defines a module link between the `PaymentProvider` and the `Region` data models. - -![A diagram showcasing an example of how resources from the Payment and Region modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1711569520/Medusa%20Resources/payment-region_jyo2dz.jpg) - -### Retrieve with Query - -To retrieve the payment providers of a region with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `payment_providers.*` in `fields`: - -### query.graph - -```ts -const { data: regions } = await query.graph({ - entity: "region", - fields: [ - "payment_providers.*", - ], -}) - -// regions.payment_providers -``` - -### useQueryGraphStep - -```ts -import { useQueryGraphStep } from "@medusajs/medusa/core-flows" - -// ... - -const { data: regions } = useQueryGraphStep({ - entity: "region", - fields: [ - "payment_providers.*", - ], -}) - -// regions.payment_providers -``` - -### Manage with Link - -To manage the payment providers in a region, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): - -### link.create - -```ts -import { Modules } from "@medusajs/framework/utils" - -// ... - -await link.create({ - [Modules.REGION]: { - region_id: "reg_123", - }, - [Modules.PAYMENT]: { - payment_provider_id: "pp_stripe_stripe", - }, -}) -``` - -### createRemoteLinkStep - -```ts -import { Modules } from "@medusajs/framework/utils" -import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" - -// ... - -createRemoteLinkStep({ - [Modules.REGION]: { - region_id: "reg_123", - }, - [Modules.PAYMENT]: { - payment_provider_id: "pp_stripe_stripe", - }, -}) -``` - - # Links between Product Module and Other Modules This document showcases the module links defined between the Product Module and other commerce modules. @@ -24276,57 +23601,6 @@ createRemoteLinkStep({ ``` -# Configure Selling Products - -In this guide, you'll learn how to set up and configure your products based on their shipping and inventory requirements, the product type, how you want to sell them, or your commerce ecosystem. - -The concepts in this guide are applicable starting from Medusa v2.5.1. - -## Scenario - -Businesses can have different selling requirements: - -1. They may sell physical or digital items. -2. They may sell items that don't require shipping or inventory management, such as selling digital products, services, or booking appointments. -3. They may sell items whose inventory is managed by an external system, such as an ERP. - -Medusa supports these different selling requirements by allowing you to configure shipping and inventory requirements for products and their variants. This guide explains how these configurations work, then provides examples of setting up different use cases. - -*** - -## Configuring Shipping Requirements - -The Medusa application defines a link between the `Product` data model and a [ShippingProfile](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/concepts#shipping-profile/index.html.md) in the [Fulfillment Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/index.html.md), allowing you to associate a product with a shipping profile. - -When a product is associated with a shipping profile, its variants require shipping and fulfillment when purchased. This is useful for physical products or digital products that require custom fulfillment. - -If a product doesn't have an associated shipping profile, its variants don't require shipping and fulfillment when purchased. This is useful for digital products, for example, that don't require shipping. - -### Overriding Shipping Requirements for Variants - -A product variant whose inventory is managed by Medusa (its `manage_inventory` property is enabled) has an [inventory item](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/concepts#inventoryitem/index.html.md). The inventory item has a `requires_shipping` property that can be used to override its shipping requirement. This is useful if the product has an associated shipping profile but you want to disable shipping for a specific variant, or vice versa. - -Learn more about product variant's inventory in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/product/variant-inventory/index.html.md). - -When a product variant is purchased, the Medusa application decides whether the purchased item requires shipping in the following order: - -1. The product variant has an inventory item. In this case, the Medusa application uses the inventory item's `requires_shipping` property to determine if the item requires shipping. -2. If the product variant doesn't have an inventory item, the Medusa application checks whether the product has an associated shipping profile to determine if the item requires shipping. - -*** - -## Use Case Examples - -By combining configurations of shipment requirements and inventory management, you can set up your products to support your use case: - -|Use Case|Configurations|Example| -|---|---|---|---|---| -|Item that's shipped on purchase, and its variant inventory is managed by the Medusa application.||Any stock-kept item (clothing, for example), whose inventory is managed in the Medusa application.| -|Item that's shipped on purchase, but its variant inventory is managed externally (not by Medusa) or it has infinite stock.||Any stock-kept item (clothing, for example), whose inventory is managed in an ERP or has infinite stock.| -|Item that's not shipped on purchase, but its variant inventory is managed by Medusa.||Digital products, such as licenses, that don't require shipping but have a limited quantity.| -|Item that doesn't require shipping and its variant inventory isn't managed by Medusa.||| - - # Product Variant Inventory # Product Variant Inventory @@ -24393,6 +23667,732 @@ The following guides provide more details on inventory management in the Medusa - [Storefront guide: how to retrieve a product variant's inventory details](https://docs.medusajs.com/resources/storefront-development/products/inventory/index.html.md). +# Pricing Concepts + +In this document, you’ll learn about the main concepts in the Pricing Module. + +## Price Set + +A [PriceSet](https://docs.medusajs.com/references/pricing/models/PriceSet/index.html.md) represents a collection of prices that are linked to a resource (for example, a product or a shipping option). + +Each of these prices are represented by the [Price data module](https://docs.medusajs.com/references/pricing/models/Price/index.html.md). + +![A diagram showcasing the relation between the price set and price](https://res.cloudinary.com/dza7lstvk/image/upload/v1709648650/Medusa%20Resources/price-set-money-amount_xeees0.jpg) + +*** + +## Price List + +A [PriceList](https://docs.medusajs.com/references/pricing/models/PriceList/index.html.md) is a group of prices only enabled if their conditions and rules are satisfied. + +A price list has optional `start_date` and `end_date` properties that indicate the date range in which a price list can be applied. + +Its associated prices are represented by the `Price` data model. + + +# Configure Selling Products + +In this guide, you'll learn how to set up and configure your products based on their shipping and inventory requirements, the product type, how you want to sell them, or your commerce ecosystem. + +The concepts in this guide are applicable starting from Medusa v2.5.1. + +## Scenario + +Businesses can have different selling requirements: + +1. They may sell physical or digital items. +2. They may sell items that don't require shipping or inventory management, such as selling digital products, services, or booking appointments. +3. They may sell items whose inventory is managed by an external system, such as an ERP. + +Medusa supports these different selling requirements by allowing you to configure shipping and inventory requirements for products and their variants. This guide explains how these configurations work, then provides examples of setting up different use cases. + +*** + +## Configuring Shipping Requirements + +The Medusa application defines a link between the `Product` data model and a [ShippingProfile](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/concepts#shipping-profile/index.html.md) in the [Fulfillment Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/fulfillment/index.html.md), allowing you to associate a product with a shipping profile. + +When a product is associated with a shipping profile, its variants require shipping and fulfillment when purchased. This is useful for physical products or digital products that require custom fulfillment. + +If a product doesn't have an associated shipping profile, its variants don't require shipping and fulfillment when purchased. This is useful for digital products, for example, that don't require shipping. + +### Overriding Shipping Requirements for Variants + +A product variant whose inventory is managed by Medusa (its `manage_inventory` property is enabled) has an [inventory item](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/inventory/concepts#inventoryitem/index.html.md). The inventory item has a `requires_shipping` property that can be used to override its shipping requirement. This is useful if the product has an associated shipping profile but you want to disable shipping for a specific variant, or vice versa. + +Learn more about product variant's inventory in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/product/variant-inventory/index.html.md). + +When a product variant is purchased, the Medusa application decides whether the purchased item requires shipping in the following order: + +1. The product variant has an inventory item. In this case, the Medusa application uses the inventory item's `requires_shipping` property to determine if the item requires shipping. +2. If the product variant doesn't have an inventory item, the Medusa application checks whether the product has an associated shipping profile to determine if the item requires shipping. + +*** + +## Use Case Examples + +By combining configurations of shipment requirements and inventory management, you can set up your products to support your use case: + +|Use Case|Configurations|Example| +|---|---|---|---|---| +|Item that's shipped on purchase, and its variant inventory is managed by the Medusa application.||Any stock-kept item (clothing, for example), whose inventory is managed in the Medusa application.| +|Item that's shipped on purchase, but its variant inventory is managed externally (not by Medusa) or it has infinite stock.||Any stock-kept item (clothing, for example), whose inventory is managed in an ERP or has infinite stock.| +|Item that's not shipped on purchase, but its variant inventory is managed by Medusa.||Digital products, such as licenses, that don't require shipping but have a limited quantity.| +|Item that doesn't require shipping and its variant inventory isn't managed by Medusa.||| + + +# Prices Calculation + +In this document, you'll learn how prices are calculated when you use the [calculatePrices method](https://docs.medusajs.com/references/pricing/calculatePrices/index.html.md) of the Pricing Module's main service. + +## calculatePrices Method + +The [calculatePrices method](https://docs.medusajs.com/references/pricing/calculatePrices/index.html.md) accepts as parameters the ID of one or more price sets and a context. + +It returns a price object with the best matching price for each price set. + +### Calculation Context + +The calculation context is an optional object passed as a second parameter to the `calculatePrices` method. It accepts rules to restrict the selected prices in the price set. + +For example: + +```ts +const price = await pricingModuleService.calculatePrices( + { id: [priceSetId] }, + { + context: { + currency_code: currencyCode, + region_id: "reg_123", + }, + } +) +``` + +In this example, you retrieve the prices in a price set for the specified currency code and region ID. + +### Returned Price Object + +For each price set, the `calculatePrices` method selects two prices: + +- A calculated price: Either a price that belongs to a price list and best matches the specified context, or the same as the original price. +- An original price, which is either: + - The same price as the calculated price if the price list it belongs to is of type `override`; + - Or a price that doesn't belong to a price list and best matches the specified context. + +Both prices are returned in an object that has the following properties: + +- id: (\`string\`) The ID of the price set from which the price was selected. +- is\_calculated\_price\_price\_list: (\`boolean\`) Whether the calculated price belongs to a price list. +- calculated\_amount: (\`number\`) The amount of the calculated price, or \`null\` if there isn't a calculated price. This is the amount shown to the customer. +- is\_original\_price\_price\_list: (\`boolean\`) Whether the original price belongs to a price list. +- original\_amount: (\`number\`) The amount of the original price, or \`null\` if there isn't an original price. This amount is useful to compare with the \`calculated\_amount\`, such as to check for discounted value. +- currency\_code: (\`string\`) The currency code of the calculated price, or \`null\` if there isn't a calculated price. +- is\_calculated\_price\_tax\_inclusive: (\`boolean\`) Whether the calculated price is tax inclusive. Learn more about tax-inclusivity in \[this document]\(../tax-inclusive-pricing/page.mdx) +- is\_original\_price\_tax\_inclusive: (\`boolean\`) Whether the original price is tax inclusive. Learn more about tax-inclusivity in \[this document]\(../tax-inclusive-pricing/page.mdx) +- calculated\_price: (\`object\`) The calculated price's price details. + + - id: (\`string\`) The ID of the price. + + - price\_list\_id: (\`string\`) The ID of the associated price list. + + - price\_list\_type: (\`string\`) The price list's type. For example, \`sale\`. + + - min\_quantity: (\`number\`) The price's min quantity condition. + + - max\_quantity: (\`number\`) The price's max quantity condition. +- original\_price: (\`object\`) The original price's price details. + + - id: (\`string\`) The ID of the price. + + - price\_list\_id: (\`string\`) The ID of the associated price list. + + - price\_list\_type: (\`string\`) The price list's type. For example, \`sale\`. + + - min\_quantity: (\`number\`) The price's min quantity condition. + + - max\_quantity: (\`number\`) The price's max quantity condition. + +*** + +## Examples + +Consider the following price set: + +```ts +const priceSet = await pricingModuleService.createPriceSets({ + prices: [ + // default price + { + amount: 500, + currency_code: "EUR", + rules: {}, + }, + // prices with rules + { + amount: 400, + currency_code: "EUR", + rules: { + region_id: "reg_123", + }, + }, + { + amount: 450, + currency_code: "EUR", + rules: { + city: "krakow", + }, + }, + { + amount: 500, + currency_code: "EUR", + rules: { + city: "warsaw", + region_id: "reg_123", + }, + }, + ], +}) +``` + +### Default Price Selection + +### Code + +```ts +const price = await pricingModuleService.calculatePrices( + { id: [priceSet.id] }, + { + context: { + currency_code: "EUR" + } + } +) +``` + +### Result + +### Calculate Prices with Rules + +### Code + +```ts +const price = await pricingModuleService.calculatePrices( + { id: [priceSet.id] }, + { + context: { + currency_code: "EUR", + region_id: "reg_123", + city: "krakow" + } + } +) +``` + +### Result + +### Price Selection with Price List + +### Code + +```ts +const priceList = pricingModuleService.createPriceLists([{ + title: "Summer Price List", + description: "Price list for summer sale", + starts_at: Date.parse("01/10/2023").toString(), + ends_at: Date.parse("31/10/2023").toString(), + rules: { + region_id: ['PL'] + }, + type: "sale", + prices: [ + { + amount: 400, + currency_code: "EUR", + price_set_id: priceSet.id, + }, + { + amount: 450, + currency_code: "EUR", + price_set_id: priceSet.id, + }, + ], +}]); + +const price = await pricingModuleService.calculatePrices( + { id: [priceSet.id] }, + { + context: { + currency_code: "EUR", + region_id: "PL", + city: "krakow" + } + } +) +``` + +### Result + + +# Price Rules + +In this document, you'll learn about price rules for price sets and price lists. + +## Price Rule + +You can restrict prices by rules. Each rule of a price is represented by the [PriceRule data model](https://docs.medusajs.com/references/pricing/models/PriceRule/index.html.md). + +The `Price` data model has a `rules_count` property, which indicates how many rules, represented by `PriceRule`, are applied to the price. + +For exmaple, you create a price restricted to `10557` zip codes. + +![A diagram showcasing the relation between the PriceRule and Price](https://res.cloudinary.com/dza7lstvk/image/upload/v1709648772/Medusa%20Resources/price-rule-1_vy8bn9.jpg) + +A price can have multiple price rules. + +For example, a price can be restricted by a region and a zip code. + +![A diagram showcasing the relation between the PriceRule and Price with multiple rules.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709649296/Medusa%20Resources/price-rule-3_pwpocz.jpg) + +*** + +## Price List Rules + +Rules applied to a price list are represented by the [PriceListRule data model](https://docs.medusajs.com/references/pricing/models/PriceListRule/index.html.md). + +The `rules_count` property of a `PriceList` indicates how many rules are applied to it. + +![A diagram showcasing the relation between the PriceSet, PriceList, Price, RuleType, and PriceListRuleValue](https://res.cloudinary.com/dza7lstvk/image/upload/v1709641999/Medusa%20Resources/price-list_zd10yd.jpg) + + +# Links between Pricing Module and Other Modules + +This document showcases the module links defined between the Pricing Module and other commerce modules. + +## Summary + +The Pricing Module has the following links to other modules: + +- [`ShippingOption` data model of Fulfillment Module \<> `PriceSet` data model](#fulfillment-module). +- [`ProductVariant` data model of Product Module \<> `PriceSet` data model](#product-module). + +*** + +## Fulfillment Module + +The Fulfillment Module provides fulfillment-related functionalities, including shipping options that the customer chooses from when they place their order. However, it doesn't provide pricing-related functionalities for these options. + +Medusa defines a link between the `PriceSet` and `ShippingOption` data models. A shipping option's price is stored as a price set. + +![A diagram showcasing an example of how data models from the Pricing and Fulfillment modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716561747/Medusa%20Resources/pricing-fulfillment_spywwa.jpg) + +### Retrieve with Query + +To retrieve the shipping option of a price set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `shipping_option.*` in `fields`: + +### query.graph + +```ts +const { data: priceSets } = await query.graph({ + entity: "price_set", + fields: [ + "shipping_option.*", + ], +}) + +// priceSets.shipping_option +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: priceSets } = useQueryGraphStep({ + entity: "price_set", + fields: [ + "shipping_option.*", + ], +}) + +// priceSets.shipping_option +``` + +### Manage with Link + +To manage the price set of a shipping option, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.FULFILLMENT]: { + shipping_option_id: "so_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.FULFILLMENT]: { + shipping_option_id: "so_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + +*** + +## Product Module + +The Product Module doesn't store or manage the prices of product variants. + +Medusa defines a link between the `ProductVariant` and the `PriceSet`. A product variant’s prices are stored as prices belonging to a price set. + +![A diagram showcasing an example of how data models from the Pricing and Product Module are linked. The PriceSet is linked to the ProductVariant of the Product Module.](https://res.cloudinary.com/dza7lstvk/image/upload/v1709651039/Medusa%20Resources/pricing-product_m4xaut.jpg) + +So, when you want to add prices for a product variant, you create a price set and add the prices to it. + +You can then benefit from adding rules to prices or using the `calculatePrices` method to retrieve the price of a product variant within a specified context. + +### Retrieve with Query + +To retrieve the variant of a price set with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `variant.*` in `fields`: + +### query.graph + +```ts +const { data: priceSets } = await query.graph({ + entity: "price_set", + fields: [ + "variant.*", + ], +}) + +// priceSets.variant +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: priceSets } = useQueryGraphStep({ + entity: "price_set", + fields: [ + "variant.*", + ], +}) + +// priceSets.variant +``` + +### Manage with Link + +To manage the price set of a variant, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.PRODUCT]: { + variant_id: "variant_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.PRODUCT]: { + variant_id: "variant_123", + }, + [Modules.PRICING]: { + price_set_id: "pset_123", + }, +}) +``` + + +# Tax-Inclusive Pricing + +In this document, you’ll learn about tax-inclusive pricing and how it's used when calculating prices. + +## What is Tax-Inclusive Pricing? + +A tax-inclusive price is a price of a resource that includes taxes. Medusa calculates the tax amount from the price rather than adds the amount to it. + +For example, if a product’s price is $50, the tax rate is 2%, and tax-inclusive pricing is enabled, then the product's price is $49, and the applied tax amount is $1. + +*** + +## How is Tax-Inclusive Pricing Set? + +The [PricePreference data model](https://docs.medusajs.com/references/pricing/models/PricePreference/index.html.md) holds the tax-inclusive setting for a context. It has two properties that indicate the context: + +- `attribute`: The name of the attribute to compare against. For example, `region_id` or `currency_code`. +- `value`: The attribute’s value. For example, `reg_123` or `usd`. + +Only `region_id` and `currency_code` are supported as an `attribute` at the moment. + +The `is_tax_inclusive` property indicates whether tax-inclusivity is enabled in the specified context. + +For example: + +```json +{ + "attribute": "currency_code", + "value": "USD", + "is_tax_inclusive": true, +} +``` + +In this example, tax-inclusivity is enabled for the `USD` currency code. + +*** + +## Tax-Inclusive Pricing in Price Calculation + +### Tax Context + +As mentioned in the [Price Calculation documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#calculation-context/index.html.md), The `calculatePrices` method accepts as a parameter a calculation context. + +To get accurate tax results, pass the `region_id` and / or `currency_code` in the calculation context. + +### Returned Tax Properties + +The `calculatePrices` method returns two properties related to tax-inclusivity: + +Learn more about the returned properties in [this guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/pricing/price-calculation#returned-price-object/index.html.md). + +- `is_calculated_price_tax_inclusive`: Whether the selected `calculated_price` is tax-inclusive. +- `is_original_price_tax_inclusive` : Whether the selected `original_price` is tax-inclusive. + +A price is considered tax-inclusive if: + +1. It belongs to the region or currency code specified in the calculation context; +2. and the region or currency code has a price preference with `is_tax_inclusive` enabled. + +### Tax Context Precedence + +A region’s price preference’s `is_tax_inclusive`'s value takes higher precedence in determining whether a price is tax-inclusive if: + +- both the `region_id` and `currency_code` are provided in the calculation context; +- the selected price belongs to the region; +- and the region has a price preference + + +# Links between Region Module and Other Modules + +This document showcases the module links defined between the Region Module and other commerce modules. + +## Summary + +The Region Module has the following links to other modules: + +Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database. + +- [`Region` data model \<> `Cart` data model of the Cart Module](#cart-module). (Read-only) +- [`Region` data model \<> `Order` data model of the Order Module](#order-module). (Read-only) +- [`Region` data model \<> `PaymentProvider` data model of the Payment Module](#payment-module). + +*** + +## Cart Module + +Medusa defines a read-only link between the `Region` data model and the [Cart Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/index.html.md)'s `Cart` data model. This means you can retrieve the details of a region's carts, but you don't manage the links in a pivot table in the database. The region of a cart is determined by the `region_id` property of the `Cart` data model. + +### Retrieve with Query + +To retrieve the carts of a region with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `carts.*` in `fields`: + +### query.graph + +```ts +const { data: regions } = await query.graph({ + entity: "region", + fields: [ + "carts.*", + ], +}) + +// regions.carts +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: regions } = useQueryGraphStep({ + entity: "region", + fields: [ + "carts.*", + ], +}) + +// regions.carts +``` + +*** + +## Order Module + +Medusa defines a read-only link between the `Region` data model and the [Cart Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/cart/index.html.md)'s `Cart` data model. This means you can retrieve the details of a region's orders, but you don't manage the links in a pivot table in the database. The region of an order is determined by the `region_id` property of the `Order` data model. + +### Retrieve with Query + +To retrieve the orders of a region with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `orders.*` in `fields`: + +### query.graph + +```ts +const { data: regions } = await query.graph({ + entity: "region", + fields: [ + "orders.*", + ], +}) + +// regions.orders +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: regions } = useQueryGraphStep({ + entity: "region", + fields: [ + "orders.*", + ], +}) + +// regions.orders +``` + +*** + +## Payment Module + +You can specify for each region which payment providers are available for use. + +Medusa defines a module link between the `PaymentProvider` and the `Region` data models. + +![A diagram showcasing an example of how resources from the Payment and Region modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1711569520/Medusa%20Resources/payment-region_jyo2dz.jpg) + +### Retrieve with Query + +To retrieve the payment providers of a region with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `payment_providers.*` in `fields`: + +### query.graph + +```ts +const { data: regions } = await query.graph({ + entity: "region", + fields: [ + "payment_providers.*", + ], +}) + +// regions.payment_providers +``` + +### useQueryGraphStep + +```ts +import { useQueryGraphStep } from "@medusajs/medusa/core-flows" + +// ... + +const { data: regions } = useQueryGraphStep({ + entity: "region", + fields: [ + "payment_providers.*", + ], +}) + +// regions.payment_providers +``` + +### Manage with Link + +To manage the payment providers in a region, use [Link](https://docs.medusajs.com/docs/learn/fundamentals/module-links/link/index.html.md): + +### link.create + +```ts +import { Modules } from "@medusajs/framework/utils" + +// ... + +await link.create({ + [Modules.REGION]: { + region_id: "reg_123", + }, + [Modules.PAYMENT]: { + payment_provider_id: "pp_stripe_stripe", + }, +}) +``` + +### createRemoteLinkStep + +```ts +import { Modules } from "@medusajs/framework/utils" +import { createRemoteLinkStep } from "@medusajs/medusa/core-flows" + +// ... + +createRemoteLinkStep({ + [Modules.REGION]: { + region_id: "reg_123", + }, + [Modules.PAYMENT]: { + payment_provider_id: "pp_stripe_stripe", + }, +}) +``` + + # Links between Sales Channel Module and Other Modules This document showcases the module links defined between the Sales Channel Module and other commerce modules. @@ -24763,23 +24763,6 @@ The Medusa application infers the associated sales channels and ensures that onl To create a publishable API key, either use the [Medusa Admin](https://docs.medusajs.com/user-guide/settings/developer/publishable-api-keys/index.html.md) or the [Admin API Routes](https://docs.medusajs.com/api/admin#publishable-api-keys). -# Stock Location Concepts - -In this document, you’ll learn about the main concepts in the Stock Location Module. - -## Stock Location - -A stock location, represented by the `StockLocation` data model, represents a location where stock items are kept. For example, a warehouse. - -Medusa uses stock locations to provide inventory details, from the Inventory Module, per location. - -*** - -## StockLocationAddress - -The `StockLocationAddress` data model belongs to the `StockLocation` data model. It provides more detailed information of the location, such as country code or street address. - - # Links between Stock Location Module and Other Modules This document showcases the module links defined between the Stock Location Module and other commerce modules. @@ -25008,6 +24991,23 @@ createRemoteLinkStep({ ``` +# Stock Location Concepts + +In this document, you’ll learn about the main concepts in the Stock Location Module. + +## Stock Location + +A stock location, represented by the `StockLocation` data model, represents a location where stock items are kept. For example, a warehouse. + +Medusa uses stock locations to provide inventory details, from the Inventory Module, per location. + +*** + +## StockLocationAddress + +The `StockLocationAddress` data model belongs to the `StockLocation` data model. It provides more detailed information of the location, such as country code or street address. + + # Links between Store Module and Other Modules This document showcases the module links defined between the Store Module and other commerce modules. @@ -25063,6 +25063,123 @@ const { data: stores } = useQueryGraphStep({ ``` +# User Module Options + +In this document, you'll learn about the options of the User Module. + +## Module Options + +```ts title="medusa-config.ts" +import { Modules } from "@medusajs/framework/utils" + +// ... + +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "@medusajs/user", + options: { + jwt_secret: process.env.JWT_SECRET, + }, + }, + ], +}) +``` + +|Option|Description|Required| +|---|---|---|---|---| +|\`jwt\_secret\`|A string indicating the secret used to sign the invite tokens.|Yes| + +### Environment Variables + +Make sure to add the necessary environment variables for the above options in `.env`: + +```bash +JWT_SECRET=supersecret +``` + + +# User Creation Flows + +In this document, learn the different ways to create a user using the User Module. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/users/index.html.md) to learn how to manage users using the dashboard. + +## Straightforward User Creation + +To create a user, use the [create method of the User Module’s main service](https://docs.medusajs.com/references/user/create/index.html.md): + +```ts +const user = await userModuleService.createUsers({ + email: "user@example.com", +}) +``` + +You can pair this with the Auth Module to allow the user to authenticate, as explained in a [later section](#create-identity-with-the-auth-module). + +*** + +## Invite Users + +To create a user, you can create an invite for them using the [createInvites method](https://docs.medusajs.com/references/user/createInvites/index.html.md) of the User Module's main service: + +```ts +const invite = await userModuleService.createInvites({ + email: "user@example.com", +}) +``` + +Later, you can accept the invite and create a new user for them: + +```ts +const invite = + await userModuleService.validateInviteToken("secret_123") + +await userModuleService.updateInvites({ + id: invite.id, + accepted: true, +}) + +const user = await userModuleService.createUsers({ + email: invite.email, +}) +``` + +### Invite Expiry + +An invite has an expiry date. You can renew the expiry date and refresh the token using the [refreshInviteTokens method](https://docs.medusajs.com/references/user/refreshInviteTokens/index.html.md): + +```ts +await userModuleService.refreshInviteTokens(["invite_123"]) +``` + +*** + +## Create Identity with the Auth Module + +By combining the User and Auth Modules, you can use the Auth Module for authenticating users, and the User Module to manage those users. + +So, when a user is authenticated, and you receive the `AuthIdentity` object, you can use it to create a user if it doesn’t exist: + +```ts +const { success, authIdentity } = + await authModuleService.authenticate("emailpass", { + // ... + }) + +const [, count] = await userModuleService.listAndCountUsers({ + email: authIdentity.entity_id, +}) + +if (!count) { + const user = await userModuleService.createUsers({ + email: authIdentity.entity_id, + }) +} +``` + + # Tax Module Options In this document, you'll learn about the options of the Tax Module. @@ -25183,6 +25300,21 @@ TODO add once tax provider guide is updated + add module providers match other m Refer to [this guide](/modules/tax/provider) to learn more about creating a tax provider. */} +# Tax Region + +In this document, you’ll learn about tax regions and how to use them with the Region Module. + +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/tax-regions/index.html.md) to learn how to manage tax regions using the dashboard. + +## What is a Tax Region? + +A tax region, represented by the [TaxRegion data model](https://docs.medusajs.com/references/tax/models/TaxRegion/index.html.md), stores tax settings related to a region that your store serves. + +Tax regions can inherit settings and rules from a parent tax region. + +Each tax region has tax rules and a tax provider. + + # Tax Rates and Rules In this document, you’ll learn about tax rates and rules. @@ -25221,21 +25353,6 @@ These two properties of the data model identify the rule’s target: So, to override the default tax rate for product types “Shirt”, you create a tax rate and associate with it a tax rule whose `reference` is `product_type` and `reference_id` the ID of the “Shirt” product type. -# Tax Region - -In this document, you’ll learn about tax regions and how to use them with the Region Module. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/tax-regions/index.html.md) to learn how to manage tax regions using the dashboard. - -## What is a Tax Region? - -A tax region, represented by the [TaxRegion data model](https://docs.medusajs.com/references/tax/models/TaxRegion/index.html.md), stores tax settings related to a region that your store serves. - -Tax regions can inherit settings and rules from a parent tax region. - -Each tax region has tax rules and a tax provider. - - # Promotion Actions In this document, you’ll learn about promotion actions and how they’re computed using the [computeActions method](https://docs.medusajs.com/references/promotion/computeActions/index.html.md). @@ -25347,121 +25464,30 @@ export interface CampaignBudgetExceededAction { Refer to [this reference](https://docs.medusajs.com/references/promotion/interfaces/promotion.CampaignBudgetExceededAction/index.html.md) for details on the object’s properties. -# User Module Options +# Campaign -In this document, you'll learn about the options of the User Module. +In this document, you'll learn about campaigns. -## Module Options +Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/promotions/campaigns/index.html.md) to learn how to manage campaigns using the dashboard. -```ts title="medusa-config.ts" -import { Modules } from "@medusajs/framework/utils" +## What is a Campaign? -// ... +A [Campaign](https://docs.medusajs.com/references/promotion/models/Campaign/index.html.md) combines promotions under the same conditions, such as start and end dates. -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "@medusajs/user", - options: { - jwt_secret: process.env.JWT_SECRET, - }, - }, - ], -}) -``` - -|Option|Description|Required| -|---|---|---|---|---| -|\`jwt\_secret\`|A string indicating the secret used to sign the invite tokens.|Yes| - -### Environment Variables - -Make sure to add the necessary environment variables for the above options in `.env`: - -```bash -JWT_SECRET=supersecret -``` - - -# User Creation Flows - -In this document, learn the different ways to create a user using the User Module. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/users/index.html.md) to learn how to manage users using the dashboard. - -## Straightforward User Creation - -To create a user, use the [create method of the User Module’s main service](https://docs.medusajs.com/references/user/create/index.html.md): - -```ts -const user = await userModuleService.createUsers({ - email: "user@example.com", -}) -``` - -You can pair this with the Auth Module to allow the user to authenticate, as explained in a [later section](#create-identity-with-the-auth-module). +![A diagram showcasing the relation between the Campaign and Promotion data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709899225/Medusa%20Resources/campagin-promotion_hh3qsi.jpg) *** -## Invite Users +## Campaign Limits -To create a user, you can create an invite for them using the [createInvites method](https://docs.medusajs.com/references/user/createInvites/index.html.md) of the User Module's main service: +Each campaign has a budget represented by the [CampaignBudget data model](https://docs.medusajs.com/references/promotion/models/CampaignBudget/index.html.md). The budget limits how many times the promotion can be used. -```ts -const invite = await userModuleService.createInvites({ - email: "user@example.com", -}) -``` +There are two types of budgets: -Later, you can accept the invite and create a new user for them: +- `spend`: An amount that, when crossed, the promotion becomes unusable. For example, if the amount limit is set to `$100`, and the total amount of usage of this promotion crosses that threshold, the promotion can no longer be applied. +- `usage`: The number of times that a promotion can be used. For example, if the usage limit is set to `10`, the promotion can be used only 10 times by customers. After that, it can no longer be applied. -```ts -const invite = - await userModuleService.validateInviteToken("secret_123") - -await userModuleService.updateInvites({ - id: invite.id, - accepted: true, -}) - -const user = await userModuleService.createUsers({ - email: invite.email, -}) -``` - -### Invite Expiry - -An invite has an expiry date. You can renew the expiry date and refresh the token using the [refreshInviteTokens method](https://docs.medusajs.com/references/user/refreshInviteTokens/index.html.md): - -```ts -await userModuleService.refreshInviteTokens(["invite_123"]) -``` - -*** - -## Create Identity with the Auth Module - -By combining the User and Auth Modules, you can use the Auth Module for authenticating users, and the User Module to manage those users. - -So, when a user is authenticated, and you receive the `AuthIdentity` object, you can use it to create a user if it doesn’t exist: - -```ts -const { success, authIdentity } = - await authModuleService.authenticate("emailpass", { - // ... - }) - -const [, count] = await userModuleService.listAndCountUsers({ - email: authIdentity.entity_id, -}) - -if (!count) { - const user = await userModuleService.createUsers({ - email: authIdentity.entity_id, - }) -} -``` +![A diagram showcasing the relation between the Campaign and CampaignBudget data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709899463/Medusa%20Resources/campagin-budget_rvqlmi.jpg) # Application Method @@ -25558,32 +25584,6 @@ For example, to restrict the promotion to only `VIP` and `B2B` customer groups: In this case, a customer’s group must be in the `VIP` and `B2B` set of values to use the promotion. -# Campaign - -In this document, you'll learn about campaigns. - -Refer to this [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/promotions/campaigns/index.html.md) to learn how to manage campaigns using the dashboard. - -## What is a Campaign? - -A [Campaign](https://docs.medusajs.com/references/promotion/models/Campaign/index.html.md) combines promotions under the same conditions, such as start and end dates. - -![A diagram showcasing the relation between the Campaign and Promotion data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709899225/Medusa%20Resources/campagin-promotion_hh3qsi.jpg) - -*** - -## Campaign Limits - -Each campaign has a budget represented by the [CampaignBudget data model](https://docs.medusajs.com/references/promotion/models/CampaignBudget/index.html.md). The budget limits how many times the promotion can be used. - -There are two types of budgets: - -- `spend`: An amount that, when crossed, the promotion becomes unusable. For example, if the amount limit is set to `$100`, and the total amount of usage of this promotion crosses that threshold, the promotion can no longer be applied. -- `usage`: The number of times that a promotion can be used. For example, if the usage limit is set to `10`, the promotion can be used only 10 times by customers. After that, it can no longer be applied. - -![A diagram showcasing the relation between the Campaign and CampaignBudget data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1709899463/Medusa%20Resources/campagin-budget_rvqlmi.jpg) - - # Links between Promotion Module and Other Modules This document showcases the module links defined between the Promotion Module and other commerce modules. @@ -25765,6 +25765,68 @@ createRemoteLinkStep({ ``` +# Emailpass Auth Module Provider + +In this document, you’ll learn about the Emailpass auth module provider and how to install and use it in the Auth Module. + +Using the Emailpass auth module provider, you allow users to register and login with an email and password. + +*** + +## Register the Emailpass Auth Module Provider + +The Emailpass auth provider is registered by default with the Auth Module. + +If you want to pass options to the provider, add the provider to the `providers` option of the Auth Module: + +```ts title="medusa-config.ts" +import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" + +// ... + +module.exports = defineConfig({ + // ... + modules: [ + { + resolve: "@medusajs/medusa/auth", + dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], + options: { + providers: [ + // other providers... + { + resolve: "@medusajs/medusa/auth-emailpass", + id: "emailpass", + options: { + // options... + }, + }, + ], + }, + }, + ], +}) +``` + +### Module Options + +|Configuration|Description|Required|Default| +|---|---|---|---|---|---|---| +|\`hashConfig\`|An object of configurations to use when hashing the user's +password. Refer to |No|\`\`\`ts +const hashConfig = \{ + logN: 15, + r: 8, + p: 1 +} +\`\`\`| + +*** + +## Related Guides + +- [How to register a customer using email and password](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/register/index.html.md) + + # GitHub Auth Module Provider In this document, you’ll learn about the GitHub Auth Module Provider and how to install and use it in the Auth Module. @@ -25847,68 +25909,6 @@ The [Authenticate or Login API Route](https://docs.medusajs.com/Users/shahednass - [How to implement third-party / social login in the storefront.](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/third-party-login/index.html.md). -# Emailpass Auth Module Provider - -In this document, you’ll learn about the Emailpass auth module provider and how to install and use it in the Auth Module. - -Using the Emailpass auth module provider, you allow users to register and login with an email and password. - -*** - -## Register the Emailpass Auth Module Provider - -The Emailpass auth provider is registered by default with the Auth Module. - -If you want to pass options to the provider, add the provider to the `providers` option of the Auth Module: - -```ts title="medusa-config.ts" -import { Modules, ContainerRegistrationKeys } from "@medusajs/framework/utils" - -// ... - -module.exports = defineConfig({ - // ... - modules: [ - { - resolve: "@medusajs/medusa/auth", - dependencies: [Modules.CACHE, ContainerRegistrationKeys.LOGGER], - options: { - providers: [ - // other providers... - { - resolve: "@medusajs/medusa/auth-emailpass", - id: "emailpass", - options: { - // options... - }, - }, - ], - }, - }, - ], -}) -``` - -### Module Options - -|Configuration|Description|Required|Default| -|---|---|---|---|---|---|---| -|\`hashConfig\`|An object of configurations to use when hashing the user's -password. Refer to |No|\`\`\`ts -const hashConfig = \{ - logN: 15, - r: 8, - p: 1 -} -\`\`\`| - -*** - -## Related Guides - -- [How to register a customer using email and password](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/customers/register/index.html.md) - - # Google Auth Module Provider In this document, you’ll learn about the Google Auth Module Provider and how to install and use it in the Auth Module. @@ -26373,512 +26373,510 @@ For each product variant, you: ## Workflows -- [createApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/createApiKeysWorkflow/index.html.md) -- [deleteApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteApiKeysWorkflow/index.html.md) -- [revokeApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/revokeApiKeysWorkflow/index.html.md) - [linkSalesChannelsToApiKeyWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkSalesChannelsToApiKeyWorkflow/index.html.md) +- [revokeApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/revokeApiKeysWorkflow/index.html.md) +- [deleteApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteApiKeysWorkflow/index.html.md) +- [createApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/createApiKeysWorkflow/index.html.md) - [updateApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateApiKeysWorkflow/index.html.md) -- [batchLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinksWorkflow/index.html.md) +- [generateResetPasswordTokenWorkflow](https://docs.medusajs.com/references/medusa-workflows/generateResetPasswordTokenWorkflow/index.html.md) +- [createCustomerAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerAccountWorkflow/index.html.md) +- [createCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerAddressesWorkflow/index.html.md) +- [deleteCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomerAddressesWorkflow/index.html.md) +- [deleteCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomersWorkflow/index.html.md) +- [removeCustomerAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeCustomerAccountWorkflow/index.html.md) +- [updateCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomersWorkflow/index.html.md) +- [updateCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomerAddressesWorkflow/index.html.md) - [createLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/createLinksWorkflow/index.html.md) +- [batchLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinksWorkflow/index.html.md) - [dismissLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/dismissLinksWorkflow/index.html.md) - [updateLinksWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateLinksWorkflow/index.html.md) -- [addShippingMethodToCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/addShippingMethodToCartWorkflow/index.html.md) -- [generateResetPasswordTokenWorkflow](https://docs.medusajs.com/references/medusa-workflows/generateResetPasswordTokenWorkflow/index.html.md) +- [createCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomersWorkflow/index.html.md) - [addToCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/addToCartWorkflow/index.html.md) - [completeCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/completeCartWorkflow/index.html.md) +- [addShippingMethodToCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/addShippingMethodToCartWorkflow/index.html.md) - [confirmVariantInventoryWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmVariantInventoryWorkflow/index.html.md) -- [createCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCartWorkflow/index.html.md) - [createCartCreditLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCartCreditLinesWorkflow/index.html.md) +- [createCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCartWorkflow/index.html.md) - [createPaymentCollectionForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPaymentCollectionForCartWorkflow/index.html.md) -- [listShippingOptionsForCartWithPricingWorkflow](https://docs.medusajs.com/references/medusa-workflows/listShippingOptionsForCartWithPricingWorkflow/index.html.md) - [deleteCartCreditLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCartCreditLinesWorkflow/index.html.md) -- [listShippingOptionsForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/listShippingOptionsForCartWorkflow/index.html.md) -- [refreshCartShippingMethodsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshCartShippingMethodsWorkflow/index.html.md) -- [transferCartCustomerWorkflow](https://docs.medusajs.com/references/medusa-workflows/transferCartCustomerWorkflow/index.html.md) -- [updateCartPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCartPromotionsWorkflow/index.html.md) -- [refreshPaymentCollectionForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshPaymentCollectionForCartWorkflow/index.html.md) -- [updateCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCartWorkflow/index.html.md) -- [updateLineItemInCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateLineItemInCartWorkflow/index.html.md) -- [updateTaxLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxLinesWorkflow/index.html.md) -- [validateExistingPaymentCollectionStep](https://docs.medusajs.com/references/medusa-workflows/validateExistingPaymentCollectionStep/index.html.md) - [refreshCartItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshCartItemsWorkflow/index.html.md) +- [listShippingOptionsForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/listShippingOptionsForCartWorkflow/index.html.md) +- [listShippingOptionsForCartWithPricingWorkflow](https://docs.medusajs.com/references/medusa-workflows/listShippingOptionsForCartWithPricingWorkflow/index.html.md) +- [refreshPaymentCollectionForCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshPaymentCollectionForCartWorkflow/index.html.md) +- [refreshCartShippingMethodsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshCartShippingMethodsWorkflow/index.html.md) +- [updateCartPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCartPromotionsWorkflow/index.html.md) +- [transferCartCustomerWorkflow](https://docs.medusajs.com/references/medusa-workflows/transferCartCustomerWorkflow/index.html.md) +- [updateCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCartWorkflow/index.html.md) +- [updateTaxLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxLinesWorkflow/index.html.md) +- [updateLineItemInCartWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateLineItemInCartWorkflow/index.html.md) +- [validateExistingPaymentCollectionStep](https://docs.medusajs.com/references/medusa-workflows/validateExistingPaymentCollectionStep/index.html.md) - [deleteCustomerGroupsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomerGroupsWorkflow/index.html.md) -- [linkCustomersToCustomerGroupWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkCustomersToCustomerGroupWorkflow/index.html.md) -- [linkCustomerGroupsToCustomerWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkCustomerGroupsToCustomerWorkflow/index.html.md) -- [updateCustomerGroupsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomerGroupsWorkflow/index.html.md) - [createCustomerGroupsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerGroupsWorkflow/index.html.md) +- [linkCustomerGroupsToCustomerWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkCustomerGroupsToCustomerWorkflow/index.html.md) +- [linkCustomersToCustomerGroupWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkCustomersToCustomerGroupWorkflow/index.html.md) - [createDefaultsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createDefaultsWorkflow/index.html.md) -- [batchShippingOptionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchShippingOptionRulesWorkflow/index.html.md) -- [calculateShippingOptionsPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/calculateShippingOptionsPricesWorkflow/index.html.md) +- [updateCustomerGroupsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomerGroupsWorkflow/index.html.md) - [cancelFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelFulfillmentWorkflow/index.html.md) +- [batchShippingOptionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchShippingOptionRulesWorkflow/index.html.md) - [createFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createFulfillmentWorkflow/index.html.md) -- [createServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createServiceZonesWorkflow/index.html.md) -- [createShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShippingOptionsWorkflow/index.html.md) -- [createShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShipmentWorkflow/index.html.md) -- [createShippingProfilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShippingProfilesWorkflow/index.html.md) +- [calculateShippingOptionsPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/calculateShippingOptionsPricesWorkflow/index.html.md) - [createReturnFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReturnFulfillmentWorkflow/index.html.md) +- [createServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createServiceZonesWorkflow/index.html.md) +- [createShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShipmentWorkflow/index.html.md) +- [createShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShippingOptionsWorkflow/index.html.md) +- [createShippingProfilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createShippingProfilesWorkflow/index.html.md) - [deleteFulfillmentSetsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteFulfillmentSetsWorkflow/index.html.md) - [deleteServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteServiceZonesWorkflow/index.html.md) +- [deleteShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteShippingOptionsWorkflow/index.html.md) +- [markFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markFulfillmentAsDeliveredWorkflow/index.html.md) - [updateFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateFulfillmentWorkflow/index.html.md) - [updateServiceZonesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateServiceZonesWorkflow/index.html.md) -- [deleteShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteShippingOptionsWorkflow/index.html.md) - [updateShippingProfilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateShippingProfilesWorkflow/index.html.md) - [updateShippingOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateShippingOptionsWorkflow/index.html.md) - [validateFulfillmentDeliverabilityStep](https://docs.medusajs.com/references/medusa-workflows/validateFulfillmentDeliverabilityStep/index.html.md) -- [markFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markFulfillmentAsDeliveredWorkflow/index.html.md) - [deleteFilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteFilesWorkflow/index.html.md) - [uploadFilesWorkflow](https://docs.medusajs.com/references/medusa-workflows/uploadFilesWorkflow/index.html.md) - [batchInventoryItemLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchInventoryItemLevelsWorkflow/index.html.md) - [bulkCreateDeleteLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/bulkCreateDeleteLevelsWorkflow/index.html.md) -- [createInventoryItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInventoryItemsWorkflow/index.html.md) -- [createInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInventoryLevelsWorkflow/index.html.md) - [deleteInventoryItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInventoryItemWorkflow/index.html.md) +- [createInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInventoryLevelsWorkflow/index.html.md) +- [createInventoryItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInventoryItemsWorkflow/index.html.md) - [deleteInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInventoryLevelsWorkflow/index.html.md) - [updateInventoryItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateInventoryItemsWorkflow/index.html.md) -- [updateInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateInventoryLevelsWorkflow/index.html.md) - [validateInventoryLevelsDelete](https://docs.medusajs.com/references/medusa-workflows/validateInventoryLevelsDelete/index.html.md) -- [deleteInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInvitesWorkflow/index.html.md) -- [acceptInviteWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptInviteWorkflow/index.html.md) +- [updateInventoryLevelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateInventoryLevelsWorkflow/index.html.md) - [createInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInvitesWorkflow/index.html.md) +- [acceptInviteWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptInviteWorkflow/index.html.md) +- [deleteInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInvitesWorkflow/index.html.md) - [refreshInviteTokensWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshInviteTokensWorkflow/index.html.md) - [deleteLineItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteLineItemsWorkflow/index.html.md) - [capturePaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/capturePaymentWorkflow/index.html.md) - [processPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/processPaymentWorkflow/index.html.md) -- [validateRefundStep](https://docs.medusajs.com/references/medusa-workflows/validateRefundStep/index.html.md) +- [refundPaymentsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refundPaymentsWorkflow/index.html.md) - [refundPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/refundPaymentWorkflow/index.html.md) - [validatePaymentsRefundStep](https://docs.medusajs.com/references/medusa-workflows/validatePaymentsRefundStep/index.html.md) -- [refundPaymentsWorkflow](https://docs.medusajs.com/references/medusa-workflows/refundPaymentsWorkflow/index.html.md) +- [validateRefundStep](https://docs.medusajs.com/references/medusa-workflows/validateRefundStep/index.html.md) - [createPaymentSessionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPaymentSessionsWorkflow/index.html.md) -- [createRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createRefundReasonsWorkflow/index.html.md) -- [deletePaymentSessionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePaymentSessionsWorkflow/index.html.md) - [deleteRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteRefundReasonsWorkflow/index.html.md) +- [deletePaymentSessionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePaymentSessionsWorkflow/index.html.md) +- [createRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createRefundReasonsWorkflow/index.html.md) - [updateRefundReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateRefundReasonsWorkflow/index.html.md) -- [batchPriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchPriceListPricesWorkflow/index.html.md) -- [createPriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPriceListPricesWorkflow/index.html.md) -- [createPriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPriceListsWorkflow/index.html.md) -- [deletePriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePriceListsWorkflow/index.html.md) -- [removePriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/removePriceListPricesWorkflow/index.html.md) -- [updatePriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePriceListPricesWorkflow/index.html.md) -- [updatePriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePriceListsWorkflow/index.html.md) - [acceptOrderTransferValidationStep](https://docs.medusajs.com/references/medusa-workflows/acceptOrderTransferValidationStep/index.html.md) -- [acceptOrderTransferWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptOrderTransferWorkflow/index.html.md) - [addOrderLineItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/addOrderLineItemsWorkflow/index.html.md) -- [archiveOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/archiveOrderWorkflow/index.html.md) +- [acceptOrderTransferWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptOrderTransferWorkflow/index.html.md) - [beginClaimOrderValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginClaimOrderValidationStep/index.html.md) +- [archiveOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/archiveOrderWorkflow/index.html.md) - [beginClaimOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginClaimOrderWorkflow/index.html.md) - [beginExchangeOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginExchangeOrderWorkflow/index.html.md) - [beginOrderEditOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginOrderEditOrderWorkflow/index.html.md) - [beginOrderEditValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginOrderEditValidationStep/index.html.md) -- [beginOrderExchangeValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginOrderExchangeValidationStep/index.html.md) - [beginReceiveReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginReceiveReturnValidationStep/index.html.md) - [beginReceiveReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginReceiveReturnWorkflow/index.html.md) -- [beginReturnOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginReturnOrderWorkflow/index.html.md) +- [beginOrderExchangeValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginOrderExchangeValidationStep/index.html.md) - [beginReturnOrderValidationStep](https://docs.medusajs.com/references/medusa-workflows/beginReturnOrderValidationStep/index.html.md) - [cancelBeginOrderClaimValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderClaimValidationStep/index.html.md) +- [beginReturnOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/beginReturnOrderWorkflow/index.html.md) - [cancelBeginOrderClaimWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderClaimWorkflow/index.html.md) - [cancelBeginOrderEditValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderEditValidationStep/index.html.md) -- [cancelBeginOrderExchangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderExchangeWorkflow/index.html.md) -- [cancelBeginOrderEditWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderEditWorkflow/index.html.md) -- [cancelClaimValidateOrderStep](https://docs.medusajs.com/references/medusa-workflows/cancelClaimValidateOrderStep/index.html.md) - [cancelBeginOrderExchangeValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderExchangeValidationStep/index.html.md) -- [cancelExchangeValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelExchangeValidateOrder/index.html.md) -- [cancelOrderExchangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderExchangeWorkflow/index.html.md) +- [cancelBeginOrderEditWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderEditWorkflow/index.html.md) +- [cancelBeginOrderExchangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderExchangeWorkflow/index.html.md) +- [cancelClaimValidateOrderStep](https://docs.medusajs.com/references/medusa-workflows/cancelClaimValidateOrderStep/index.html.md) - [cancelOrderClaimWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderClaimWorkflow/index.html.md) - [cancelOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderChangeWorkflow/index.html.md) -- [cancelOrderFulfillmentValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelOrderFulfillmentValidateOrder/index.html.md) -- [cancelOrderFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderFulfillmentWorkflow/index.html.md) +- [cancelExchangeValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelExchangeValidateOrder/index.html.md) +- [cancelOrderExchangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderExchangeWorkflow/index.html.md) - [cancelOrderTransferRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderTransferRequestWorkflow/index.html.md) +- [cancelOrderFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderFulfillmentWorkflow/index.html.md) +- [cancelOrderFulfillmentValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelOrderFulfillmentValidateOrder/index.html.md) - [cancelReceiveReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelReceiveReturnValidationStep/index.html.md) -- [cancelReturnReceiveWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelReturnReceiveWorkflow/index.html.md) -- [cancelRequestReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelRequestReturnValidationStep/index.html.md) - [cancelOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelOrderWorkflow/index.html.md) +- [cancelRequestReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelRequestReturnValidationStep/index.html.md) +- [cancelReturnReceiveWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelReturnReceiveWorkflow/index.html.md) - [cancelReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelReturnRequestWorkflow/index.html.md) -- [cancelReturnValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelReturnValidateOrder/index.html.md) -- [cancelValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelValidateOrder/index.html.md) - [cancelReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelReturnWorkflow/index.html.md) +- [cancelReturnValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelReturnValidateOrder/index.html.md) - [cancelTransferOrderRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/cancelTransferOrderRequestValidationStep/index.html.md) -- [confirmClaimRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmClaimRequestWorkflow/index.html.md) -- [confirmClaimRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmClaimRequestValidationStep/index.html.md) -- [confirmExchangeRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmExchangeRequestValidationStep/index.html.md) -- [confirmOrderEditRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmOrderEditRequestValidationStep/index.html.md) +- [cancelValidateOrder](https://docs.medusajs.com/references/medusa-workflows/cancelValidateOrder/index.html.md) - [completeOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/completeOrderWorkflow/index.html.md) +- [confirmClaimRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmClaimRequestValidationStep/index.html.md) +- [confirmClaimRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmClaimRequestWorkflow/index.html.md) +- [confirmExchangeRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmExchangeRequestValidationStep/index.html.md) - [confirmExchangeRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmExchangeRequestWorkflow/index.html.md) +- [confirmOrderEditRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmOrderEditRequestValidationStep/index.html.md) - [confirmOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmOrderEditRequestWorkflow/index.html.md) - [confirmReceiveReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmReceiveReturnValidationStep/index.html.md) - [confirmReturnReceiveWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmReturnReceiveWorkflow/index.html.md) -- [confirmReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmReturnRequestWorkflow/index.html.md) - [confirmReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/confirmReturnRequestValidationStep/index.html.md) +- [confirmReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmReturnRequestWorkflow/index.html.md) +- [createAndCompleteReturnOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/createAndCompleteReturnOrderWorkflow/index.html.md) - [createClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createClaimShippingMethodValidationStep/index.html.md) - [createClaimShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createClaimShippingMethodWorkflow/index.html.md) -- [createAndCompleteReturnOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/createAndCompleteReturnOrderWorkflow/index.html.md) -- [createExchangeShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createExchangeShippingMethodValidationStep/index.html.md) - [createCompleteReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/createCompleteReturnValidationStep/index.html.md) +- [createExchangeShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createExchangeShippingMethodValidationStep/index.html.md) - [createExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createExchangeShippingMethodWorkflow/index.html.md) - [createFulfillmentValidateOrder](https://docs.medusajs.com/references/medusa-workflows/createFulfillmentValidateOrder/index.html.md) -- [createOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderChangeWorkflow/index.html.md) -- [createOrderChangeActionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderChangeActionsWorkflow/index.html.md) -- [createOrderEditShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createOrderEditShippingMethodValidationStep/index.html.md) - [createOrUpdateOrderPaymentCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrUpdateOrderPaymentCollectionWorkflow/index.html.md) +- [createOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderChangeWorkflow/index.html.md) +- [createOrderEditShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createOrderEditShippingMethodValidationStep/index.html.md) - [createOrderEditShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderEditShippingMethodWorkflow/index.html.md) +- [createOrderChangeActionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderChangeActionsWorkflow/index.html.md) - [createOrderFulfillmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderFulfillmentWorkflow/index.html.md) - [createOrderPaymentCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderPaymentCollectionWorkflow/index.html.md) +- [createOrderShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderShipmentWorkflow/index.html.md) - [createOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderWorkflow/index.html.md) - [createOrdersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrdersWorkflow/index.html.md) - [createReturnShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/createReturnShippingMethodValidationStep/index.html.md) - [createReturnShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReturnShippingMethodWorkflow/index.html.md) - [createShipmentValidateOrder](https://docs.medusajs.com/references/medusa-workflows/createShipmentValidateOrder/index.html.md) -- [declineOrderTransferRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/declineOrderTransferRequestWorkflow/index.html.md) - [declineOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/declineOrderChangeWorkflow/index.html.md) -- [deleteOrderChangeActionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteOrderChangeActionsWorkflow/index.html.md) -- [createOrderShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderShipmentWorkflow/index.html.md) +- [declineOrderTransferRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/declineOrderTransferRequestWorkflow/index.html.md) - [declineTransferOrderRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/declineTransferOrderRequestValidationStep/index.html.md) +- [deleteOrderChangeActionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteOrderChangeActionsWorkflow/index.html.md) - [deleteOrderPaymentCollections](https://docs.medusajs.com/references/medusa-workflows/deleteOrderPaymentCollections/index.html.md) - [dismissItemReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/dismissItemReturnRequestValidationStep/index.html.md) +- [deleteOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteOrderChangeWorkflow/index.html.md) - [dismissItemReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/dismissItemReturnRequestWorkflow/index.html.md) - [exchangeAddNewItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/exchangeAddNewItemValidationStep/index.html.md) - [getOrderDetailWorkflow](https://docs.medusajs.com/references/medusa-workflows/getOrderDetailWorkflow/index.html.md) -- [deleteOrderChangeWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteOrderChangeWorkflow/index.html.md) - [exchangeRequestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/exchangeRequestItemReturnValidationStep/index.html.md) - [getOrdersListWorkflow](https://docs.medusajs.com/references/medusa-workflows/getOrdersListWorkflow/index.html.md) - [markPaymentCollectionAsPaid](https://docs.medusajs.com/references/medusa-workflows/markPaymentCollectionAsPaid/index.html.md) -- [orderClaimAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimAddNewItemWorkflow/index.html.md) -- [markOrderFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow/index.html.md) - [orderClaimAddNewItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderClaimAddNewItemValidationStep/index.html.md) +- [markOrderFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow/index.html.md) +- [orderClaimAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimAddNewItemWorkflow/index.html.md) - [orderClaimRequestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderClaimRequestItemReturnValidationStep/index.html.md) -- [orderClaimRequestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimRequestItemReturnWorkflow/index.html.md) -- [orderClaimItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimItemWorkflow/index.html.md) - [orderClaimItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderClaimItemValidationStep/index.html.md) -- [orderEditUpdateItemQuantityValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderEditUpdateItemQuantityValidationStep/index.html.md) +- [orderClaimItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimItemWorkflow/index.html.md) +- [orderClaimRequestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderClaimRequestItemReturnWorkflow/index.html.md) - [orderEditAddNewItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderEditAddNewItemValidationStep/index.html.md) - [orderEditAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderEditAddNewItemWorkflow/index.html.md) +- [orderEditUpdateItemQuantityValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderEditUpdateItemQuantityValidationStep/index.html.md) +- [orderEditUpdateItemQuantityWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderEditUpdateItemQuantityWorkflow/index.html.md) - [orderExchangeRequestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderExchangeRequestItemReturnWorkflow/index.html.md) - [orderFulfillmentDeliverablilityValidationStep](https://docs.medusajs.com/references/medusa-workflows/orderFulfillmentDeliverablilityValidationStep/index.html.md) - [orderExchangeAddNewItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderExchangeAddNewItemWorkflow/index.html.md) -- [orderEditUpdateItemQuantityWorkflow](https://docs.medusajs.com/references/medusa-workflows/orderEditUpdateItemQuantityWorkflow/index.html.md) - [receiveAndCompleteReturnOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/receiveAndCompleteReturnOrderWorkflow/index.html.md) -- [receiveCompleteReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/receiveCompleteReturnValidationStep/index.html.md) - [receiveItemReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/receiveItemReturnRequestValidationStep/index.html.md) +- [receiveCompleteReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/receiveCompleteReturnValidationStep/index.html.md) - [receiveItemReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/receiveItemReturnRequestWorkflow/index.html.md) -- [removeClaimAddItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimAddItemActionValidationStep/index.html.md) -- [removeClaimItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimItemActionValidationStep/index.html.md) -- [removeClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimShippingMethodValidationStep/index.html.md) - [removeAddItemClaimActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeAddItemClaimActionWorkflow/index.html.md) +- [removeClaimAddItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimAddItemActionValidationStep/index.html.md) +- [removeClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimShippingMethodValidationStep/index.html.md) +- [removeClaimItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeClaimItemActionValidationStep/index.html.md) - [removeClaimShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeClaimShippingMethodWorkflow/index.html.md) -- [removeExchangeItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeExchangeItemActionValidationStep/index.html.md) - [removeExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeExchangeShippingMethodWorkflow/index.html.md) +- [removeExchangeItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeExchangeItemActionValidationStep/index.html.md) - [removeExchangeShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeExchangeShippingMethodValidationStep/index.html.md) -- [removeItemExchangeActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemExchangeActionWorkflow/index.html.md) - [removeItemClaimActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemClaimActionWorkflow/index.html.md) - [removeItemOrderEditActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemOrderEditActionWorkflow/index.html.md) - [removeItemReceiveReturnActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeItemReceiveReturnActionValidationStep/index.html.md) -- [removeItemReturnActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemReturnActionWorkflow/index.html.md) -- [removeOrderEditItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeOrderEditItemActionValidationStep/index.html.md) +- [removeItemExchangeActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemExchangeActionWorkflow/index.html.md) - [removeItemReceiveReturnActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemReceiveReturnActionWorkflow/index.html.md) +- [removeOrderEditItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeOrderEditItemActionValidationStep/index.html.md) - [removeOrderEditShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeOrderEditShippingMethodValidationStep/index.html.md) +- [removeItemReturnActionWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeItemReturnActionWorkflow/index.html.md) - [removeReturnShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeReturnShippingMethodValidationStep/index.html.md) -- [removeOrderEditShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeOrderEditShippingMethodWorkflow/index.html.md) - [removeReturnItemActionValidationStep](https://docs.medusajs.com/references/medusa-workflows/removeReturnItemActionValidationStep/index.html.md) - [removeReturnShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeReturnShippingMethodWorkflow/index.html.md) -- [requestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestItemReturnValidationStep/index.html.md) -- [requestOrderEditRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestOrderEditRequestValidationStep/index.html.md) -- [requestOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestOrderEditRequestWorkflow/index.html.md) +- [removeOrderEditShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeOrderEditShippingMethodWorkflow/index.html.md) - [requestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestItemReturnWorkflow/index.html.md) -- [requestOrderTransferValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestOrderTransferValidationStep/index.html.md) +- [requestOrderEditRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestOrderEditRequestValidationStep/index.html.md) +- [requestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestItemReturnValidationStep/index.html.md) +- [requestOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestOrderEditRequestWorkflow/index.html.md) - [requestOrderTransferWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestOrderTransferWorkflow/index.html.md) - [throwUnlessPaymentCollectionNotPaid](https://docs.medusajs.com/references/medusa-workflows/throwUnlessPaymentCollectionNotPaid/index.html.md) -- [updateClaimAddItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateClaimAddItemWorkflow/index.html.md) +- [requestOrderTransferValidationStep](https://docs.medusajs.com/references/medusa-workflows/requestOrderTransferValidationStep/index.html.md) +- [throwUnlessStatusIsNotPaid](https://docs.medusajs.com/references/medusa-workflows/throwUnlessStatusIsNotPaid/index.html.md) - [updateClaimAddItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimAddItemValidationStep/index.html.md) - [updateClaimItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimItemValidationStep/index.html.md) -- [updateClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimShippingMethodValidationStep/index.html.md) +- [updateClaimAddItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateClaimAddItemWorkflow/index.html.md) - [updateClaimItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateClaimItemWorkflow/index.html.md) -- [throwUnlessStatusIsNotPaid](https://docs.medusajs.com/references/medusa-workflows/throwUnlessStatusIsNotPaid/index.html.md) - [updateClaimShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateClaimShippingMethodWorkflow/index.html.md) - [updateExchangeAddItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateExchangeAddItemValidationStep/index.html.md) +- [updateClaimShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateClaimShippingMethodValidationStep/index.html.md) - [updateExchangeAddItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateExchangeAddItemWorkflow/index.html.md) -- [updateExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateExchangeShippingMethodWorkflow/index.html.md) - [updateExchangeShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateExchangeShippingMethodValidationStep/index.html.md) +- [updateExchangeShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateExchangeShippingMethodWorkflow/index.html.md) - [updateOrderChangeActionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderChangeActionsWorkflow/index.html.md) - [updateOrderChangesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderChangesWorkflow/index.html.md) +- [updateOrderEditItemQuantityValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditItemQuantityValidationStep/index.html.md) - [updateOrderEditAddItemWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditAddItemWorkflow/index.html.md) - [updateOrderEditAddItemValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditAddItemValidationStep/index.html.md) +- [updateOrderEditItemQuantityWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditItemQuantityWorkflow/index.html.md) - [updateOrderEditShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditShippingMethodWorkflow/index.html.md) - [updateOrderEditShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditShippingMethodValidationStep/index.html.md) -- [updateOrderEditItemQuantityValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditItemQuantityValidationStep/index.html.md) -- [updateOrderEditItemQuantityWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderEditItemQuantityWorkflow/index.html.md) - [updateOrderTaxLinesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderTaxLinesWorkflow/index.html.md) - [updateOrderValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateOrderValidationStep/index.html.md) -- [updateOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderWorkflow/index.html.md) - [updateReceiveItemReturnRequestValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateReceiveItemReturnRequestValidationStep/index.html.md) +- [updateOrderWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateOrderWorkflow/index.html.md) - [updateReceiveItemReturnRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReceiveItemReturnRequestWorkflow/index.html.md) - [updateRequestItemReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateRequestItemReturnValidationStep/index.html.md) - [updateReturnShippingMethodValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateReturnShippingMethodValidationStep/index.html.md) - [updateReturnShippingMethodWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReturnShippingMethodWorkflow/index.html.md) -- [updateReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateReturnValidationStep/index.html.md) - [updateRequestItemReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateRequestItemReturnWorkflow/index.html.md) - [updateReturnWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReturnWorkflow/index.html.md) -- [createPricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPricePreferencesWorkflow/index.html.md) -- [deletePricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePricePreferencesWorkflow/index.html.md) -- [updatePricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePricePreferencesWorkflow/index.html.md) +- [updateReturnValidationStep](https://docs.medusajs.com/references/medusa-workflows/updateReturnValidationStep/index.html.md) +- [batchPriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchPriceListPricesWorkflow/index.html.md) +- [deletePriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePriceListsWorkflow/index.html.md) +- [createPriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPriceListsWorkflow/index.html.md) +- [createPriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPriceListPricesWorkflow/index.html.md) +- [removePriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/removePriceListPricesWorkflow/index.html.md) +- [updatePriceListPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePriceListPricesWorkflow/index.html.md) +- [updatePriceListsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePriceListsWorkflow/index.html.md) - [batchLinkProductsToCategoryWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinkProductsToCategoryWorkflow/index.html.md) -- [batchLinkProductsToCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinkProductsToCollectionWorkflow/index.html.md) - [batchProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchProductVariantsWorkflow/index.html.md) -- [createCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCollectionsWorkflow/index.html.md) -- [createProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductOptionsWorkflow/index.html.md) +- [batchLinkProductsToCollectionWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchLinkProductsToCollectionWorkflow/index.html.md) - [batchProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchProductsWorkflow/index.html.md) - [createProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTagsWorkflow/index.html.md) +- [createCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCollectionsWorkflow/index.html.md) +- [createProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductOptionsWorkflow/index.html.md) +- [createProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTypesWorkflow/index.html.md) - [createProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductVariantsWorkflow/index.html.md) - [createProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductsWorkflow/index.html.md) -- [createProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTypesWorkflow/index.html.md) - [deleteCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCollectionsWorkflow/index.html.md) -- [deleteProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTagsWorkflow/index.html.md) - [deleteProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductOptionsWorkflow/index.html.md) - [deleteProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTypesWorkflow/index.html.md) - [deleteProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductVariantsWorkflow/index.html.md) -- [importProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/importProductsWorkflow/index.html.md) -- [exportProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/exportProductsWorkflow/index.html.md) -- [updateCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCollectionsWorkflow/index.html.md) +- [deleteProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTagsWorkflow/index.html.md) - [deleteProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductsWorkflow/index.html.md) +- [exportProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/exportProductsWorkflow/index.html.md) - [updateProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductOptionsWorkflow/index.html.md) -- [updateProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTagsWorkflow/index.html.md) +- [importProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/importProductsWorkflow/index.html.md) +- [updateCollectionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCollectionsWorkflow/index.html.md) - [updateProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTypesWorkflow/index.html.md) -- [updateProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductsWorkflow/index.html.md) -- [upsertVariantPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/upsertVariantPricesWorkflow/index.html.md) - [updateProductVariantsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductVariantsWorkflow/index.html.md) +- [upsertVariantPricesWorkflow](https://docs.medusajs.com/references/medusa-workflows/upsertVariantPricesWorkflow/index.html.md) +- [updateProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTagsWorkflow/index.html.md) +- [updateProductsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductsWorkflow/index.html.md) - [validateProductInputStep](https://docs.medusajs.com/references/medusa-workflows/validateProductInputStep/index.html.md) +- [updatePricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePricePreferencesWorkflow/index.html.md) +- [deletePricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePricePreferencesWorkflow/index.html.md) +- [createPricePreferencesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPricePreferencesWorkflow/index.html.md) +- [deleteRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteRegionsWorkflow/index.html.md) +- [createRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createRegionsWorkflow/index.html.md) +- [updateRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateRegionsWorkflow/index.html.md) - [createProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductCategoriesWorkflow/index.html.md) -- [updateProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductCategoriesWorkflow/index.html.md) - [deleteProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductCategoriesWorkflow/index.html.md) +- [updateProductCategoriesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductCategoriesWorkflow/index.html.md) +- [addOrRemoveCampaignPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow/index.html.md) - [batchPromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/batchPromotionRulesWorkflow/index.html.md) - [createCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCampaignsWorkflow/index.html.md) -- [addOrRemoveCampaignPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow/index.html.md) +- [createPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPromotionsWorkflow/index.html.md) - [createPromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPromotionRulesWorkflow/index.html.md) - [deleteCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCampaignsWorkflow/index.html.md) -- [createPromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createPromotionsWorkflow/index.html.md) - [deletePromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePromotionRulesWorkflow/index.html.md) - [deletePromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deletePromotionsWorkflow/index.html.md) -- [updateCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCampaignsWorkflow/index.html.md) - [updatePromotionRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionRulesWorkflow/index.html.md) -- [updatePromotionsStatusWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsStatusWorkflow/index.html.md) +- [updateCampaignsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCampaignsWorkflow/index.html.md) - [updatePromotionsValidationStep](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsValidationStep/index.html.md) -- [createRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createRegionsWorkflow/index.html.md) +- [updatePromotionsStatusWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsStatusWorkflow/index.html.md) - [updatePromotionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updatePromotionsWorkflow/index.html.md) -- [deleteRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteRegionsWorkflow/index.html.md) -- [updateRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateRegionsWorkflow/index.html.md) +- [deleteReservationsByLineItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReservationsByLineItemsWorkflow/index.html.md) +- [deleteReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReservationsWorkflow/index.html.md) +- [createReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReservationsWorkflow/index.html.md) +- [updateReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReservationsWorkflow/index.html.md) - [createReturnReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReturnReasonsWorkflow/index.html.md) - [deleteReturnReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReturnReasonsWorkflow/index.html.md) - [updateReturnReasonsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReturnReasonsWorkflow/index.html.md) -- [createReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createReservationsWorkflow/index.html.md) -- [deleteReservationsByLineItemsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReservationsByLineItemsWorkflow/index.html.md) -- [updateReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateReservationsWorkflow/index.html.md) -- [deleteReservationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteReservationsWorkflow/index.html.md) -- [deleteSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteSalesChannelsWorkflow/index.html.md) - [createSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createSalesChannelsWorkflow/index.html.md) +- [deleteSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteSalesChannelsWorkflow/index.html.md) - [linkProductsToSalesChannelWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkProductsToSalesChannelWorkflow/index.html.md) - [updateSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateSalesChannelsWorkflow/index.html.md) -- [validateStepShippingProfileDelete](https://docs.medusajs.com/references/medusa-workflows/validateStepShippingProfileDelete/index.html.md) - [deleteShippingProfileWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteShippingProfileWorkflow/index.html.md) -- [createStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/createStoresWorkflow/index.html.md) -- [updateStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateStoresWorkflow/index.html.md) -- [deleteStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteStoresWorkflow/index.html.md) +- [validateStepShippingProfileDelete](https://docs.medusajs.com/references/medusa-workflows/validateStepShippingProfileDelete/index.html.md) - [createLocationFulfillmentSetWorkflow](https://docs.medusajs.com/references/medusa-workflows/createLocationFulfillmentSetWorkflow/index.html.md) -- [createStockLocationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createStockLocationsWorkflow/index.html.md) - [deleteStockLocationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteStockLocationsWorkflow/index.html.md) -- [updateStockLocationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateStockLocationsWorkflow/index.html.md) +- [createStockLocationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createStockLocationsWorkflow/index.html.md) - [linkSalesChannelsToStockLocationWorkflow](https://docs.medusajs.com/references/medusa-workflows/linkSalesChannelsToStockLocationWorkflow/index.html.md) -- [createTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRateRulesWorkflow/index.html.md) -- [createTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRatesWorkflow/index.html.md) -- [createTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRegionsWorkflow/index.html.md) -- [deleteTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRateRulesWorkflow/index.html.md) -- [deleteTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRatesWorkflow/index.html.md) -- [deleteTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRegionsWorkflow/index.html.md) -- [maybeListTaxRateRuleIdsStep](https://docs.medusajs.com/references/medusa-workflows/maybeListTaxRateRuleIdsStep/index.html.md) -- [updateTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxRatesWorkflow/index.html.md) -- [setTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/setTaxRateRulesWorkflow/index.html.md) -- [updateTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxRegionsWorkflow/index.html.md) -- [deleteUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteUsersWorkflow/index.html.md) +- [updateStockLocationsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateStockLocationsWorkflow/index.html.md) +- [deleteStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteStoresWorkflow/index.html.md) +- [updateStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateStoresWorkflow/index.html.md) +- [createStoresWorkflow](https://docs.medusajs.com/references/medusa-workflows/createStoresWorkflow/index.html.md) - [createUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUsersWorkflow/index.html.md) +- [deleteUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteUsersWorkflow/index.html.md) +- [removeUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeUserAccountWorkflow/index.html.md) - [createUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUserAccountWorkflow/index.html.md) - [updateUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateUsersWorkflow/index.html.md) -- [removeUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeUserAccountWorkflow/index.html.md) -- [createCustomerAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerAccountWorkflow/index.html.md) -- [deleteCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomerAddressesWorkflow/index.html.md) -- [deleteCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteCustomersWorkflow/index.html.md) -- [removeCustomerAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeCustomerAccountWorkflow/index.html.md) -- [updateCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomerAddressesWorkflow/index.html.md) -- [createCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomersWorkflow/index.html.md) -- [createCustomerAddressesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createCustomerAddressesWorkflow/index.html.md) -- [updateCustomersWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateCustomersWorkflow/index.html.md) +- [createTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRateRulesWorkflow/index.html.md) +- [createTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRatesWorkflow/index.html.md) +- [deleteTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRatesWorkflow/index.html.md) +- [createTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createTaxRegionsWorkflow/index.html.md) +- [deleteTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRateRulesWorkflow/index.html.md) +- [deleteTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteTaxRegionsWorkflow/index.html.md) +- [updateTaxRatesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxRatesWorkflow/index.html.md) +- [setTaxRateRulesWorkflow](https://docs.medusajs.com/references/medusa-workflows/setTaxRateRulesWorkflow/index.html.md) +- [maybeListTaxRateRuleIdsStep](https://docs.medusajs.com/references/medusa-workflows/maybeListTaxRateRuleIdsStep/index.html.md) +- [updateTaxRegionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateTaxRegionsWorkflow/index.html.md) ## Steps +- [setAuthAppMetadataStep](https://docs.medusajs.com/references/medusa-workflows/steps/setAuthAppMetadataStep/index.html.md) +- [createApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/createApiKeysStep/index.html.md) - [deleteApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteApiKeysStep/index.html.md) -- [linkSalesChannelsToApiKeyStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkSalesChannelsToApiKeyStep/index.html.md) - [revokeApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/revokeApiKeysStep/index.html.md) - [updateApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateApiKeysStep/index.html.md) +- [linkSalesChannelsToApiKeyStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkSalesChannelsToApiKeyStep/index.html.md) - [validateSalesChannelsExistStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateSalesChannelsExistStep/index.html.md) -- [createApiKeysStep](https://docs.medusajs.com/references/medusa-workflows/steps/createApiKeysStep/index.html.md) -- [createRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRemoteLinkStep/index.html.md) -- [dismissRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/dismissRemoteLinkStep/index.html.md) -- [emitEventStep](https://docs.medusajs.com/references/medusa-workflows/steps/emitEventStep/index.html.md) -- [removeRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeRemoteLinkStep/index.html.md) -- [useRemoteQueryStep](https://docs.medusajs.com/references/medusa-workflows/steps/useRemoteQueryStep/index.html.md) -- [useQueryGraphStep](https://docs.medusajs.com/references/medusa-workflows/steps/useQueryGraphStep/index.html.md) -- [updateRemoteLinksStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRemoteLinksStep/index.html.md) -- [validatePresenceOfStep](https://docs.medusajs.com/references/medusa-workflows/steps/validatePresenceOfStep/index.html.md) -- [setAuthAppMetadataStep](https://docs.medusajs.com/references/medusa-workflows/steps/setAuthAppMetadataStep/index.html.md) -- [createCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomerAddressesStep/index.html.md) -- [deleteCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomerAddressesStep/index.html.md) -- [createCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomersStep/index.html.md) -- [maybeUnsetDefaultBillingAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/maybeUnsetDefaultBillingAddressesStep/index.html.md) -- [deleteCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomersStep/index.html.md) -- [updateCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomerAddressesStep/index.html.md) -- [maybeUnsetDefaultShippingAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/maybeUnsetDefaultShippingAddressesStep/index.html.md) -- [updateCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomersStep/index.html.md) -- [validateCustomerAccountCreation](https://docs.medusajs.com/references/medusa-workflows/steps/validateCustomerAccountCreation/index.html.md) -- [createDefaultStoreStep](https://docs.medusajs.com/references/medusa-workflows/steps/createDefaultStoreStep/index.html.md) - [addShippingMethodToCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/addShippingMethodToCartStep/index.html.md) - [confirmInventoryStep](https://docs.medusajs.com/references/medusa-workflows/steps/confirmInventoryStep/index.html.md) -- [createCartsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCartsStep/index.html.md) - [createLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createLineItemsStep/index.html.md) - [createLineItemAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createLineItemAdjustmentsStep/index.html.md) - [createPaymentCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentCollectionsStep/index.html.md) -- [findOrCreateCustomerStep](https://docs.medusajs.com/references/medusa-workflows/steps/findOrCreateCustomerStep/index.html.md) +- [createCartsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCartsStep/index.html.md) - [createShippingMethodAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingMethodAdjustmentsStep/index.html.md) +- [findOrCreateCustomerStep](https://docs.medusajs.com/references/medusa-workflows/steps/findOrCreateCustomerStep/index.html.md) - [findOneOrAnyRegionStep](https://docs.medusajs.com/references/medusa-workflows/steps/findOneOrAnyRegionStep/index.html.md) +- [getActionsToComputeFromPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getActionsToComputeFromPromotionsStep/index.html.md) +- [getLineItemActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getLineItemActionsStep/index.html.md) - [findSalesChannelStep](https://docs.medusajs.com/references/medusa-workflows/steps/findSalesChannelStep/index.html.md) - [getPromotionCodesToApply](https://docs.medusajs.com/references/medusa-workflows/steps/getPromotionCodesToApply/index.html.md) -- [getLineItemActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getLineItemActionsStep/index.html.md) -- [getActionsToComputeFromPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getActionsToComputeFromPromotionsStep/index.html.md) - [getVariantPriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getVariantPriceSetsStep/index.html.md) -- [prepareAdjustmentsFromPromotionActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/prepareAdjustmentsFromPromotionActionsStep/index.html.md) -- [removeLineItemAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeLineItemAdjustmentsStep/index.html.md) - [getVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getVariantsStep/index.html.md) +- [removeLineItemAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeLineItemAdjustmentsStep/index.html.md) +- [prepareAdjustmentsFromPromotionActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/prepareAdjustmentsFromPromotionActionsStep/index.html.md) - [removeShippingMethodAdjustmentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeShippingMethodAdjustmentsStep/index.html.md) -- [reserveInventoryStep](https://docs.medusajs.com/references/medusa-workflows/steps/reserveInventoryStep/index.html.md) -- [retrieveCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/retrieveCartStep/index.html.md) - [removeShippingMethodFromCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeShippingMethodFromCartStep/index.html.md) - [setTaxLinesForItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/setTaxLinesForItemsStep/index.html.md) +- [retrieveCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/retrieveCartStep/index.html.md) +- [reserveInventoryStep](https://docs.medusajs.com/references/medusa-workflows/steps/reserveInventoryStep/index.html.md) - [updateCartsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCartsStep/index.html.md) -- [updateShippingMethodsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingMethodsStep/index.html.md) - [updateCartPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCartPromotionsStep/index.html.md) - [updateLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateLineItemsStep/index.html.md) +- [updateShippingMethodsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingMethodsStep/index.html.md) - [validateAndReturnShippingMethodsDataStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateAndReturnShippingMethodsDataStep/index.html.md) -- [validateCartShippingOptionsPriceStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartShippingOptionsPriceStep/index.html.md) -- [validateCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartStep/index.html.md) - [validateCartPaymentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartPaymentsStep/index.html.md) - [validateCartShippingOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartShippingOptionsStep/index.html.md) +- [validateCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartStep/index.html.md) - [validateLineItemPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateLineItemPricesStep/index.html.md) +- [validateCartShippingOptionsPriceStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateCartShippingOptionsPriceStep/index.html.md) - [validateShippingStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateShippingStep/index.html.md) - [validateVariantPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateVariantPricesStep/index.html.md) -- [uploadFilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/uploadFilesStep/index.html.md) +- [createCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomersStep/index.html.md) +- [createCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomerAddressesStep/index.html.md) +- [maybeUnsetDefaultBillingAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/maybeUnsetDefaultBillingAddressesStep/index.html.md) +- [deleteCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomersStep/index.html.md) +- [deleteCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomerAddressesStep/index.html.md) +- [maybeUnsetDefaultShippingAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/maybeUnsetDefaultShippingAddressesStep/index.html.md) +- [updateCustomerAddressesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomerAddressesStep/index.html.md) +- [updateCustomersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomersStep/index.html.md) +- [validateCustomerAccountCreation](https://docs.medusajs.com/references/medusa-workflows/steps/validateCustomerAccountCreation/index.html.md) +- [dismissRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/dismissRemoteLinkStep/index.html.md) +- [emitEventStep](https://docs.medusajs.com/references/medusa-workflows/steps/emitEventStep/index.html.md) +- [createRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRemoteLinkStep/index.html.md) +- [removeRemoteLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeRemoteLinkStep/index.html.md) +- [updateRemoteLinksStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRemoteLinksStep/index.html.md) +- [useQueryGraphStep](https://docs.medusajs.com/references/medusa-workflows/steps/useQueryGraphStep/index.html.md) +- [useRemoteQueryStep](https://docs.medusajs.com/references/medusa-workflows/steps/useRemoteQueryStep/index.html.md) +- [validatePresenceOfStep](https://docs.medusajs.com/references/medusa-workflows/steps/validatePresenceOfStep/index.html.md) +- [createDefaultStoreStep](https://docs.medusajs.com/references/medusa-workflows/steps/createDefaultStoreStep/index.html.md) - [deleteFilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteFilesStep/index.html.md) +- [uploadFilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/uploadFilesStep/index.html.md) - [buildPriceSet](https://docs.medusajs.com/references/medusa-workflows/steps/buildPriceSet/index.html.md) -- [calculateShippingOptionsPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/calculateShippingOptionsPricesStep/index.html.md) -- [createFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/createFulfillmentStep/index.html.md) - [cancelFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelFulfillmentStep/index.html.md) -- [createReturnFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReturnFulfillmentStep/index.html.md) +- [calculateShippingOptionsPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/calculateShippingOptionsPricesStep/index.html.md) - [createFulfillmentSets](https://docs.medusajs.com/references/medusa-workflows/steps/createFulfillmentSets/index.html.md) +- [createReturnFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReturnFulfillmentStep/index.html.md) - [createServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createServiceZonesStep/index.html.md) +- [createShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingOptionRulesStep/index.html.md) +- [createFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/createFulfillmentStep/index.html.md) +- [createShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingProfilesStep/index.html.md) - [createShippingOptionsPriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingOptionsPriceSetsStep/index.html.md) - [deleteFulfillmentSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteFulfillmentSetsStep/index.html.md) -- [createShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingProfilesStep/index.html.md) -- [createShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createShippingOptionRulesStep/index.html.md) - [deleteServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteServiceZonesStep/index.html.md) +- [deleteShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingOptionRulesStep/index.html.md) - [deleteShippingOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingOptionsStep/index.html.md) - [setShippingOptionsPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/setShippingOptionsPricesStep/index.html.md) -- [deleteShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingOptionRulesStep/index.html.md) - [updateFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateFulfillmentStep/index.html.md) - [updateShippingOptionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingOptionRulesStep/index.html.md) -- [updateServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateServiceZonesStep/index.html.md) - [updateShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateShippingProfilesStep/index.html.md) +- [updateServiceZonesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateServiceZonesStep/index.html.md) - [upsertShippingOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/upsertShippingOptionsStep/index.html.md) - [validateShippingOptionPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateShippingOptionPricesStep/index.html.md) - [validateShipmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateShipmentStep/index.html.md) -- [adjustInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/adjustInventoryLevelsStep/index.html.md) +- [createCustomerGroupsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomerGroupsStep/index.html.md) +- [linkCustomerGroupsToCustomerStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkCustomerGroupsToCustomerStep/index.html.md) +- [linkCustomersToCustomerGroupStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkCustomersToCustomerGroupStep/index.html.md) +- [deleteCustomerGroupStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomerGroupStep/index.html.md) +- [updateCustomerGroupsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomerGroupsStep/index.html.md) - [attachInventoryItemToVariants](https://docs.medusajs.com/references/medusa-workflows/steps/attachInventoryItemToVariants/index.html.md) -- [deleteInventoryItemStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInventoryItemStep/index.html.md) -- [createInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createInventoryLevelsStep/index.html.md) - [createInventoryItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createInventoryItemsStep/index.html.md) +- [adjustInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/adjustInventoryLevelsStep/index.html.md) +- [deleteInventoryItemStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInventoryItemStep/index.html.md) +- [updateInventoryItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateInventoryItemsStep/index.html.md) +- [createInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createInventoryLevelsStep/index.html.md) +- [updateInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateInventoryLevelsStep/index.html.md) - [deleteInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInventoryLevelsStep/index.html.md) - [validateInventoryDeleteStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateInventoryDeleteStep/index.html.md) -- [updateInventoryLevelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateInventoryLevelsStep/index.html.md) -- [updateInventoryItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateInventoryItemsStep/index.html.md) - [validateInventoryItemsForCreate](https://docs.medusajs.com/references/medusa-workflows/steps/validateInventoryItemsForCreate/index.html.md) - [validateInventoryLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateInventoryLocationsStep/index.html.md) - [deleteInvitesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteInvitesStep/index.html.md) -- [refreshInviteTokensStep](https://docs.medusajs.com/references/medusa-workflows/steps/refreshInviteTokensStep/index.html.md) - [createInviteStep](https://docs.medusajs.com/references/medusa-workflows/steps/createInviteStep/index.html.md) +- [refreshInviteTokensStep](https://docs.medusajs.com/references/medusa-workflows/steps/refreshInviteTokensStep/index.html.md) - [validateTokenStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateTokenStep/index.html.md) -- [notifyOnFailureStep](https://docs.medusajs.com/references/medusa-workflows/steps/notifyOnFailureStep/index.html.md) -- [sendNotificationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/sendNotificationsStep/index.html.md) +- [deleteLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteLineItemsStep/index.html.md) - [updateLineItemsStepWithSelector](https://docs.medusajs.com/references/medusa-workflows/steps/updateLineItemsStepWithSelector/index.html.md) - [listLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/listLineItemsStep/index.html.md) -- [deleteLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteLineItemsStep/index.html.md) +- [notifyOnFailureStep](https://docs.medusajs.com/references/medusa-workflows/steps/notifyOnFailureStep/index.html.md) +- [sendNotificationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/sendNotificationsStep/index.html.md) +- [capturePaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/capturePaymentStep/index.html.md) +- [cancelPaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelPaymentStep/index.html.md) +- [authorizePaymentSessionStep](https://docs.medusajs.com/references/medusa-workflows/steps/authorizePaymentSessionStep/index.html.md) +- [refundPaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/refundPaymentStep/index.html.md) +- [refundPaymentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/refundPaymentsStep/index.html.md) +- [createPriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceListPricesStep/index.html.md) +- [deletePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePriceListsStep/index.html.md) +- [createPriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceListsStep/index.html.md) +- [getExistingPriceListsPriceIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getExistingPriceListsPriceIdsStep/index.html.md) +- [removePriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/removePriceListPricesStep/index.html.md) +- [updatePriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceListPricesStep/index.html.md) +- [updatePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceListsStep/index.html.md) +- [validatePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validatePriceListsStep/index.html.md) +- [validateVariantPriceLinksStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateVariantPriceLinksStep/index.html.md) - [addOrderTransactionStep](https://docs.medusajs.com/references/medusa-workflows/steps/addOrderTransactionStep/index.html.md) -- [archiveOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/archiveOrdersStep/index.html.md) - [cancelOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderChangeStep/index.html.md) +- [archiveOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/archiveOrdersStep/index.html.md) - [cancelOrderClaimStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderClaimStep/index.html.md) -- [cancelOrderReturnStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderReturnStep/index.html.md) - [cancelOrderFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderFulfillmentStep/index.html.md) -- [cancelOrderExchangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderExchangeStep/index.html.md) -- [createOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderChangeStep/index.html.md) - [cancelOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrdersStep/index.html.md) +- [cancelOrderReturnStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderReturnStep/index.html.md) +- [cancelOrderExchangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelOrderExchangeStep/index.html.md) - [createCompleteReturnStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCompleteReturnStep/index.html.md) +- [createOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderChangeStep/index.html.md) - [completeOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/completeOrdersStep/index.html.md) -- [createOrderClaimItemsFromActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderClaimItemsFromActionsStep/index.html.md) -- [createOrderClaimsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderClaimsStep/index.html.md) -- [createOrderExchangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderExchangesStep/index.html.md) - [createOrderExchangeItemsFromActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderExchangeItemsFromActionsStep/index.html.md) +- [createOrderClaimItemsFromActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderClaimItemsFromActionsStep/index.html.md) +- [createOrderExchangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderExchangesStep/index.html.md) +- [createOrderClaimsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderClaimsStep/index.html.md) - [createOrderLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrderLineItemsStep/index.html.md) - [createOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/createOrdersStep/index.html.md) - [createReturnsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReturnsStep/index.html.md) -- [declineOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/declineOrderChangeStep/index.html.md) - [deleteClaimsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteClaimsStep/index.html.md) +- [declineOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/declineOrderChangeStep/index.html.md) - [deleteExchangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteExchangesStep/index.html.md) -- [deleteOrderLineItems](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderLineItems/index.html.md) - [deleteOrderChangeActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderChangeActionsStep/index.html.md) -- [deleteOrderChangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderChangesStep/index.html.md) - [deleteOrderShippingMethods](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderShippingMethods/index.html.md) -- [previewOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/previewOrderChangeStep/index.html.md) +- [deleteOrderChangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderChangesStep/index.html.md) +- [deleteOrderLineItems](https://docs.medusajs.com/references/medusa-workflows/steps/deleteOrderLineItems/index.html.md) - [deleteReturnsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReturnsStep/index.html.md) - [registerOrderChangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/registerOrderChangesStep/index.html.md) -- [registerOrderShipmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/registerOrderShipmentStep/index.html.md) +- [previewOrderChangeStep](https://docs.medusajs.com/references/medusa-workflows/steps/previewOrderChangeStep/index.html.md) - [registerOrderFulfillmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/registerOrderFulfillmentStep/index.html.md) +- [registerOrderShipmentStep](https://docs.medusajs.com/references/medusa-workflows/steps/registerOrderShipmentStep/index.html.md) - [updateOrderChangeActionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrderChangeActionsStep/index.html.md) - [setOrderTaxLinesForItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/setOrderTaxLinesForItemsStep/index.html.md) - [updateOrderChangesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrderChangesStep/index.html.md) -- [updateOrderShippingMethodsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrderShippingMethodsStep/index.html.md) - [updateReturnItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReturnItemsStep/index.html.md) - [updateOrdersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrdersStep/index.html.md) +- [updateOrderShippingMethodsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateOrderShippingMethodsStep/index.html.md) - [updateReturnsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReturnsStep/index.html.md) -- [authorizePaymentSessionStep](https://docs.medusajs.com/references/medusa-workflows/steps/authorizePaymentSessionStep/index.html.md) -- [capturePaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/capturePaymentStep/index.html.md) -- [cancelPaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/cancelPaymentStep/index.html.md) -- [refundPaymentsStep](https://docs.medusajs.com/references/medusa-workflows/steps/refundPaymentsStep/index.html.md) -- [refundPaymentStep](https://docs.medusajs.com/references/medusa-workflows/steps/refundPaymentStep/index.html.md) -- [createPriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceListPricesStep/index.html.md) -- [createPriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceListsStep/index.html.md) -- [deletePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePriceListsStep/index.html.md) -- [removePriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/removePriceListPricesStep/index.html.md) -- [getExistingPriceListsPriceIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getExistingPriceListsPriceIdsStep/index.html.md) -- [validateVariantPriceLinksStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateVariantPriceLinksStep/index.html.md) -- [updatePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceListsStep/index.html.md) -- [updatePriceListPricesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceListPricesStep/index.html.md) -- [validatePriceListsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validatePriceListsStep/index.html.md) -- [createPaymentAccountHolderStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentAccountHolderStep/index.html.md) -- [createPaymentSessionStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentSessionStep/index.html.md) -- [createRefundReasonStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRefundReasonStep/index.html.md) -- [deletePaymentSessionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePaymentSessionsStep/index.html.md) -- [deleteRefundReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteRefundReasonsStep/index.html.md) -- [updatePaymentCollectionStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePaymentCollectionStep/index.html.md) -- [updateRefundReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRefundReasonsStep/index.html.md) -- [validateDeletedPaymentSessionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateDeletedPaymentSessionsStep/index.html.md) -- [createCustomerGroupsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCustomerGroupsStep/index.html.md) -- [deleteCustomerGroupStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCustomerGroupStep/index.html.md) -- [linkCustomerGroupsToCustomerStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkCustomerGroupsToCustomerStep/index.html.md) -- [linkCustomersToCustomerGroupStep](https://docs.medusajs.com/references/medusa-workflows/steps/linkCustomersToCustomerGroupStep/index.html.md) -- [updateCustomerGroupsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCustomerGroupsStep/index.html.md) +- [createPricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPricePreferencesStep/index.html.md) +- [createPriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceSetsStep/index.html.md) +- [updatePricePreferencesAsArrayStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePricePreferencesAsArrayStep/index.html.md) +- [deletePricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePricePreferencesStep/index.html.md) +- [updatePricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePricePreferencesStep/index.html.md) +- [updatePriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceSetsStep/index.html.md) - [batchLinkProductsToCategoryStep](https://docs.medusajs.com/references/medusa-workflows/steps/batchLinkProductsToCategoryStep/index.html.md) - [batchLinkProductsToCollectionStep](https://docs.medusajs.com/references/medusa-workflows/steps/batchLinkProductsToCollectionStep/index.html.md) - [createCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCollectionsStep/index.html.md) @@ -26886,61 +26884,34 @@ For each product variant, you: - [createProductTagsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductTagsStep/index.html.md) - [createProductTypesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductTypesStep/index.html.md) - [createProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductsStep/index.html.md) -- [createVariantPricingLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/createVariantPricingLinkStep/index.html.md) - [createProductVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductVariantsStep/index.html.md) +- [createVariantPricingLinkStep](https://docs.medusajs.com/references/medusa-workflows/steps/createVariantPricingLinkStep/index.html.md) - [deleteCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCollectionsStep/index.html.md) - [deleteProductOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductOptionsStep/index.html.md) -- [deleteProductTypesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductTypesStep/index.html.md) - [deleteProductTagsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductTagsStep/index.html.md) -- [deleteProductVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductVariantsStep/index.html.md) -- [getAllProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getAllProductsStep/index.html.md) -- [generateProductCsvStep](https://docs.medusajs.com/references/medusa-workflows/steps/generateProductCsvStep/index.html.md) +- [deleteProductTypesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductTypesStep/index.html.md) - [deleteProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductsStep/index.html.md) +- [generateProductCsvStep](https://docs.medusajs.com/references/medusa-workflows/steps/generateProductCsvStep/index.html.md) +- [getAllProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getAllProductsStep/index.html.md) - [getProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/getProductsStep/index.html.md) - [getVariantAvailabilityStep](https://docs.medusajs.com/references/medusa-workflows/steps/getVariantAvailabilityStep/index.html.md) +- [deleteProductVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductVariantsStep/index.html.md) - [groupProductsForBatchStep](https://docs.medusajs.com/references/medusa-workflows/steps/groupProductsForBatchStep/index.html.md) - [parseProductCsvStep](https://docs.medusajs.com/references/medusa-workflows/steps/parseProductCsvStep/index.html.md) - [updateCollectionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCollectionsStep/index.html.md) - [updateProductOptionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductOptionsStep/index.html.md) -- [updateProductTypesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductTypesStep/index.html.md) - [updateProductTagsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductTagsStep/index.html.md) - [updateProductVariantsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductVariantsStep/index.html.md) -- [updateProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductsStep/index.html.md) +- [updateProductTypesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductTypesStep/index.html.md) - [waitConfirmationProductImportStep](https://docs.medusajs.com/references/medusa-workflows/steps/waitConfirmationProductImportStep/index.html.md) +- [updateProductsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductsStep/index.html.md) +- [deleteProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductCategoriesStep/index.html.md) - [createProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createProductCategoriesStep/index.html.md) - [updateProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateProductCategoriesStep/index.html.md) -- [deleteProductCategoriesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteProductCategoriesStep/index.html.md) -- [createPriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPriceSetsStep/index.html.md) -- [deletePricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePricePreferencesStep/index.html.md) -- [createPricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPricePreferencesStep/index.html.md) -- [updatePriceSetsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePriceSetsStep/index.html.md) -- [updatePricePreferencesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePricePreferencesStep/index.html.md) -- [updatePricePreferencesAsArrayStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePricePreferencesAsArrayStep/index.html.md) -- [createRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRegionsStep/index.html.md) -- [updateRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRegionsStep/index.html.md) -- [setRegionsPaymentProvidersStep](https://docs.medusajs.com/references/medusa-workflows/steps/setRegionsPaymentProvidersStep/index.html.md) -- [deleteRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteRegionsStep/index.html.md) -- [createReturnReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReturnReasonsStep/index.html.md) -- [deleteReturnReasonStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReturnReasonStep/index.html.md) -- [updateReturnReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReturnReasonsStep/index.html.md) -- [createReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReservationsStep/index.html.md) -- [deleteReservationsByLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReservationsByLineItemsStep/index.html.md) -- [deleteReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReservationsStep/index.html.md) -- [updateReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReservationsStep/index.html.md) -- [associateLocationsWithSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/associateLocationsWithSalesChannelsStep/index.html.md) -- [listShippingOptionsForContextStep](https://docs.medusajs.com/references/medusa-workflows/steps/listShippingOptionsForContextStep/index.html.md) -- [canDeleteSalesChannelsOrThrowStep](https://docs.medusajs.com/references/medusa-workflows/steps/canDeleteSalesChannelsOrThrowStep/index.html.md) -- [createDefaultSalesChannelStep](https://docs.medusajs.com/references/medusa-workflows/steps/createDefaultSalesChannelStep/index.html.md) -- [createSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createSalesChannelsStep/index.html.md) -- [associateProductsWithSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/associateProductsWithSalesChannelsStep/index.html.md) -- [detachLocationsFromSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/detachLocationsFromSalesChannelsStep/index.html.md) -- [detachProductsFromSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/detachProductsFromSalesChannelsStep/index.html.md) -- [updateSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateSalesChannelsStep/index.html.md) -- [deleteSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteSalesChannelsStep/index.html.md) - [addCampaignPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/addCampaignPromotionsStep/index.html.md) - [addRulesToPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/addRulesToPromotionsStep/index.html.md) -- [createCampaignsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCampaignsStep/index.html.md) - [createPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPromotionsStep/index.html.md) +- [createCampaignsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createCampaignsStep/index.html.md) - [deleteCampaignsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteCampaignsStep/index.html.md) - [deletePromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePromotionsStep/index.html.md) - [removeCampaignPromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/removeCampaignPromotionsStep/index.html.md) @@ -26948,27 +26919,56 @@ For each product variant, you: - [updateCampaignsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateCampaignsStep/index.html.md) - [updatePromotionRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePromotionRulesStep/index.html.md) - [updatePromotionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePromotionsStep/index.html.md) +- [createRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRegionsStep/index.html.md) +- [deleteRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteRegionsStep/index.html.md) +- [setRegionsPaymentProvidersStep](https://docs.medusajs.com/references/medusa-workflows/steps/setRegionsPaymentProvidersStep/index.html.md) +- [updateRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRegionsStep/index.html.md) +- [createReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReservationsStep/index.html.md) +- [deleteReservationsByLineItemsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReservationsByLineItemsStep/index.html.md) +- [deleteReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReservationsStep/index.html.md) +- [updateReservationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReservationsStep/index.html.md) +- [createRefundReasonStep](https://docs.medusajs.com/references/medusa-workflows/steps/createRefundReasonStep/index.html.md) +- [createPaymentAccountHolderStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentAccountHolderStep/index.html.md) +- [createPaymentSessionStep](https://docs.medusajs.com/references/medusa-workflows/steps/createPaymentSessionStep/index.html.md) +- [deletePaymentSessionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deletePaymentSessionsStep/index.html.md) +- [updateRefundReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateRefundReasonsStep/index.html.md) +- [updatePaymentCollectionStep](https://docs.medusajs.com/references/medusa-workflows/steps/updatePaymentCollectionStep/index.html.md) +- [deleteRefundReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteRefundReasonsStep/index.html.md) +- [validateDeletedPaymentSessionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/validateDeletedPaymentSessionsStep/index.html.md) +- [createReturnReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createReturnReasonsStep/index.html.md) +- [updateReturnReasonsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateReturnReasonsStep/index.html.md) +- [deleteReturnReasonStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteReturnReasonStep/index.html.md) +- [associateLocationsWithSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/associateLocationsWithSalesChannelsStep/index.html.md) +- [associateProductsWithSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/associateProductsWithSalesChannelsStep/index.html.md) +- [canDeleteSalesChannelsOrThrowStep](https://docs.medusajs.com/references/medusa-workflows/steps/canDeleteSalesChannelsOrThrowStep/index.html.md) +- [createDefaultSalesChannelStep](https://docs.medusajs.com/references/medusa-workflows/steps/createDefaultSalesChannelStep/index.html.md) +- [createSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createSalesChannelsStep/index.html.md) +- [deleteSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteSalesChannelsStep/index.html.md) +- [detachLocationsFromSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/detachLocationsFromSalesChannelsStep/index.html.md) +- [detachProductsFromSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/detachProductsFromSalesChannelsStep/index.html.md) +- [updateSalesChannelsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateSalesChannelsStep/index.html.md) +- [listShippingOptionsForContextStep](https://docs.medusajs.com/references/medusa-workflows/steps/listShippingOptionsForContextStep/index.html.md) - [deleteShippingProfilesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteShippingProfilesStep/index.html.md) -- [createStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/createStoresStep/index.html.md) -- [updateStockLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateStockLocationsStep/index.html.md) -- [createStockLocations](https://docs.medusajs.com/references/medusa-workflows/steps/createStockLocations/index.html.md) -- [deleteStockLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteStockLocationsStep/index.html.md) - [deleteStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteStoresStep/index.html.md) +- [createStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/createStoresStep/index.html.md) - [updateStoresStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateStoresStep/index.html.md) -- [createUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/createUsersStep/index.html.md) -- [updateUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateUsersStep/index.html.md) -- [deleteUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteUsersStep/index.html.md) - [createTaxRateRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createTaxRateRulesStep/index.html.md) -- [createTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createTaxRegionsStep/index.html.md) - [createTaxRatesStep](https://docs.medusajs.com/references/medusa-workflows/steps/createTaxRatesStep/index.html.md) -- [deleteTaxRateRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteTaxRateRulesStep/index.html.md) +- [createTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/createTaxRegionsStep/index.html.md) - [deleteTaxRatesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteTaxRatesStep/index.html.md) +- [deleteTaxRateRulesStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteTaxRateRulesStep/index.html.md) - [deleteTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteTaxRegionsStep/index.html.md) - [getItemTaxLinesStep](https://docs.medusajs.com/references/medusa-workflows/steps/getItemTaxLinesStep/index.html.md) - [listTaxRateIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/listTaxRateIdsStep/index.html.md) - [listTaxRateRuleIdsStep](https://docs.medusajs.com/references/medusa-workflows/steps/listTaxRateRuleIdsStep/index.html.md) -- [updateTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateTaxRegionsStep/index.html.md) - [updateTaxRatesStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateTaxRatesStep/index.html.md) +- [updateTaxRegionsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateTaxRegionsStep/index.html.md) +- [deleteStockLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteStockLocationsStep/index.html.md) +- [updateStockLocationsStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateStockLocationsStep/index.html.md) +- [createStockLocations](https://docs.medusajs.com/references/medusa-workflows/steps/createStockLocations/index.html.md) +- [createUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/createUsersStep/index.html.md) +- [deleteUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/deleteUsersStep/index.html.md) +- [updateUsersStep](https://docs.medusajs.com/references/medusa-workflows/steps/updateUsersStep/index.html.md) # Medusa CLI Reference @@ -27072,20 +27072,33 @@ npx medusa develop |\`-p \\`|Set port of the Medusa server.|\`9000\`| -# exec Command - Medusa CLI Reference +# new Command - Medusa CLI Reference -Run a custom CLI script. Learn more about it in [this guide](https://docs.medusajs.com/docs/learn/fundamentals/custom-cli-scripts/index.html.md). +Create a new Medusa application. Unlike the `create-medusa-app` CLI tool, this command provides more flexibility for experienced Medusa developers in creating and configuring their project. ```bash -npx medusa exec [file] [args...] +medusa new [ []] ``` ## Arguments -|Argument|Description|Required| -|---|---|---|---|---| -|\`file\`|The path to the TypeScript or JavaScript file holding the function to execute.|Yes| -|\`args\`|A list of arguments to pass to the function. These arguments are passed in the |No| +|Argument|Description|Required|Default| +|---|---|---|---|---|---|---| +|\`dir\_name\`|The name of the directory to create the Medusa application in.|Yes|-| +|\`starter\_url\`|The name of the directory to create the Medusa application in.|No|\`https://github.com/medusajs/medusa-starter-default\`| + +## Options + +|Option|Description| +|---|---|---| +|\`-y\`|Skip all prompts, such as databaes prompts. A database might not be created if default PostgreSQL credentials don't work.| +|\`--skip-db\`|Skip database creation.| +|\`--skip-env\`|Skip populating | +|\`--db-user \\`|The database user to use for database setup.| +|\`--db-database \\`|The name of the database used for database setup.| +|\`--db-pass \\`|The database password to use for database setup.| +|\`--db-port \\`|The database port to use for database setup.| +|\`--db-host \\`|The database host to use for database setup.| # db Commands - Medusa CLI Reference @@ -27208,33 +27221,20 @@ npx medusa db:sync-links |\`--execute-all\`|Skip prompts when syncing links and execute all (including unsafe) actions.|No|Prompts are shown for unsafe actions, by default.| -# new Command - Medusa CLI Reference +# exec Command - Medusa CLI Reference -Create a new Medusa application. Unlike the `create-medusa-app` CLI tool, this command provides more flexibility for experienced Medusa developers in creating and configuring their project. +Run a custom CLI script. Learn more about it in [this guide](https://docs.medusajs.com/docs/learn/fundamentals/custom-cli-scripts/index.html.md). ```bash -medusa new [ []] +npx medusa exec [file] [args...] ``` ## Arguments -|Argument|Description|Required|Default| -|---|---|---|---|---|---|---| -|\`dir\_name\`|The name of the directory to create the Medusa application in.|Yes|-| -|\`starter\_url\`|The name of the directory to create the Medusa application in.|No|\`https://github.com/medusajs/medusa-starter-default\`| - -## Options - -|Option|Description| -|---|---|---| -|\`-y\`|Skip all prompts, such as databaes prompts. A database might not be created if default PostgreSQL credentials don't work.| -|\`--skip-db\`|Skip database creation.| -|\`--skip-env\`|Skip populating | -|\`--db-user \\`|The database user to use for database setup.| -|\`--db-database \\`|The name of the database used for database setup.| -|\`--db-pass \\`|The database password to use for database setup.| -|\`--db-port \\`|The database port to use for database setup.| -|\`--db-host \\`|The database host to use for database setup.| +|Argument|Description|Required| +|---|---|---|---|---| +|\`file\`|The path to the TypeScript or JavaScript file holding the function to execute.|Yes| +|\`args\`|A list of arguments to pass to the function. These arguments are passed in the |No| # plugin Commands - Medusa CLI Reference @@ -27298,22 +27298,6 @@ npx medusa plugin:build ``` -# start Command - Medusa CLI Reference - -Start the Medusa application in production. - -```bash -npx medusa start -``` - -## Options - -|Option|Description|Default| -|---|---|---|---|---| -|\`-H \\`|Set host of the Medusa server.|\`localhost\`| -|\`-p \\`|Set port of the Medusa server.|\`9000\`| - - # start-cluster Command - Medusa CLI Reference Starts the Medusa application in [cluster mode](https://expressjs.com/en/advanced/best-practice-performance.html#run-your-app-in-a-cluster). @@ -27333,6 +27317,38 @@ npx medusa start-cluster |\`-p \\`|Set port of the Medusa server.|\`9000\`| +# telemetry Command - Medusa CLI Reference + +Enable or disable the collection of anonymous data usage. If no option is provided, the command enables the collection of anonymous data usage. + +```bash +npx medusa telemetry +``` + +#### Options + +|Option|Description| +|---|---|---| +|\`--enable\`|Enable telemetry (default).| +|\`--disable\`|Disable telemetry.| + + +# start Command - Medusa CLI Reference + +Start the Medusa application in production. + +```bash +npx medusa start +``` + +## Options + +|Option|Description|Default| +|---|---|---|---|---| +|\`-H \\`|Set host of the Medusa server.|\`localhost\`| +|\`-p \\`|Set port of the Medusa server.|\`9000\`| + + # user Command - Medusa CLI Reference Create a new admin user. @@ -27352,22 +27368,6 @@ npx medusa user --email [--password ] If ran successfully, you'll receive the invite token in the output.|No|\`false\`| -# telemetry Command - Medusa CLI Reference - -Enable or disable the collection of anonymous data usage. If no option is provided, the command enables the collection of anonymous data usage. - -```bash -npx medusa telemetry -``` - -#### Options - -|Option|Description| -|---|---|---| -|\`--enable\`|Enable telemetry (default).| -|\`--disable\`|Disable telemetry.| - - # Medusa CLI Reference The Medusa CLI tool provides commands that facilitate your development. @@ -27391,6 +27391,68 @@ npx medusa --help *** +# build Command - Medusa CLI Reference + +Create a standalone build of the Medusa application. + +This creates a build that: + +- Doesn't rely on the source TypeScript files. +- Can be copied to a production server reliably. + +The build is outputted to a new `.medusa/server` directory. + +```bash +npx medusa build +``` + +Refer to [this section](#run-built-medusa-application) for next steps. + +## Options + +|Option|Description| +|---|---|---| +|\`--admin-only\`|Whether to only build the admin to host it separately. If this option is not passed, the admin is built to the | + +*** + +## Run Built Medusa Application + +After running the `build` command, use the following step to run the built Medusa application: + +- Change to the `.medusa/server` directory and install the dependencies: + +```bash npm2yarn +cd .medusa/server && npm install +``` + +- When running the application locally, make sure to copy the `.env` file from the root project's directory. In production, use system environment variables instead. + +```bash npm2yarn +cp .env .medusa/server/.env.production +``` + +- In the system environment variables, set `NODE_ENV` to `production`: + +```bash +NODE_ENV=production +``` + +- Use the `start` command to run the application: + +```bash npm2yarn +cd .medusa/server && npm run start +``` + +*** + +## Build Medusa Admin + +By default, the Medusa Admin is built to the `.medusa/server/public/admin` directory. + +If you want a separate build to host the admin standalone, such as on Vercel, pass the `--admin-only` option as explained in the [Options](#options) section. This outputs the admin to the `.medusa/admin` directory instead. + + # db Commands - Medusa CLI Reference Commands starting with `db:` perform actions on the database. @@ -27511,66 +27573,20 @@ npx medusa db:sync-links |\`--execute-all\`|Skip prompts when syncing links and execute all (including unsafe) actions.|No|Prompts are shown for unsafe actions, by default.| -# build Command - Medusa CLI Reference +# exec Command - Medusa CLI Reference -Create a standalone build of the Medusa application. - -This creates a build that: - -- Doesn't rely on the source TypeScript files. -- Can be copied to a production server reliably. - -The build is outputted to a new `.medusa/server` directory. +Run a custom CLI script. Learn more about it in [this guide](https://docs.medusajs.com/docs/learn/fundamentals/custom-cli-scripts/index.html.md). ```bash -npx medusa build +npx medusa exec [file] [args...] ``` -Refer to [this section](#run-built-medusa-application) for next steps. +## Arguments -## Options - -|Option|Description| -|---|---|---| -|\`--admin-only\`|Whether to only build the admin to host it separately. If this option is not passed, the admin is built to the | - -*** - -## Run Built Medusa Application - -After running the `build` command, use the following step to run the built Medusa application: - -- Change to the `.medusa/server` directory and install the dependencies: - -```bash npm2yarn -cd .medusa/server && npm install -``` - -- When running the application locally, make sure to copy the `.env` file from the root project's directory. In production, use system environment variables instead. - -```bash npm2yarn -cp .env .medusa/server/.env.production -``` - -- In the system environment variables, set `NODE_ENV` to `production`: - -```bash -NODE_ENV=production -``` - -- Use the `start` command to run the application: - -```bash npm2yarn -cd .medusa/server && npm run start -``` - -*** - -## Build Medusa Admin - -By default, the Medusa Admin is built to the `.medusa/server/public/admin` directory. - -If you want a separate build to host the admin standalone, such as on Vercel, pass the `--admin-only` option as explained in the [Options](#options) section. This outputs the admin to the `.medusa/admin` directory instead. +|Argument|Description|Required| +|---|---|---|---|---| +|\`file\`|The path to the TypeScript or JavaScript file holding the function to execute.|Yes| +|\`args\`|A list of arguments to pass to the function. These arguments are passed in the |No| # develop Command - Medusa CLI Reference @@ -27589,22 +27605,6 @@ npx medusa develop |\`-p \\`|Set port of the Medusa server.|\`9000\`| -# exec Command - Medusa CLI Reference - -Run a custom CLI script. Learn more about it in [this guide](https://docs.medusajs.com/docs/learn/fundamentals/custom-cli-scripts/index.html.md). - -```bash -npx medusa exec [file] [args...] -``` - -## Arguments - -|Argument|Description|Required| -|---|---|---|---|---| -|\`file\`|The path to the TypeScript or JavaScript file holding the function to execute.|Yes| -|\`args\`|A list of arguments to pass to the function. These arguments are passed in the |No| - - # new Command - Medusa CLI Reference Create a new Medusa application. Unlike the `create-medusa-app` CLI tool, this command provides more flexibility for experienced Medusa developers in creating and configuring their project. @@ -28072,306 +28072,306 @@ The object or class passed to `auth.storage` configuration must have the followi - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/Campaign/methods/js_sdk.admin.Campaign.update/index.html.md) - [batchSalesChannels](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.batchSalesChannels/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.list/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.create/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.list/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.retrieve/index.html.md) -- [clearToken](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.clearToken/index.html.md) - [revoke](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.revoke/index.html.md) -- [clearToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.clearToken_/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/ApiKey/methods/js_sdk.admin.ApiKey.update/index.html.md) -- [fetchStream](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.fetchStream/index.html.md) -- [getApiKeyHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getApiKeyHeader_/index.html.md) -- [getJwtHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getJwtHeader_/index.html.md) -- [fetch](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.fetch/index.html.md) -- [getTokenStorageInfo\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getTokenStorageInfo_/index.html.md) -- [getPublishableKeyHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getPublishableKeyHeader_/index.html.md) -- [initClient](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.initClient/index.html.md) -- [getToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getToken_/index.html.md) -- [setToken](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.setToken/index.html.md) -- [throwError\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.throwError_/index.html.md) +- [getItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.getItem/index.html.md) +- [setItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.setItem/index.html.md) +- [removeItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.removeItem/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Currency/methods/js_sdk.admin.Currency.list/index.html.md) -- [setToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.setToken_/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Currency/methods/js_sdk.admin.Currency.retrieve/index.html.md) - [addInboundItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addInboundItems/index.html.md) - [addInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addInboundShipping/index.html.md) -- [addItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addItems/index.html.md) - [addOutboundItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addOutboundItems/index.html.md) +- [addItems](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addItems/index.html.md) - [addOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addOutboundShipping/index.html.md) -- [cancel](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.cancel/index.html.md) - [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.cancelRequest/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.create/index.html.md) -- [deleteOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.deleteOutboundShipping/index.html.md) +- [cancel](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.cancel/index.html.md) - [deleteInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.deleteInboundShipping/index.html.md) +- [deleteOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.deleteOutboundShipping/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.list/index.html.md) -- [removeInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeInboundItem/index.html.md) -- [removeItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeItem/index.html.md) - [removeOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeOutboundItem/index.html.md) - [request](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.request/index.html.md) +- [removeInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeInboundItem/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.retrieve/index.html.md) - [updateInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateInboundItem/index.html.md) -- [updateInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateInboundShipping/index.html.md) -- [updateOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateOutboundItem/index.html.md) +- [removeItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.removeItem/index.html.md) - [updateItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateItem/index.html.md) +- [updateOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateOutboundItem/index.html.md) - [updateOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateOutboundShipping/index.html.md) -- [getItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.getItem/index.html.md) +- [updateInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.updateInboundShipping/index.html.md) +- [fetch](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.fetch/index.html.md) +- [clearToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.clearToken_/index.html.md) +- [clearToken](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.clearToken/index.html.md) +- [fetchStream](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.fetchStream/index.html.md) +- [getApiKeyHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getApiKeyHeader_/index.html.md) +- [getJwtHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getJwtHeader_/index.html.md) +- [getPublishableKeyHeader\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getPublishableKeyHeader_/index.html.md) +- [getTokenStorageInfo\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getTokenStorageInfo_/index.html.md) +- [getToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getToken_/index.html.md) +- [initClient](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.initClient/index.html.md) +- [setToken](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.setToken/index.html.md) +- [setToken\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.setToken_/index.html.md) +- [batchCustomerGroups](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.batchCustomerGroups/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.delete/index.html.md) +- [throwError\_](https://docs.medusajs.com/references/js_sdk/admin/Client/methods/js_sdk.admin.Client.throwError_/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.list/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.create/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.update/index.html.md) - [batchCustomers](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.batchCustomers/index.html.md) -- [setItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.setItem/index.html.md) -- [removeItem](https://docs.medusajs.com/references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.removeItem/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.delete/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.list/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.delete/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/CustomerGroup/methods/js_sdk.admin.CustomerGroup.update/index.html.md) -- [batchCustomerGroups](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.batchCustomerGroups/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.list/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.retrieve/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.list/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.update/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/index.html.md) - [addInboundItems](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addInboundItems/index.html.md) -- [addInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addInboundShipping/index.html.md) - [addOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addOutboundShipping/index.html.md) - [addOutboundItems](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addOutboundItems/index.html.md) +- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.cancelRequest/index.html.md) +- [addInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.addInboundShipping/index.html.md) - [cancel](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.cancel/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.create/index.html.md) -- [deleteInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.deleteInboundShipping/index.html.md) -- [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.cancelRequest/index.html.md) - [deleteOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.deleteOutboundShipping/index.html.md) -- [removeOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.removeOutboundItem/index.html.md) -- [removeInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.removeInboundItem/index.html.md) +- [deleteInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.deleteInboundShipping/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.list/index.html.md) -- [request](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.request/index.html.md) +- [removeInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.removeInboundItem/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.retrieve/index.html.md) -- [updateInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateInboundShipping/index.html.md) -- [updateInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateInboundItem/index.html.md) -- [updateOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateOutboundItem/index.html.md) +- [removeOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.removeOutboundItem/index.html.md) +- [request](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.request/index.html.md) - [updateOutboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateOutboundShipping/index.html.md) -- [cancel](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.cancel/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.create/index.html.md) +- [updateInboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateInboundItem/index.html.md) +- [updateInboundShipping](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateInboundShipping/index.html.md) +- [updateOutboundItem](https://docs.medusajs.com/references/js_sdk/admin/Exchange/methods/js_sdk.admin.Exchange.updateOutboundItem/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.retrieve/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.delete/index.html.md) -- [createServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.createServiceZone/index.html.md) - [deleteServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.deleteServiceZone/index.html.md) - [retrieveServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.retrieveServiceZone/index.html.md) - [updateServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.updateServiceZone/index.html.md) -- [createShipment](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.createShipment/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentProvider/methods/js_sdk.admin.FulfillmentProvider.list/index.html.md) +- [createServiceZone](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentSet/methods/js_sdk.admin.FulfillmentSet.createServiceZone/index.html.md) - [listFulfillmentOptions](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentProvider/methods/js_sdk.admin.FulfillmentProvider.listFulfillmentOptions/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Notification/methods/js_sdk.admin.Notification.list/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/FulfillmentProvider/methods/js_sdk.admin.FulfillmentProvider.list/index.html.md) +- [cancel](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.cancel/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.create/index.html.md) - [batchInventoryItemLocationLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.batchInventoryItemLocationLevels/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Notification/methods/js_sdk.admin.Notification.retrieve/index.html.md) +- [createShipment](https://docs.medusajs.com/references/js_sdk/admin/Fulfillment/methods/js_sdk.admin.Fulfillment.createShipment/index.html.md) - [batchInventoryItemsLocationLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.batchInventoryItemsLocationLevels/index.html.md) -- [batchUpdateLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.batchUpdateLevels/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.delete/index.html.md) -- [deleteLevel](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.deleteLevel/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.create/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.list/index.html.md) +- [batchUpdateLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.batchUpdateLevels/index.html.md) +- [deleteLevel](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.deleteLevel/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.delete/index.html.md) - [listLevels](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.listLevels/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.list/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.update/index.html.md) -- [cancel](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.cancel/index.html.md) - [updateLevel](https://docs.medusajs.com/references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.updateLevel/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Notification/methods/js_sdk.admin.Notification.list/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Notification/methods/js_sdk.admin.Notification.retrieve/index.html.md) - [cancelFulfillment](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.cancelFulfillment/index.html.md) +- [cancel](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.cancel/index.html.md) - [cancelTransfer](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.cancelTransfer/index.html.md) - [createFulfillment](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createFulfillment/index.html.md) -- [createShipment](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createShipment/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.list/index.html.md) -- [listLineItems](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.listLineItems/index.html.md) +- [createShipment](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createShipment/index.html.md) - [listChanges](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.listChanges/index.html.md) +- [listLineItems](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.listLineItems/index.html.md) - [markAsDelivered](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.markAsDelivered/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.retrieve/index.html.md) - [requestTransfer](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.requestTransfer/index.html.md) -- [retrievePreview](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.retrievePreview/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.update/index.html.md) - [accept](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.accept/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.delete/index.html.md) +- [retrievePreview](https://docs.medusajs.com/references/js_sdk/admin/Order/methods/js_sdk.admin.Order.retrievePreview/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.delete/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.list/index.html.md) - [resend](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.resend/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.retrieve/index.html.md) - [addItems](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.addItems/index.html.md) -- [confirm](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.confirm/index.html.md) - [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.cancelRequest/index.html.md) -- [removeAddedItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.removeAddedItem/index.html.md) +- [confirm](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.confirm/index.html.md) - [initiateRequest](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.initiateRequest/index.html.md) -- [request](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.request/index.html.md) +- [removeAddedItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.removeAddedItem/index.html.md) - [updateAddedItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.updateAddedItem/index.html.md) - [updateOriginalItem](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.updateOriginalItem/index.html.md) +- [request](https://docs.medusajs.com/references/js_sdk/admin/OrderEdit/methods/js_sdk.admin.OrderEdit.request/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.create/index.html.md) +- [batchPrices](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.batchPrices/index.html.md) +- [linkProducts](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.linkProducts/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.list/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.update/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.retrieve/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.delete/index.html.md) +- [markAsPaid](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.markAsPaid/index.html.md) - [capture](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.capture/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.list/index.html.md) - [listPaymentProviders](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.listPaymentProviders/index.html.md) -- [refund](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.refund/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.create/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.retrieve/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.delete/index.html.md) -- [markAsPaid](https://docs.medusajs.com/references/js_sdk/admin/PaymentCollection/methods/js_sdk.admin.PaymentCollection.markAsPaid/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.create/index.html.md) -- [batchPrices](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.batchPrices/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.list/index.html.md) -- [linkProducts](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.linkProducts/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/PriceList/methods/js_sdk.admin.PriceList.update/index.html.md) -- [batch](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batch/index.html.md) -- [confirmImport](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.confirmImport/index.html.md) -- [batchVariants](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batchVariants/index.html.md) -- [batchVariantInventoryItems](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batchVariantInventoryItems/index.html.md) -- [createVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.createVariant/index.html.md) -- [createOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.createOption/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.delete/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.create/index.html.md) -- [export](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.export/index.html.md) -- [deleteVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.deleteVariant/index.html.md) -- [deleteOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.deleteOption/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.list/index.html.md) -- [listVariants](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.listVariants/index.html.md) -- [listOptions](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.listOptions/index.html.md) -- [import](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.import/index.html.md) -- [retrieveVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieveVariant/index.html.md) -- [retrieveOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieveOption/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.update/index.html.md) -- [updateVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.updateVariant/index.html.md) -- [updateOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.updateOption/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.list/index.html.md) +- [refund](https://docs.medusajs.com/references/js_sdk/admin/Payment/methods/js_sdk.admin.Payment.refund/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.create/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.retrieve/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.list/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/PricePreference/methods/js_sdk.admin.PricePreference.update/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.create/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.list/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.delete/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.list/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.update/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.retrieve/index.html.md) - [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/ProductCollection/methods/js_sdk.admin.ProductCollection.updateProducts/index.html.md) +- [batch](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batch/index.html.md) +- [batchVariantInventoryItems](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batchVariantInventoryItems/index.html.md) +- [batchVariants](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.batchVariants/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.create/index.html.md) +- [createOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.createOption/index.html.md) +- [confirmImport](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.confirmImport/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.delete/index.html.md) +- [deleteOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.deleteOption/index.html.md) +- [deleteVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.deleteVariant/index.html.md) +- [export](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.export/index.html.md) +- [createVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.createVariant/index.html.md) +- [import](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.import/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.list/index.html.md) +- [listOptions](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.listOptions/index.html.md) +- [listVariants](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.listVariants/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieve/index.html.md) +- [retrieveOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieveOption/index.html.md) +- [retrieveVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.retrieveVariant/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.update/index.html.md) +- [updateOption](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.updateOption/index.html.md) +- [updateVariant](https://docs.medusajs.com/references/js_sdk/admin/Product/methods/js_sdk.admin.Product.updateVariant/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.create/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.delete/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.list/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.update/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.retrieve/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.create/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.list/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.retrieve/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.list/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.update/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductTag/methods/js_sdk.admin.ProductTag.update/index.html.md) - [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/ProductCategory/methods/js_sdk.admin.ProductCategory.updateProducts/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/ProductVariant/methods/js_sdk.admin.ProductVariant.list/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.list/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.create/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.update/index.html.md) - [addRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.addRules/index.html.md) -- [listRuleAttributes](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRuleAttributes/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.list/index.html.md) -- [listRuleValues](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRuleValues/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.create/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.list/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.delete/index.html.md) +- [listRuleAttributes](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRuleAttributes/index.html.md) - [listRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRules/index.html.md) +- [listRuleValues](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.listRuleValues/index.html.md) - [removeRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.removeRules/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.update/index.html.md) - [updateRules](https://docs.medusajs.com/references/js_sdk/admin/Promotion/methods/js_sdk.admin.Promotion.updateRules/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.create/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.list/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ProductType/methods/js_sdk.admin.ProductType.update/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/RefundReason/methods/js_sdk.admin.RefundReason.list/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.create/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.delete/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.list/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.update/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.retrieve/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.create/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Region/methods/js_sdk.admin.Region.update/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.delete/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.list/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.list/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.update/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.create/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/Reservation/methods/js_sdk.admin.Reservation.update/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.create/index.html.md) - [batchProducts](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.batchProducts/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.create/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.list/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.retrieve/index.html.md) -- [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.updateProducts/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.update/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.list/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.create/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.delete/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.update/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ReturnReason/methods/js_sdk.admin.ReturnReason.retrieve/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.list/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.update/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.retrieve/index.html.md) -- [updateRules](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.updateRules/index.html.md) +- [updateProducts](https://docs.medusajs.com/references/js_sdk/admin/SalesChannel/methods/js_sdk.admin.SalesChannel.updateProducts/index.html.md) - [addReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.addReturnItem/index.html.md) - [addReturnShipping](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.addReturnShipping/index.html.md) - [cancel](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.cancel/index.html.md) - [cancelRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.cancelRequest/index.html.md) -- [confirmReceive](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.confirmReceive/index.html.md) - [cancelReceive](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.cancelReceive/index.html.md) -- [deleteReturnShipping](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.deleteReturnShipping/index.html.md) -- [dismissItems](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.dismissItems/index.html.md) +- [confirmReceive](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.confirmReceive/index.html.md) - [confirmRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.confirmRequest/index.html.md) +- [deleteReturnShipping](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.deleteReturnShipping/index.html.md) - [initiateReceive](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.initiateReceive/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.list/index.html.md) +- [dismissItems](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.dismissItems/index.html.md) - [receiveItems](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.receiveItems/index.html.md) - [initiateRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.initiateRequest/index.html.md) -- [removeDismissItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeDismissItem/index.html.md) - [removeReceiveItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeReceiveItem/index.html.md) -- [removeReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeReturnItem/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.list/index.html.md) +- [removeDismissItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeDismissItem/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.retrieve/index.html.md) -- [updateRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateRequest/index.html.md) +- [updateDismissItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateDismissItem/index.html.md) - [updateReceiveItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateReceiveItem/index.html.md) +- [removeReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.removeReturnItem/index.html.md) +- [updateRequest](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateRequest/index.html.md) - [updateReturnItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateReturnItem/index.html.md) - [updateReturnShipping](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateReturnShipping/index.html.md) -- [updateDismissItem](https://docs.medusajs.com/references/js_sdk/admin/Return/methods/js_sdk.admin.Return.updateDismissItem/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.retrieve/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.delete/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.update/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.retrieve/index.html.md) +- [updateRules](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.updateRules/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ShippingOption/methods/js_sdk.admin.ShippingOption.list/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.delete/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.create/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.list/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/ShippingProfile/methods/js_sdk.admin.ShippingProfile.update/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.update/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.delete/index.html.md) - [createFulfillmentSet](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.createFulfillmentSet/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.delete/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.list/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.create/index.html.md) - [updateFulfillmentProviders](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.updateFulfillmentProviders/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.retrieve/index.html.md) - [update](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.update/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.create/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.delete/index.html.md) - [updateSalesChannels](https://docs.medusajs.com/references/js_sdk/admin/StockLocation/methods/js_sdk.admin.StockLocation.updateSalesChannels/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.list/index.html.md) -- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.retrieve/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.update/index.html.md) -- [create](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.create/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.update/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/Store/methods/js_sdk.admin.Store.list/index.html.md) - [delete](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.create/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.list/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/TaxRegion/methods/js_sdk.admin.TaxRegion.retrieve/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.delete/index.html.md) - [create](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.create/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.retrieve/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/Upload/methods/js_sdk.admin.Upload.delete/index.html.md) -- [list](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.list/index.html.md) -- [delete](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.delete/index.html.md) +- [create](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.create/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.delete/index.html.md) +- [retrieve](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.retrieve/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.list/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/TaxRate/methods/js_sdk.admin.TaxRate.update/index.html.md) - [me](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.me/index.html.md) -- [update](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.update/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.retrieve/index.html.md) +- [update](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.update/index.html.md) +- [delete](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.delete/index.html.md) +- [list](https://docs.medusajs.com/references/js_sdk/admin/User/methods/js_sdk.admin.User.list/index.html.md) - [list](https://docs.medusajs.com/references/js_sdk/admin/WorkflowExecution/methods/js_sdk.admin.WorkflowExecution.list/index.html.md) - [retrieve](https://docs.medusajs.com/references/js_sdk/admin/WorkflowExecution/methods/js_sdk.admin.WorkflowExecution.retrieve/index.html.md) ## JS SDK Auth +- [callback](https://docs.medusajs.com/references/js-sdk/auth/callback/index.html.md) +- [login](https://docs.medusajs.com/references/js-sdk/auth/login/index.html.md) - [logout](https://docs.medusajs.com/references/js-sdk/auth/logout/index.html.md) - [refresh](https://docs.medusajs.com/references/js-sdk/auth/refresh/index.html.md) -- [login](https://docs.medusajs.com/references/js-sdk/auth/login/index.html.md) -- [callback](https://docs.medusajs.com/references/js-sdk/auth/callback/index.html.md) -- [register](https://docs.medusajs.com/references/js-sdk/auth/register/index.html.md) - [resetPassword](https://docs.medusajs.com/references/js-sdk/auth/resetPassword/index.html.md) +- [register](https://docs.medusajs.com/references/js-sdk/auth/register/index.html.md) - [updateProvider](https://docs.medusajs.com/references/js-sdk/auth/updateProvider/index.html.md) @@ -28380,12 +28380,12 @@ The object or class passed to `auth.storage` configuration must have the followi - [cart](https://docs.medusajs.com/references/js-sdk/store/cart/index.html.md) - [category](https://docs.medusajs.com/references/js-sdk/store/category/index.html.md) - [collection](https://docs.medusajs.com/references/js-sdk/store/collection/index.html.md) -- [customer](https://docs.medusajs.com/references/js-sdk/store/customer/index.html.md) - [fulfillment](https://docs.medusajs.com/references/js-sdk/store/fulfillment/index.html.md) - [order](https://docs.medusajs.com/references/js-sdk/store/order/index.html.md) -- [product](https://docs.medusajs.com/references/js-sdk/store/product/index.html.md) -- [region](https://docs.medusajs.com/references/js-sdk/store/region/index.html.md) +- [customer](https://docs.medusajs.com/references/js-sdk/store/customer/index.html.md) - [payment](https://docs.medusajs.com/references/js-sdk/store/payment/index.html.md) +- [region](https://docs.medusajs.com/references/js-sdk/store/region/index.html.md) +- [product](https://docs.medusajs.com/references/js-sdk/store/product/index.html.md) # Configure Medusa Backend @@ -29053,6 +29053,290 @@ Use these components to set the layout of your UI route. Use these components in your widgets and UI routes. +# Action Menu - Admin Components + +The Medusa Admin often provides additional actions in a dropdown shown when users click a three-dot icon. + +![Example of an action menu in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728291319/Medusa%20Resources/action-menu_jnus6k.png) + +To create a component that shows this menu in your customizations, create the file `src/admin/components/action-menu.tsx` with the following content: + +```tsx title="src/admin/components/action-menu.tsx" +import { + DropdownMenu, + IconButton, + clx, +} from "@medusajs/ui" +import { EllipsisHorizontal } from "@medusajs/icons" +import { Link } from "react-router-dom" + +export type Action = { + icon: React.ReactNode + label: string + disabled?: boolean +} & ( + | { + to: string + onClick?: never + } + | { + onClick: () => void + to?: never + } +) + +export type ActionGroup = { + actions: Action[] +} + +export type ActionMenuProps = { + groups: ActionGroup[] +} + +export const ActionMenu = ({ groups }: ActionMenuProps) => { + return ( + + + + + + + + {groups.map((group, index) => { + if (!group.actions.length) { + return null + } + + const isLast = index === groups.length - 1 + + return ( + + {group.actions.map((action, index) => { + if (action.onClick) { + return ( + { + e.stopPropagation() + action.onClick() + }} + className={clx( + "[&_svg]:text-ui-fg-subtle flex items-center gap-x-2", + { + "[&_svg]:text-ui-fg-disabled": action.disabled, + } + )} + > + {action.icon} + {action.label} + + ) + } + + return ( +
+ + e.stopPropagation()}> + {action.icon} + {action.label} + + +
+ ) + })} + {!isLast && } +
+ ) + })} +
+
+ ) +} +``` + +The `ActionMenu` component shows a three-dots icon (or `EllipsisHorizontal`) from the [Medusa Icons package](https://docs.medusajs.com/ui/icons/overview/index.html.md) in a button. + +When the button is clicked, a dropdown menu is shown with the actions passed in the props. + +The component accepts the following props: + +- groups: (\`object\[]\`) Groups of actions to be shown in the dropdown. Each group is separated by a divider. + + - actions: (\`object\[]\`) Actions in the group. + + - icon: (\`React.ReactNode\`) + + - label: (\`string\`) The action's text. + + - disabled: (\`boolean\`) Whether the action is shown as disabled. + + - \`to\`: (\`string\`) The link to take the user to when they click the action. This is required if \`onClick\` isn't provided. + + - \`onClick\`: (\`() => void\`) The function to execute when the action is clicked. This is required if \`to\` isn't provided. + +*** + +## Example + +Use the `ActionMenu` component in any widget or UI route. + +For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: + +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Pencil } from "@medusajs/icons" +import { Container } from "../components/container" +import { ActionMenu } from "../components/action-menu" + +const ProductWidget = () => { + return ( + + , + label: "Edit", + onClick: () => { + alert("You clicked the edit action!") + }, + }, + ], + }, + ]} /> + + ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + +This widget also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) custom component. + +### Use in Header + +You can also use the action menu in the [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) component as part of its actions. + +For example: + +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Pencil } from "@medusajs/icons" +import { Container } from "../components/container" +import { Header } from "../components/header" + +const ProductWidget = () => { + return ( + +
, + label: "Edit", + onClick: () => { + alert("You clicked the edit action!") + }, + }, + ], + }, + ], + }, + }, + ]} + /> + + ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + + +# Container - Admin Components + +The Medusa Admin wraps each section of a page in a container. + +![Example of a container in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728287102/Medusa%20Resources/container_soenir.png) + +To create a component that uses the same container styling in your widgets or UI routes, create the file `src/admin/components/container.tsx` with the following content: + +```tsx +import { + Container as UiContainer, + clx, +} from "@medusajs/ui" + +type ContainerProps = React.ComponentProps + +export const Container = (props: ContainerProps) => { + return ( + + ) +} +``` + +The `Container` component re-uses the component from the [Medusa UI package](https://docs.medusajs.com/ui/components/container/index.html.md) and applies to it classes to match the Medusa Admin's design conventions. + +*** + +## Example + +Use that `Container` component in any widget or UI route. + +For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: + +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Container } from "../components/container" +import { Header } from "../components/header" + +const ProductWidget = () => { + return ( + +
+ + ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + +This widget also uses a [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) custom component. + + # Data Table - Admin Components This component is available after [Medusa v2.4.0+](https://github.com/medusajs/medusa/releases/tag/v2.4.0). @@ -29540,231 +29824,6 @@ export default CustomPage ``` -# Action Menu - Admin Components - -The Medusa Admin often provides additional actions in a dropdown shown when users click a three-dot icon. - -![Example of an action menu in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728291319/Medusa%20Resources/action-menu_jnus6k.png) - -To create a component that shows this menu in your customizations, create the file `src/admin/components/action-menu.tsx` with the following content: - -```tsx title="src/admin/components/action-menu.tsx" -import { - DropdownMenu, - IconButton, - clx, -} from "@medusajs/ui" -import { EllipsisHorizontal } from "@medusajs/icons" -import { Link } from "react-router-dom" - -export type Action = { - icon: React.ReactNode - label: string - disabled?: boolean -} & ( - | { - to: string - onClick?: never - } - | { - onClick: () => void - to?: never - } -) - -export type ActionGroup = { - actions: Action[] -} - -export type ActionMenuProps = { - groups: ActionGroup[] -} - -export const ActionMenu = ({ groups }: ActionMenuProps) => { - return ( - - - - - - - - {groups.map((group, index) => { - if (!group.actions.length) { - return null - } - - const isLast = index === groups.length - 1 - - return ( - - {group.actions.map((action, index) => { - if (action.onClick) { - return ( - { - e.stopPropagation() - action.onClick() - }} - className={clx( - "[&_svg]:text-ui-fg-subtle flex items-center gap-x-2", - { - "[&_svg]:text-ui-fg-disabled": action.disabled, - } - )} - > - {action.icon} - {action.label} - - ) - } - - return ( -
- - e.stopPropagation()}> - {action.icon} - {action.label} - - -
- ) - })} - {!isLast && } -
- ) - })} -
-
- ) -} -``` - -The `ActionMenu` component shows a three-dots icon (or `EllipsisHorizontal`) from the [Medusa Icons package](https://docs.medusajs.com/ui/icons/overview/index.html.md) in a button. - -When the button is clicked, a dropdown menu is shown with the actions passed in the props. - -The component accepts the following props: - -- groups: (\`object\[]\`) Groups of actions to be shown in the dropdown. Each group is separated by a divider. - - - actions: (\`object\[]\`) Actions in the group. - - - icon: (\`React.ReactNode\`) - - - label: (\`string\`) The action's text. - - - disabled: (\`boolean\`) Whether the action is shown as disabled. - - - \`to\`: (\`string\`) The link to take the user to when they click the action. This is required if \`onClick\` isn't provided. - - - \`onClick\`: (\`() => void\`) The function to execute when the action is clicked. This is required if \`to\` isn't provided. - -*** - -## Example - -Use the `ActionMenu` component in any widget or UI route. - -For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: - -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Pencil } from "@medusajs/icons" -import { Container } from "../components/container" -import { ActionMenu } from "../components/action-menu" - -const ProductWidget = () => { - return ( - - , - label: "Edit", - onClick: () => { - alert("You clicked the edit action!") - }, - }, - ], - }, - ]} /> - - ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - -This widget also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) custom component. - -### Use in Header - -You can also use the action menu in the [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) component as part of its actions. - -For example: - -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Pencil } from "@medusajs/icons" -import { Container } from "../components/container" -import { Header } from "../components/header" - -const ProductWidget = () => { - return ( - -
, - label: "Edit", - onClick: () => { - alert("You clicked the edit action!") - }, - }, - ], - }, - ], - }, - }, - ]} - /> - - ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - - # Forms - Admin Components The Medusa Admin has two types of forms: @@ -30484,383 +30543,64 @@ export default ProductWidget This widget also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) custom component. -# Container - Admin Components +# Single Column Layout - Admin Components -The Medusa Admin wraps each section of a page in a container. +The Medusa Admin has pages with a single column of content. -![Example of a container in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728287102/Medusa%20Resources/container_soenir.png) +This doesn't include the sidebar, only the main content. -To create a component that uses the same container styling in your widgets or UI routes, create the file `src/admin/components/container.tsx` with the following content: +![An example of an admin page with a single column](https://res.cloudinary.com/dza7lstvk/image/upload/v1728286605/Medusa%20Resources/single-column.png) -```tsx -import { - Container as UiContainer, - clx, -} from "@medusajs/ui" +To create a layout that you can use in UI routes to support one column of content, create the component `src/admin/layouts/single-column.tsx` with the following content: -type ContainerProps = React.ComponentProps +```tsx title="src/admin/layouts/single-column.tsx" +export type SingleColumnLayoutProps = { + children: React.ReactNode +} -export const Container = (props: ContainerProps) => { +export const SingleColumnLayout = ({ children }: SingleColumnLayoutProps) => { return ( - - ) -} -``` - -The `Container` component re-uses the component from the [Medusa UI package](https://docs.medusajs.com/ui/components/container/index.html.md) and applies to it classes to match the Medusa Admin's design conventions. - -*** - -## Example - -Use that `Container` component in any widget or UI route. - -For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: - -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Container } from "../components/container" -import { Header } from "../components/header" - -const ProductWidget = () => { - return ( - -
- - ) -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - -This widget also uses a [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) custom component. - - -# JSON View - Admin Components - -Detail pages in the Medusa Admin show a JSON section to view the current page's details in JSON format. - -![Example of a JSON section in the admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728295129/Medusa%20Resources/json_dtbsgm.png) - -To create a component that shows a JSON section in your customizations, create the file `src/admin/components/json-view-section.tsx` with the following content: - -```tsx title="src/admin/components/json-view-section.tsx" -import { - ArrowUpRightOnBox, - Check, - SquareTwoStack, - TriangleDownMini, - XMarkMini, -} from "@medusajs/icons" -import { - Badge, - Container, - Drawer, - Heading, - IconButton, - Kbd, -} from "@medusajs/ui" -import Primitive from "@uiw/react-json-view" -import { CSSProperties, MouseEvent, Suspense, useState } from "react" - -type JsonViewSectionProps = { - data: object - title?: string -} - -export const JsonViewSection = ({ data }: JsonViewSectionProps) => { - const numberOfKeys = Object.keys(data).length - - return ( - -
- JSON - - {numberOfKeys} keys - -
- - - - - - - -
-
- - - - {numberOfKeys} - - - -
-
- - esc - - - - - - -
-
- -
-
} - > - - } /> - ( - null - )} - /> - ( - undefined - )} - /> - { - return ( - - {Object.keys(value as object).length} items - - ) - }} - /> - - - - - : - - { - return - }} - /> - - - -
-
-
-
- ) -} - -type CopiedProps = { - style?: CSSProperties - value: object | undefined -} - -const Copied = ({ style, value }: CopiedProps) => { - const [copied, setCopied] = useState(false) - - const handler = (e: MouseEvent) => { - e.stopPropagation() - setCopied(true) - - if (typeof value === "string") { - navigator.clipboard.writeText(value) - } else { - const json = JSON.stringify(value, null, 2) - navigator.clipboard.writeText(json) - } - - setTimeout(() => { - setCopied(false) - }, 2000) - } - - const styl = { whiteSpace: "nowrap", width: "20px" } - - if (copied) { - return ( - - - - ) - } - - return ( - - - - ) -} -``` - -The `JsonViewSection` component shows a section with the "JSON" title and a button to show the data as JSON in a drawer or side window. - -The `JsonViewSection` accepts a `data` prop, which is the data to show as a JSON object in the drawer. - -*** - -## Example - -Use the `JsonViewSection` component in any widget or UI route. - -For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: - -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { JsonViewSection } from "../components/json-view-section" - -const ProductWidget = () => { - return -} - -export const config = defineWidgetConfig({ - zone: "product.details.before", -}) - -export default ProductWidget -``` - -This shows the JSON section at the top of the product page, passing it the object `{ name: "John" }`. - - -# Section Row - Admin Components - -The Medusa Admin often shows information in rows of label-values, such as when showing a product's details. - -![Example of a section row in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728292781/Medusa%20Resources/section-row_kknbnw.png) - -To create a component that shows information in the same structure, create the file `src/admin/components/section-row.tsx` with the following content: - -```tsx title="src/admin/components/section-row.tsx" -import { Text, clx } from "@medusajs/ui" - -export type SectionRowProps = { - title: string - value?: React.ReactNode | string | null - actions?: React.ReactNode -} - -export const SectionRow = ({ title, value, actions }: SectionRowProps) => { - const isValueString = typeof value === "string" || !value - - return ( -
- - {title} - - - {isValueString ? ( - - {value ?? "-"} - - ) : ( -
{value}
- )} - - {actions &&
{actions}
} +
+ {children}
) } ``` -The `SectionRow` component shows a title and a value in the same row. - -It accepts the following props: - -- title: (\`string\`) The title to show on the left side. -- value: (\`React.ReactNode\` \\| \`string\` \\| \`null\`) The value to show on the right side. -- actions: (\`React.ReactNode\`) The actions to show at the end of the row. +The `SingleColumnLayout` accepts the content in the `children` props. *** ## Example -Use the `SectionRow` component in any widget or UI route. +Use the `SingleColumnLayout` component in your UI routes that have a single column. For example: -For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: +```tsx title="src/admin/routes/custom/page.tsx" highlights={[["9"]]} +import { defineRouteConfig } from "@medusajs/admin-sdk" +import { ChatBubbleLeftRight } from "@medusajs/icons" +import { Container } from "../../components/container" +import { SingleColumnLayout } from "../../layouts/single-column" +import { Header } from "../../components/header" -```tsx title="src/admin/widgets/product-widget.tsx" -import { defineWidgetConfig } from "@medusajs/admin-sdk" -import { Container } from "../components/container" -import { Header } from "../components/header" -import { SectionRow } from "../components/section-row" - -const ProductWidget = () => { +const CustomPage = () => { return ( - -
- - + + +
+ + ) } -export const config = defineWidgetConfig({ - zone: "product.details.before", +export const config = defineRouteConfig({ + label: "Custom", + icon: ChatBubbleLeftRight, }) -export default ProductWidget +export default CustomPage ``` -This widget also uses the [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) custom component. +This UI route also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and a [Header]() custom components. # Table - Admin Components @@ -31153,6 +30893,98 @@ If `data` isn't `undefined`, you display the `Table` component passing it the fo To test it out, log into the Medusa Admin and open `http://localhost:9000/app/custom`. You'll find a table of products with pagination. +# Section Row - Admin Components + +The Medusa Admin often shows information in rows of label-values, such as when showing a product's details. + +![Example of a section row in the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728292781/Medusa%20Resources/section-row_kknbnw.png) + +To create a component that shows information in the same structure, create the file `src/admin/components/section-row.tsx` with the following content: + +```tsx title="src/admin/components/section-row.tsx" +import { Text, clx } from "@medusajs/ui" + +export type SectionRowProps = { + title: string + value?: React.ReactNode | string | null + actions?: React.ReactNode +} + +export const SectionRow = ({ title, value, actions }: SectionRowProps) => { + const isValueString = typeof value === "string" || !value + + return ( +
+ + {title} + + + {isValueString ? ( + + {value ?? "-"} + + ) : ( +
{value}
+ )} + + {actions &&
{actions}
} +
+ ) +} +``` + +The `SectionRow` component shows a title and a value in the same row. + +It accepts the following props: + +- title: (\`string\`) The title to show on the left side. +- value: (\`React.ReactNode\` \\| \`string\` \\| \`null\`) The value to show on the right side. +- actions: (\`React.ReactNode\`) The actions to show at the end of the row. + +*** + +## Example + +Use the `SectionRow` component in any widget or UI route. + +For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: + +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { Container } from "../components/container" +import { Header } from "../components/header" +import { SectionRow } from "../components/section-row" + +const ProductWidget = () => { + return ( + +
+ + + ) +} + +export const config = defineWidgetConfig({ + zone: "product.details.before", +}) + +export default ProductWidget +``` + +This widget also uses the [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and [Header](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/header/index.html.md) custom component. + + # Two Column Layout - Admin Components The Medusa Admin has pages with two columns of content. @@ -31232,64 +31064,232 @@ export default CustomPage This UI route also uses [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and [Header]() custom components. -# Single Column Layout - Admin Components +# JSON View - Admin Components -The Medusa Admin has pages with a single column of content. +Detail pages in the Medusa Admin show a JSON section to view the current page's details in JSON format. -This doesn't include the sidebar, only the main content. +![Example of a JSON section in the admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1728295129/Medusa%20Resources/json_dtbsgm.png) -![An example of an admin page with a single column](https://res.cloudinary.com/dza7lstvk/image/upload/v1728286605/Medusa%20Resources/single-column.png) +To create a component that shows a JSON section in your customizations, create the file `src/admin/components/json-view-section.tsx` with the following content: -To create a layout that you can use in UI routes to support one column of content, create the component `src/admin/layouts/single-column.tsx` with the following content: +```tsx title="src/admin/components/json-view-section.tsx" +import { + ArrowUpRightOnBox, + Check, + SquareTwoStack, + TriangleDownMini, + XMarkMini, +} from "@medusajs/icons" +import { + Badge, + Container, + Drawer, + Heading, + IconButton, + Kbd, +} from "@medusajs/ui" +import Primitive from "@uiw/react-json-view" +import { CSSProperties, MouseEvent, Suspense, useState } from "react" -```tsx title="src/admin/layouts/single-column.tsx" -export type SingleColumnLayoutProps = { - children: React.ReactNode +type JsonViewSectionProps = { + data: object + title?: string } -export const SingleColumnLayout = ({ children }: SingleColumnLayoutProps) => { +export const JsonViewSection = ({ data }: JsonViewSectionProps) => { + const numberOfKeys = Object.keys(data).length + return ( -
- {children} -
+ +
+ JSON + + {numberOfKeys} keys + +
+ + + + + + + +
+
+ + + + {numberOfKeys} + + + +
+
+ + esc + + + + + + +
+
+ +
+
} + > + + } /> + ( + null + )} + /> + ( + undefined + )} + /> + { + return ( + + {Object.keys(value as object).length} items + + ) + }} + /> + + + + + : + + { + return + }} + /> + + +
+ + + + + ) +} + +type CopiedProps = { + style?: CSSProperties + value: object | undefined +} + +const Copied = ({ style, value }: CopiedProps) => { + const [copied, setCopied] = useState(false) + + const handler = (e: MouseEvent) => { + e.stopPropagation() + setCopied(true) + + if (typeof value === "string") { + navigator.clipboard.writeText(value) + } else { + const json = JSON.stringify(value, null, 2) + navigator.clipboard.writeText(json) + } + + setTimeout(() => { + setCopied(false) + }, 2000) + } + + const styl = { whiteSpace: "nowrap", width: "20px" } + + if (copied) { + return ( + + + + ) + } + + return ( + + + ) } ``` -The `SingleColumnLayout` accepts the content in the `children` props. +The `JsonViewSection` component shows a section with the "JSON" title and a button to show the data as JSON in a drawer or side window. + +The `JsonViewSection` accepts a `data` prop, which is the data to show as a JSON object in the drawer. *** ## Example -Use the `SingleColumnLayout` component in your UI routes that have a single column. For example: +Use the `JsonViewSection` component in any widget or UI route. -```tsx title="src/admin/routes/custom/page.tsx" highlights={[["9"]]} -import { defineRouteConfig } from "@medusajs/admin-sdk" -import { ChatBubbleLeftRight } from "@medusajs/icons" -import { Container } from "../../components/container" -import { SingleColumnLayout } from "../../layouts/single-column" -import { Header } from "../../components/header" +For example, create the widget `src/admin/widgets/product-widget.tsx` with the following content: -const CustomPage = () => { - return ( - - -
- - - ) +```tsx title="src/admin/widgets/product-widget.tsx" +import { defineWidgetConfig } from "@medusajs/admin-sdk" +import { JsonViewSection } from "../components/json-view-section" + +const ProductWidget = () => { + return } -export const config = defineRouteConfig({ - label: "Custom", - icon: ChatBubbleLeftRight, +export const config = defineWidgetConfig({ + zone: "product.details.before", }) -export default CustomPage +export default ProductWidget ``` -This UI route also uses a [Container](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/admin-components/components/container/index.html.md) and a [Header]() custom components. +This shows the JSON section at the top of the product page, passing it the object `{ name: "John" }`. # Service Factory Reference @@ -31319,6 +31319,518 @@ Some examples of method names: The reference uses only the operation name to refer to the method. +# create Method - Service Factory Reference + +This method creates one or more records of the data model. + +## Create One Record + +```ts +const post = await postModuleService.createPosts({ + name: "My Post", + published_at: new Date(), + metadata: { + external_id: "1234", + }, +}) +``` + +If an object is passed of the method, an object of the created record is also returned. + +*** + +## Create Multiple Records + +```ts +const posts = await postModuleService.createPosts([ + { + name: "My Post", + published_at: new Date(), + }, + { + name: "My Other Post", + published_at: new Date(), + }, +]) +``` + +If an array is passed of the method, an array of the created records is also returned. + + +# delete Method - Service Factory Reference + +This method deletes one or more records. + +## Delete One Record + +```ts +await postModuleService.deletePosts("123") +``` + +To delete one record, pass its ID as a parameter of the method. + +*** + +## Delete Multiple Records + +```ts +await postModuleService.deletePosts([ + "123", + "321", +]) +``` + +To delete multiple records, pass an array of IDs as a parameter of the method. + +*** + +## Delete Records Matching Filters + +```ts +await postModuleService.deletePosts({ + name: "My Post", +}) +``` + +To delete records matching a set of filters, pass an object of filters as a parameter. + +Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). + + +# list Method - Service Factory Reference + +This method retrieves a list of records. + +## Retrieve List of Records + +```ts +const posts = await postModuleService.listPosts() +``` + +If no parameters are passed, the method returns an array of the first `15` records. + +*** + +## Filter Records + +```ts +const posts = await postModuleService.listPosts({ + id: ["123", "321"], +}) +``` + +### Parameters + +To retrieve records matching a set of filters, pass an object of the filters as a first parameter. + +Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). + +### Returns + +The method returns an array of the first `15` records matching the filters. + +*** + +## Retrieve Relations + +This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md). + +```ts +const posts = await postModuleService.listPosts({}, { + relations: ["author"], +}) +``` + +### Parameters + +To retrieve records with their relations, pass as a second parameter an object having a `relations` property. `relations`'s value is an array of relation names. + +### Returns + +The method returns an array of the first `15` records matching the filters. + +*** + +## Select Properties + +```ts +const posts = await postModuleService.listPosts({}, { + select: ["id", "name"], +}) +``` + +### Parameters + +By default, retrieved records have all their properties. To select specific properties to retrieve, pass in the second object parameter a `select` property. + +`select`'s value is an array of property names to retrieve. + +### Returns + +The method returns an array of the first `15` records matching the filters. + +*** + +## Paginate Relations + +```ts +const posts = await postModuleService.listPosts({}, { + take: 20, + skip: 10, +}) +``` + +### Parameters + +To paginate the returned records, the second object parameter accepts the following properties: + +- `take`: a number indicating how many records to retrieve. By default, it's `15`. +- `skip`: a number indicating how many records to skip before the retrieved records. By default, it's `0`. + +### Returns + +The method returns an array of records. The number of records is less than or equal to `take`'s value. + +*** + +## Sort Records + +```ts +const posts = await postModuleService.listPosts({}, { + order: { + name: "ASC", + }, +}) +``` + +### Parameters + +To sort records by one or more properties, pass to the second object parameter the `order` property. Its value is an object whose keys are the property names, and values can either be: + +- `ASC` to sort by this property in the ascending order. +- `DESC` to sort by this property in the descending order. + +### Returns + +The method returns an array of the first `15` records matching the filters. + + +# retrieve Method - Service Factory Reference + +This method retrieves one record of the data model by its ID. + +## Retrieve a Record + +```ts +const post = await postModuleService.retrievePost("123") +``` + +### Parameters + +Pass the ID of the record to retrieve. + +### Returns + +The method returns the record as an object. + +*** + +## Retrieve a Record's Relations + +This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md). + +```ts +const post = await postModuleService.retrievePost("123", { + relations: ["author"], +}) +``` + +### Parameters + +To retrieve the data model with relations, pass as a second parameter of the method an object with the property `relations`. `relations`'s value is an array of relation names. + +### Returns + +The method returns the record as an object. + +*** + +## Select Properties to Retrieve + +```ts +const post = await postModuleService.retrievePost("123", { + select: ["id", "name"], +}) +``` + +### Parameters + +By default, all of the record's properties are retrieved. To select specific ones, pass in the second object parameter a `select` property. Its value is an array of property names. + +### Returns + +The method returns the record as an object. + + +# listAndCount Method - Service Factory Reference + +This method retrieves a list of records with the total count. + +## Retrieve List of Records + +```ts +const [posts, count] = await postModuleService.listAndCountPosts() +``` + +If no parameters are passed, the method returns an array with two items: + +1. The first is an array of the first `15` records retrieved. +2. The second is the total count of records. + +*** + +## Filter Records + +```ts +const [posts, count] = await postModuleService.listAndCountPosts({ + id: ["123", "321"], +}) +``` + +### Parameters + +To retrieve records matching a set of filters, pass an object of the filters as a first parameter. + +Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). + +### Returns + +The method returns an array with two items: + +1. The first is an array of the first `15` records retrieved matching the specified filters. +2. The second is the total count of records matching the specified filters. + +*** + +## Retrieve Relations + +This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md). + +```ts +const [posts, count] = await postModuleService.listAndCountPosts({}, { + relations: ["author"], +}) +``` + +### Parameters + +To retrieve records with their relations, pass as a second parameter an object having a `relations` property. Its value is an array of relation names. + +### Returns + +The method returns an array with two items: + +1. The first is an array of the first `15` records retrieved. +2. The second is the total count of records. + +*** + +## Select Properties + +```ts +const [posts, count] = await postModuleService.listAndCountPosts({}, { + select: ["id", "name"], +}) +``` + +### Parameters + +By default, retrieved records have all their properties. To select specific properties to retrieve, pass in the second object parameter a `select` property. + +`select`'s value is an array of property names to retrieve. + +### Returns + +The method returns an array with two items: + +1. The first is an array of the first `15` records retrieved. +2. The second is the total count of records. + +*** + +## Paginate Relations + +```ts +const [posts, count] = await postModuleService.listAndCountPosts({}, { + take: 20, + skip: 10, +}) +``` + +### Parameters + +To paginate the returned records, the second object parameter accepts the following properties: + +- `take`: a number indicating how many records to retrieve. By default, it's `15`. +- `skip`: a number indicating how many records to skip before the retrieved records. By default, it's `0`. + +### Returns + +The method returns an array with two items: + +1. The first is an array of the records retrieved. The number of records is less than or equal to `take`'s value. +2. The second is the total count of records. + +*** + +## Sort Records + +```ts +const [posts, count] = await postModuleService.listAndCountPosts({}, { + order: { + name: "ASC", + }, +}) +``` + +### Parameters + +To sort records by one or more properties, pass to the second object parameter the `order` property. Its value is an object whose keys are the property names, and values can either be: + +- `ASC` to sort by this property in the ascending order. +- `DESC` to sort by this property in the descending order. + +### Returns + +The method returns an array with two items: + +1. The first is an array of the first `15` records retrieved. +2. The second is the total count of records. + + +# update Method - Service Factory Reference + +This method updates one or more records of the data model. + +## Update One Record + +```ts +const post = await postModuleService.updatePosts({ + id: "123", + name: "My Post", +}) +``` + +### Parameters + +To update one record, pass an object that at least has an `id` property, identifying the ID of the record to update. + +You can pass in the same object any other properties to update. + +### Returns + +The method returns the updated record as an object. + +*** + +## Update Multiple Records + +```ts +const posts = await postModuleService.updatePosts([ + { + id: "123", + name: "My Post", + }, + { + id: "321", + published_at: new Date(), + }, +]) +``` + +### Parameters + +To update multiple records, pass an array of objects. Each object has at least an `id` property, identifying the ID of the record to update. + +You can pass in each object any other properties to update. + +### Returns + +The method returns an array of objects of updated records. + +*** + +## Update Records Matching a Filter + +```ts +const posts = await postModuleService.updatePosts({ + selector: { + name: "My Post", + }, + data: { + published_at: new Date(), + }, +}) +``` + +### Parameters + +To update records that match specified filters, pass as a parameter an object having two properties: + +- `selector`: An object of filters that a record must match to be updated. +- `data`: An object of the properties to update in every record that match the filters in `selector`. + +In the example above, you update the `published_at` property of every post record whose name is `My Post`. + +Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). + +### Returns + +The method returns an array of objects of updated records. + +*** + +## Multiple Record Updates with Filters + +```ts +const posts = await postModuleService.updatePosts([ + { + selector: { + name: "My Post", + }, + data: { + published_at: new Date(), + }, + }, + { + selector: { + name: "Another Post", + }, + data: { + metadata: { + external_id: "123", + }, + }, + }, +]) +``` + +### Parameters + +To update records matching different sets of filters, pass an array of objects, each having two properties: + +- `selector`: An object of filters that a record must match to be updated. +- `data`: An object of the properties to update in every record that match the filters in `selector`. + +In the example above, you update the `published_at` property of post records whose name is `My Post`, and update the `metadata` property of post records whose name is `Another Post`. + +Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). + +### Returns + +The method returns an array of objects of updated records. + + # Filter Records - Service Factory Reference Many of the service factory's generated methods allow passing filters to perform an operation, such as to update or delete records matching the filters. @@ -31462,249 +31974,6 @@ To use an `or` condition, pass to the filter object the `$or` property, whose va In the example above, posts whose name is `My Post` or their `published_at` date is less than the current date and time are retrieved. -# create Method - Service Factory Reference - -This method creates one or more records of the data model. - -## Create One Record - -```ts -const post = await postModuleService.createPosts({ - name: "My Post", - published_at: new Date(), - metadata: { - external_id: "1234", - }, -}) -``` - -If an object is passed of the method, an object of the created record is also returned. - -*** - -## Create Multiple Records - -```ts -const posts = await postModuleService.createPosts([ - { - name: "My Post", - published_at: new Date(), - }, - { - name: "My Other Post", - published_at: new Date(), - }, -]) -``` - -If an array is passed of the method, an array of the created records is also returned. - - -# list Method - Service Factory Reference - -This method retrieves a list of records. - -## Retrieve List of Records - -```ts -const posts = await postModuleService.listPosts() -``` - -If no parameters are passed, the method returns an array of the first `15` records. - -*** - -## Filter Records - -```ts -const posts = await postModuleService.listPosts({ - id: ["123", "321"], -}) -``` - -### Parameters - -To retrieve records matching a set of filters, pass an object of the filters as a first parameter. - -Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). - -### Returns - -The method returns an array of the first `15` records matching the filters. - -*** - -## Retrieve Relations - -This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md). - -```ts -const posts = await postModuleService.listPosts({}, { - relations: ["author"], -}) -``` - -### Parameters - -To retrieve records with their relations, pass as a second parameter an object having a `relations` property. `relations`'s value is an array of relation names. - -### Returns - -The method returns an array of the first `15` records matching the filters. - -*** - -## Select Properties - -```ts -const posts = await postModuleService.listPosts({}, { - select: ["id", "name"], -}) -``` - -### Parameters - -By default, retrieved records have all their properties. To select specific properties to retrieve, pass in the second object parameter a `select` property. - -`select`'s value is an array of property names to retrieve. - -### Returns - -The method returns an array of the first `15` records matching the filters. - -*** - -## Paginate Relations - -```ts -const posts = await postModuleService.listPosts({}, { - take: 20, - skip: 10, -}) -``` - -### Parameters - -To paginate the returned records, the second object parameter accepts the following properties: - -- `take`: a number indicating how many records to retrieve. By default, it's `15`. -- `skip`: a number indicating how many records to skip before the retrieved records. By default, it's `0`. - -### Returns - -The method returns an array of records. The number of records is less than or equal to `take`'s value. - -*** - -## Sort Records - -```ts -const posts = await postModuleService.listPosts({}, { - order: { - name: "ASC", - }, -}) -``` - -### Parameters - -To sort records by one or more properties, pass to the second object parameter the `order` property. Its value is an object whose keys are the property names, and values can either be: - -- `ASC` to sort by this property in the ascending order. -- `DESC` to sort by this property in the descending order. - -### Returns - -The method returns an array of the first `15` records matching the filters. - - -# restore Method - Service Factory Reference - -This method restores one or more records of the data model that were [soft-deleted](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/methods/soft-delete/index.html.md). - -## Restore One Record - -```ts -const restoredPosts = await postModuleService.restorePosts("123") -``` - -### Parameters - -To restore one record, pass its ID as a parameter of the method. - -### Returns - -The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. - -For example, the returned object of the above example is: - -```ts -restoredPosts = { - post_id: ["123"], -} -``` - -*** - -## Restore Multiple Records - -```ts -const restoredPosts = await postModuleService.restorePosts([ - "123", - "321", -]) -``` - -### Parameters - -To restore multiple records, pass an array of IDs as a parameter of the method. - -### Returns - -The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. - -For example, the returned object of the above example is: - -```ts -restoredPosts = { - post_id: [ - "123", - "321", - ], -} -``` - -*** - -## Restore Records Matching Filters - -```ts -const restoredPosts = await postModuleService.restorePosts({ - name: "My Post", -}) -``` - -### Parameters - -To restore records matching a set of filters, pass an object of fitlers as a parameter of the method. - -Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). - -### Returns - -The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. - -For example, the returned object of the above example is: - -```ts -restoredPosts = { - post_id: [ - "123", - ], -} -``` - - # softDelete Method - Service Factory Reference This method soft deletes one or more records of the data model. @@ -31792,361 +32061,92 @@ deletedPosts = { ``` -# retrieve Method - Service Factory Reference +# restore Method - Service Factory Reference -This method retrieves one record of the data model by its ID. +This method restores one or more records of the data model that were [soft-deleted](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/methods/soft-delete/index.html.md). -## Retrieve a Record +## Restore One Record ```ts -const post = await postModuleService.retrievePost("123") +const restoredPosts = await postModuleService.restorePosts("123") ``` ### Parameters -Pass the ID of the record to retrieve. +To restore one record, pass its ID as a parameter of the method. ### Returns -The method returns the record as an object. +The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. + +For example, the returned object of the above example is: + +```ts +restoredPosts = { + post_id: ["123"], +} +``` *** -## Retrieve a Record's Relations - -This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md). +## Restore Multiple Records ```ts -const post = await postModuleService.retrievePost("123", { - relations: ["author"], -}) -``` - -### Parameters - -To retrieve the data model with relations, pass as a second parameter of the method an object with the property `relations`. `relations`'s value is an array of relation names. - -### Returns - -The method returns the record as an object. - -*** - -## Select Properties to Retrieve - -```ts -const post = await postModuleService.retrievePost("123", { - select: ["id", "name"], -}) -``` - -### Parameters - -By default, all of the record's properties are retrieved. To select specific ones, pass in the second object parameter a `select` property. Its value is an array of property names. - -### Returns - -The method returns the record as an object. - - -# update Method - Service Factory Reference - -This method updates one or more records of the data model. - -## Update One Record - -```ts -const post = await postModuleService.updatePosts({ - id: "123", - name: "My Post", -}) -``` - -### Parameters - -To update one record, pass an object that at least has an `id` property, identifying the ID of the record to update. - -You can pass in the same object any other properties to update. - -### Returns - -The method returns the updated record as an object. - -*** - -## Update Multiple Records - -```ts -const posts = await postModuleService.updatePosts([ - { - id: "123", - name: "My Post", - }, - { - id: "321", - published_at: new Date(), - }, -]) -``` - -### Parameters - -To update multiple records, pass an array of objects. Each object has at least an `id` property, identifying the ID of the record to update. - -You can pass in each object any other properties to update. - -### Returns - -The method returns an array of objects of updated records. - -*** - -## Update Records Matching a Filter - -```ts -const posts = await postModuleService.updatePosts({ - selector: { - name: "My Post", - }, - data: { - published_at: new Date(), - }, -}) -``` - -### Parameters - -To update records that match specified filters, pass as a parameter an object having two properties: - -- `selector`: An object of filters that a record must match to be updated. -- `data`: An object of the properties to update in every record that match the filters in `selector`. - -In the example above, you update the `published_at` property of every post record whose name is `My Post`. - -Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). - -### Returns - -The method returns an array of objects of updated records. - -*** - -## Multiple Record Updates with Filters - -```ts -const posts = await postModuleService.updatePosts([ - { - selector: { - name: "My Post", - }, - data: { - published_at: new Date(), - }, - }, - { - selector: { - name: "Another Post", - }, - data: { - metadata: { - external_id: "123", - }, - }, - }, -]) -``` - -### Parameters - -To update records matching different sets of filters, pass an array of objects, each having two properties: - -- `selector`: An object of filters that a record must match to be updated. -- `data`: An object of the properties to update in every record that match the filters in `selector`. - -In the example above, you update the `published_at` property of post records whose name is `My Post`, and update the `metadata` property of post records whose name is `Another Post`. - -Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). - -### Returns - -The method returns an array of objects of updated records. - - -# delete Method - Service Factory Reference - -This method deletes one or more records. - -## Delete One Record - -```ts -await postModuleService.deletePosts("123") -``` - -To delete one record, pass its ID as a parameter of the method. - -*** - -## Delete Multiple Records - -```ts -await postModuleService.deletePosts([ +const restoredPosts = await postModuleService.restorePosts([ "123", "321", ]) ``` -To delete multiple records, pass an array of IDs as a parameter of the method. +### Parameters + +To restore multiple records, pass an array of IDs as a parameter of the method. + +### Returns + +The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. + +For example, the returned object of the above example is: + +```ts +restoredPosts = { + post_id: [ + "123", + "321", + ], +} +``` *** -## Delete Records Matching Filters +## Restore Records Matching Filters ```ts -await postModuleService.deletePosts({ +const restoredPosts = await postModuleService.restorePosts({ name: "My Post", }) ``` -To delete records matching a set of filters, pass an object of filters as a parameter. - -Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). - - -# listAndCount Method - Service Factory Reference - -This method retrieves a list of records with the total count. - -## Retrieve List of Records - -```ts -const [posts, count] = await postModuleService.listAndCountPosts() -``` - -If no parameters are passed, the method returns an array with two items: - -1. The first is an array of the first `15` records retrieved. -2. The second is the total count of records. - -*** - -## Filter Records - -```ts -const [posts, count] = await postModuleService.listAndCountPosts({ - id: ["123", "321"], -}) -``` - ### Parameters -To retrieve records matching a set of filters, pass an object of the filters as a first parameter. +To restore records matching a set of filters, pass an object of fitlers as a parameter of the method. Learn more about accepted filters in [this documentation](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/service-factory-reference/tips/filtering/index.html.md). ### Returns -The method returns an array with two items: +The method returns an object, whose keys are of the format `{camel_case_data_model_name}_id`, and their values are arrays of restored records' IDs. -1. The first is an array of the first `15` records retrieved matching the specified filters. -2. The second is the total count of records matching the specified filters. - -*** - -## Retrieve Relations - -This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md). +For example, the returned object of the above example is: ```ts -const [posts, count] = await postModuleService.listAndCountPosts({}, { - relations: ["author"], -}) +restoredPosts = { + post_id: [ + "123", + ], +} ``` -### Parameters - -To retrieve records with their relations, pass as a second parameter an object having a `relations` property. Its value is an array of relation names. - -### Returns - -The method returns an array with two items: - -1. The first is an array of the first `15` records retrieved. -2. The second is the total count of records. - -*** - -## Select Properties - -```ts -const [posts, count] = await postModuleService.listAndCountPosts({}, { - select: ["id", "name"], -}) -``` - -### Parameters - -By default, retrieved records have all their properties. To select specific properties to retrieve, pass in the second object parameter a `select` property. - -`select`'s value is an array of property names to retrieve. - -### Returns - -The method returns an array with two items: - -1. The first is an array of the first `15` records retrieved. -2. The second is the total count of records. - -*** - -## Paginate Relations - -```ts -const [posts, count] = await postModuleService.listAndCountPosts({}, { - take: 20, - skip: 10, -}) -``` - -### Parameters - -To paginate the returned records, the second object parameter accepts the following properties: - -- `take`: a number indicating how many records to retrieve. By default, it's `15`. -- `skip`: a number indicating how many records to skip before the retrieved records. By default, it's `0`. - -### Returns - -The method returns an array with two items: - -1. The first is an array of the records retrieved. The number of records is less than or equal to `take`'s value. -2. The second is the total count of records. - -*** - -## Sort Records - -```ts -const [posts, count] = await postModuleService.listAndCountPosts({}, { - order: { - name: "ASC", - }, -}) -``` - -### Parameters - -To sort records by one or more properties, pass to the second object parameter the `order` property. Its value is an object whose keys are the property names, and values can either be: - -- `ASC` to sort by this property in the ascending order. -- `DESC` to sort by this property in the descending order. - -### Returns - -The method returns an array with two items: - -1. The first is an array of the first `15` records retrieved. -2. The second is the total count of records. - diff --git a/www/apps/book/scripts/prepare.mjs b/www/apps/book/scripts/prepare.mjs index 717be92b1b..5076ac0f27 100644 --- a/www/apps/book/scripts/prepare.mjs +++ b/www/apps/book/scripts/prepare.mjs @@ -1,6 +1,6 @@ import "dotenv/config" import path from "path" -import { sidebar } from "../sidebar.mjs" +import { sidebars } from "../sidebar.mjs" import { generateEditedDates, generateLlmsFull, @@ -15,7 +15,7 @@ import { async function main() { await generateEditedDates() - await generateSidebar(sidebar, { + await generateSidebar(sidebars, { addNumbering: true, }) const baseUrl = diff --git a/www/apps/book/sidebar.mjs b/www/apps/book/sidebar.mjs index db87894319..b934c4724b 100644 --- a/www/apps/book/sidebar.mjs +++ b/www/apps/book/sidebar.mjs @@ -1,653 +1,657 @@ -import { sidebarAttachHrefCommonOptions } from "./utils/sidebar-attach-common-options.mjs" - -/** @type {import('@/types').SidebarItem[]} */ -export const sidebar = sidebarAttachHrefCommonOptions([ +/** @type {import("types").Sidebar.Sidebar[]} */ +export const sidebars = [ { - type: "category", + sidebar_id: "docs", title: "Get Started", - children: [ + items: [ { - type: "link", - path: "/learn", - title: "Introduction", - }, - { - type: "link", - path: "/learn/installation", - title: "Installation", - }, - { - type: "link", - title: "Architecture", - path: "/learn/introduction/architecture", - }, - ], - }, - { - type: "category", - title: "Customization Tutorial", - children: [ - { - type: "link", - title: "Build Custom Features", - path: "/learn/customization/custom-features", + type: "category", + title: "Get Started", children: [ { type: "link", - title: "Brand Module", - path: "/learn/customization/custom-features/module", + path: "/learn", + title: "Introduction", }, { type: "link", - title: "Brand Workflow", - path: "/learn/customization/custom-features/workflow", + path: "/learn/installation", + title: "Installation", }, { type: "link", - title: "Brand API Route", - path: "/learn/customization/custom-features/api-route", + title: "Architecture", + path: "/learn/introduction/architecture", + }, + ], + }, + { + type: "category", + title: "Customization Tutorial", + children: [ + { + type: "link", + title: "Build Custom Features", + path: "/learn/customization/custom-features", + children: [ + { + type: "link", + title: "Brand Module", + path: "/learn/customization/custom-features/module", + }, + { + type: "link", + title: "Brand Workflow", + path: "/learn/customization/custom-features/workflow", + }, + { + type: "link", + title: "Brand API Route", + path: "/learn/customization/custom-features/api-route", + }, + ], + }, + { + type: "link", + title: "Extend Features", + path: "/learn/customization/extend-features", + children: [ + { + type: "link", + title: "Link Brands and Products", + path: "/learn/customization/extend-features/define-link", + }, + { + type: "link", + title: "Extend Core Flow", + path: "/learn/customization/extend-features/extend-create-product", + }, + { + type: "link", + title: "Query Linked Records", + path: "/learn/customization/extend-features/query-linked-records", + }, + ], + }, + { + type: "link", + title: "Customize Admin", + path: "/learn/customization/customize-admin", + children: [ + { + type: "link", + title: "Add Widget", + path: "/learn/customization/customize-admin/widget", + }, + { + type: "link", + title: "Add UI Route", + path: "/learn/customization/customize-admin/route", + }, + ], + }, + { + type: "link", + title: "Integrate Systems", + path: "/learn/customization/integrate-systems", + children: [ + { + type: "link", + title: "CMS Module", + path: "/learn/customization/integrate-systems/service", + }, + { + type: "link", + title: "Sync to CMS", + path: "/learn/customization/integrate-systems/handle-event", + }, + { + type: "link", + title: "Schedule Syncing", + path: "/learn/customization/integrate-systems/schedule-task", + }, + ], + }, + { + type: "link", + title: "Re-Use Customizations", + path: "/learn/customization/reuse-customizations", + }, + { + type: "link", + title: "Next Steps", + path: "/learn/customization/next-steps", + }, + ], + }, + { + type: "category", + title: "Framework", + children: [ + { + type: "link", + path: "/learn/fundamentals/medusa-container", + title: "Medusa Container", + }, + { + type: "link", + path: "/learn/fundamentals/modules", + title: "Modules", + children: [ + { + type: "link", + path: "/learn/fundamentals/modules/modules-directory-structure", + title: "Directory Structure", + }, + { + type: "link", + path: "/learn/fundamentals/modules/loaders", + title: "Loaders", + }, + { + type: "link", + path: "/learn/fundamentals/modules/isolation", + title: "Module Isolation", + }, + { + type: "link", + path: "/learn/fundamentals/modules/container", + title: "Module Container", + }, + { + type: "link", + path: "/learn/fundamentals/modules/options", + title: "Module Options", + }, + { + type: "link", + path: "/learn/fundamentals/modules/service-factory", + title: "Service Factory", + }, + { + type: "link", + path: "/learn/fundamentals/modules/service-constraints", + title: "Service Constraints", + }, + { + type: "link", + path: "/learn/fundamentals/modules/db-operations", + title: "Database Operations", + }, + { + type: "link", + path: "/learn/fundamentals/modules/multiple-services", + title: "Multiple Services", + }, + { + type: "link", + path: "/learn/fundamentals/modules/commerce-modules", + title: "Commerce Modules", + }, + { + type: "link", + path: "/learn/fundamentals/modules/architectural-modules", + title: "Architectural Modules", + }, + ], + }, + { + type: "link", + path: "/learn/fundamentals/module-links", + title: "Module Links", + children: [ + { + type: "link", + path: "/learn/fundamentals/module-links/directions", + title: "Module Link Direction", + }, + { + type: "link", + path: "/learn/fundamentals/module-links/link", + title: "Link", + }, + { + type: "link", + path: "/learn/fundamentals/module-links/query", + title: "Query", + }, + { + type: "link", + path: "/learn/fundamentals/module-links/custom-columns", + title: "Custom Columns", + }, + { + type: "link", + path: "/learn/fundamentals/module-links/query-context", + title: "Query Context", + }, + ], + }, + { + type: "link", + path: "/learn/fundamentals/data-models", + title: "Data Models", + children: [ + { + type: "link", + path: "/learn/fundamentals/data-models/infer-type", + title: "Infer Type", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/property-types", + title: "Property Types", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/primary-key", + title: "Primary Key", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/default-properties", + title: "Default Properties", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/configure-properties", + title: "Configure Properties", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/relationships", + title: "Relationships", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/manage-relationships", + title: "Manage Relationships", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/index", + title: "Define Index", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/check-constraints", + title: "Check Constraints", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/searchable-property", + title: "Searchable Property", + }, + { + type: "link", + path: "/learn/fundamentals/data-models/write-migration", + title: "Write Migration", + }, + ], + }, + { + type: "link", + title: "API Routes", + path: "/learn/fundamentals/api-routes", + children: [ + { + type: "link", + path: "/learn/fundamentals/api-routes/http-methods", + title: "HTTP Methods", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/parameters", + title: "Parameters", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/responses", + title: "Response", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/middlewares", + title: "Middlewares", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/parse-body", + title: "Body Parsing", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/validation", + title: "Validation", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/protected-routes", + title: "Protected Routes", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/errors", + title: "Errors", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/cors", + title: "Handling CORS", + }, + { + type: "link", + path: "/learn/fundamentals/api-routes/additional-data", + title: "Additional Data", + }, + ], + }, + { + type: "link", + path: "/learn/fundamentals/workflows", + title: "Workflows", + children: [ + { + type: "link", + path: "/learn/fundamentals/workflows/constructor-constraints", + title: "Constructor Constraints", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/variable-manipulation", + title: "Transform Variables", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/conditions", + title: "When-Then Conditions", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/compensation-function", + title: "Compensation Function", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/workflow-hooks", + title: "Workflow Hooks", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/add-workflow-hook", + title: "Expose a Hook", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/access-workflow-errors", + title: "Access Workflow Errors", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/retry-failed-steps", + title: "Retry Failed Steps", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/parallel-steps", + title: "Run Steps in Parallel", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/workflow-timeout", + title: "Workflow Timeout", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/store-executions", + title: "Store Workflow Executions", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/long-running-workflow", + title: "Long-Running Workflow", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/execute-another-workflow", + title: "Execute Another Workflow", + }, + { + type: "link", + path: "/learn/fundamentals/workflows/multiple-step-usage", + title: "Multiple Step Usage", + }, + ], + }, + { + type: "link", + path: "/learn/fundamentals/events-and-subscribers", + title: "Events and Subscribers", + children: [ + { + type: "link", + path: "/learn/fundamentals/events-and-subscribers/data-payload", + title: "Events Data Payload", + }, + { + type: "link", + path: "/learn/fundamentals/events-and-subscribers/emit-event", + title: "Emit Event", + }, + ], + }, + { + type: "link", + path: "/learn/fundamentals/scheduled-jobs", + title: "Scheduled Jobs", + children: [ + { + type: "link", + path: "/learn/fundamentals/scheduled-jobs/execution-number", + title: "Execution Number", + }, + ], + }, + { + type: "link", + path: "/learn/fundamentals/plugins", + title: "Plugins", + children: [ + { + type: "link", + path: "/learn/fundamentals/plugins/create", + title: "Create Plugin", + }, + ], + }, + { + type: "link", + path: "/learn/fundamentals/custom-cli-scripts", + title: "Custom CLI Scripts", + children: [ + { + type: "link", + path: "/learn/fundamentals/custom-cli-scripts/seed-data", + title: "Seed Data", + }, + ], + }, + ], + }, + { + type: "category", + title: "Admin Development", + children: [ + { + type: "link", + path: "/learn/fundamentals/admin", + title: "Overview", + }, + { + type: "link", + path: "/learn/fundamentals/admin/widgets", + title: "Admin Widgets", + }, + { + type: "link", + path: "/learn/fundamentals/admin/ui-routes", + title: "Admin UI Routes", + }, + { + type: "link", + path: "/learn/fundamentals/admin/environment-variables", + title: "Environment Variables", + }, + { + type: "link", + path: "/learn/fundamentals/admin/routing", + title: "Routing Customizations", + }, + { + type: "link", + path: "/learn/fundamentals/admin/constraints", + title: "Constraints", + }, + { + type: "link", + path: "/learn/fundamentals/admin/tips", + title: "Tips", }, ], }, { type: "link", - title: "Extend Features", - path: "/learn/customization/extend-features", + path: "/learn/storefront-development", + title: "Storefront Development", + chapterTitle: "Storefront", + }, + { + type: "category", + title: "Configurations", children: [ { type: "link", - title: "Link Brands and Products", - path: "/learn/customization/extend-features/define-link", + title: "Environment Variables", + path: "/learn/fundamentals/environment-variables", }, { type: "link", - title: "Extend Core Flow", - path: "/learn/customization/extend-features/extend-create-product", + title: "Type Aliases", + path: "/learn/conventions/ts-aliases", + }, + ], + }, + { + type: "category", + title: "Debugging & Testing", + children: [ + { + type: "link", + path: "/learn/debugging-and-testing/testing-tools", + title: "Testing Tools", }, { type: "link", - title: "Query Linked Records", - path: "/learn/customization/extend-features/query-linked-records", + path: "/learn/debugging-and-testing/testing-tools/integration-tests", + title: "Integration Tests", + children: [ + { + type: "link", + path: "/learn/debugging-and-testing/testing-tools/integration-tests/api-routes", + title: "Example: API Routes Tests", + }, + { + type: "link", + path: "/learn/debugging-and-testing/testing-tools/integration-tests/workflows", + title: "Example: Workflows Tests", + }, + ], + }, + { + type: "link", + path: "/learn/debugging-and-testing/testing-tools/modules-tests", + title: "Modules Tests", + children: [ + { + type: "link", + path: "/learn/debugging-and-testing/testing-tools/modules-tests/module-example", + title: "Example", + }, + ], + }, + { + type: "link", + path: "/learn/debugging-and-testing/instrumentation", + title: "Instrumentation", + }, + { + type: "link", + path: "/learn/debugging-and-testing/logging", + title: "Logging", }, ], }, { type: "link", - title: "Customize Admin", - path: "/learn/customization/customize-admin", + path: "/learn/build", + title: "Build", + chapterTitle: "Production", children: [ { type: "link", - title: "Add Widget", - path: "/learn/customization/customize-admin/widget", + path: "/learn/deployment", + title: "Deployment Overview", }, { type: "link", - title: "Add UI Route", - path: "/learn/customization/customize-admin/route", + path: "/learn/deployment/general", + title: "General Deployment", }, ], }, { - type: "link", - title: "Integrate Systems", - path: "/learn/customization/integrate-systems", + type: "category", + title: "Upgrade", children: [ { type: "link", - title: "CMS Module", - path: "/learn/customization/integrate-systems/service", + path: "/learn/update", + title: "Update Medusa", }, { - type: "link", - title: "Sync to CMS", - path: "/learn/customization/integrate-systems/handle-event", - }, - { - type: "link", - title: "Schedule Syncing", - path: "/learn/customization/integrate-systems/schedule-task", + type: "external", + path: "https://github.com/medusajs/medusa/releases", + title: "Release Notes", }, ], }, { - type: "link", - title: "Re-Use Customizations", - path: "/learn/customization/reuse-customizations", - }, - { - type: "link", - title: "Next Steps", - path: "/learn/customization/next-steps", - }, - ], - }, - { - type: "category", - title: "Framework", - children: [ - { - type: "link", - path: "/learn/fundamentals/medusa-container", - title: "Medusa Container", - }, - { - type: "link", - path: "/learn/fundamentals/modules", - title: "Modules", + type: "category", + title: "Resources", children: [ { - type: "link", - path: "/learn/fundamentals/modules/modules-directory-structure", - title: "Directory Structure", + type: "sub-category", + title: "Contribution Guidelines", + children: [ + { + type: "link", + path: "/learn/resources/contribution-guidelines/docs", + title: "Docs", + }, + { + type: "link", + path: "/learn/resources//contribution-guidelines/admin-translations", + title: "Admin Translations", + }, + ], }, { type: "link", - path: "/learn/fundamentals/modules/loaders", - title: "Loaders", - }, - { - type: "link", - path: "/learn/fundamentals/modules/isolation", - title: "Module Isolation", - }, - { - type: "link", - path: "/learn/fundamentals/modules/container", - title: "Module Container", - }, - { - type: "link", - path: "/learn/fundamentals/modules/options", - title: "Module Options", - }, - { - type: "link", - path: "/learn/fundamentals/modules/service-factory", - title: "Service Factory", - }, - { - type: "link", - path: "/learn/fundamentals/modules/service-constraints", - title: "Service Constraints", - }, - { - type: "link", - path: "/learn/fundamentals/modules/db-operations", - title: "Database Operations", - }, - { - type: "link", - path: "/learn/fundamentals/modules/multiple-services", - title: "Multiple Services", - }, - { - type: "link", - path: "/learn/fundamentals/modules/commerce-modules", - title: "Commerce Modules", - }, - { - type: "link", - path: "/learn/fundamentals/modules/architectural-modules", - title: "Architectural Modules", - }, - ], - }, - { - type: "link", - path: "/learn/fundamentals/module-links", - title: "Module Links", - children: [ - { - type: "link", - path: "/learn/fundamentals/module-links/directions", - title: "Module Link Direction", - }, - { - type: "link", - path: "/learn/fundamentals/module-links/link", - title: "Link", - }, - { - type: "link", - path: "/learn/fundamentals/module-links/query", - title: "Query", - }, - { - type: "link", - path: "/learn/fundamentals/module-links/custom-columns", - title: "Custom Columns", - }, - { - type: "link", - path: "/learn/fundamentals/module-links/query-context", - title: "Query Context", - }, - ], - }, - { - type: "link", - path: "/learn/fundamentals/data-models", - title: "Data Models", - children: [ - { - type: "link", - path: "/learn/fundamentals/data-models/infer-type", - title: "Infer Type", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/property-types", - title: "Property Types", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/primary-key", - title: "Primary Key", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/default-properties", - title: "Default Properties", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/configure-properties", - title: "Configure Properties", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/relationships", - title: "Relationships", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/manage-relationships", - title: "Manage Relationships", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/index", - title: "Define Index", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/check-constraints", - title: "Check Constraints", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/searchable-property", - title: "Searchable Property", - }, - { - type: "link", - path: "/learn/fundamentals/data-models/write-migration", - title: "Write Migration", - }, - ], - }, - { - type: "link", - title: "API Routes", - path: "/learn/fundamentals/api-routes", - children: [ - { - type: "link", - path: "/learn/fundamentals/api-routes/http-methods", - title: "HTTP Methods", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/parameters", - title: "Parameters", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/responses", - title: "Response", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/middlewares", - title: "Middlewares", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/parse-body", - title: "Body Parsing", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/validation", - title: "Validation", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/protected-routes", - title: "Protected Routes", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/errors", - title: "Errors", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/cors", - title: "Handling CORS", - }, - { - type: "link", - path: "/learn/fundamentals/api-routes/additional-data", - title: "Additional Data", - }, - ], - }, - { - type: "link", - path: "/learn/fundamentals/workflows", - title: "Workflows", - children: [ - { - type: "link", - path: "/learn/fundamentals/workflows/constructor-constraints", - title: "Constructor Constraints", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/variable-manipulation", - title: "Transform Variables", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/conditions", - title: "When-Then Conditions", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/compensation-function", - title: "Compensation Function", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/workflow-hooks", - title: "Workflow Hooks", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/add-workflow-hook", - title: "Expose a Hook", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/access-workflow-errors", - title: "Access Workflow Errors", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/retry-failed-steps", - title: "Retry Failed Steps", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/parallel-steps", - title: "Run Steps in Parallel", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/workflow-timeout", - title: "Workflow Timeout", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/store-executions", - title: "Store Workflow Executions", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/long-running-workflow", - title: "Long-Running Workflow", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/execute-another-workflow", - title: "Execute Another Workflow", - }, - { - type: "link", - path: "/learn/fundamentals/workflows/multiple-step-usage", - title: "Multiple Step Usage", - }, - ], - }, - { - type: "link", - path: "/learn/fundamentals/events-and-subscribers", - title: "Events and Subscribers", - children: [ - { - type: "link", - path: "/learn/fundamentals/events-and-subscribers/data-payload", - title: "Events Data Payload", - }, - { - type: "link", - path: "/learn/fundamentals/events-and-subscribers/emit-event", - title: "Emit Event", - }, - ], - }, - { - type: "link", - path: "/learn/fundamentals/scheduled-jobs", - title: "Scheduled Jobs", - children: [ - { - type: "link", - path: "/learn/fundamentals/scheduled-jobs/execution-number", - title: "Execution Number", - }, - ], - }, - { - type: "link", - path: "/learn/fundamentals/plugins", - title: "Plugins", - children: [ - { - type: "link", - path: "/learn/fundamentals/plugins/create", - title: "Create Plugin", - }, - ], - }, - { - type: "link", - path: "/learn/fundamentals/custom-cli-scripts", - title: "Custom CLI Scripts", - children: [ - { - type: "link", - path: "/learn/fundamentals/custom-cli-scripts/seed-data", - title: "Seed Data", + path: "/learn/resources/usage", + title: "Usage", }, ], }, ], }, - { - type: "category", - title: "Admin Development", - children: [ - { - type: "link", - path: "/learn/fundamentals/admin", - title: "Overview", - }, - { - type: "link", - path: "/learn/fundamentals/admin/widgets", - title: "Admin Widgets", - }, - { - type: "link", - path: "/learn/fundamentals/admin/ui-routes", - title: "Admin UI Routes", - }, - { - type: "link", - path: "/learn/fundamentals/admin/environment-variables", - title: "Environment Variables", - }, - { - type: "link", - path: "/learn/fundamentals/admin/routing", - title: "Routing Customizations", - }, - { - type: "link", - path: "/learn/fundamentals/admin/constraints", - title: "Constraints", - }, - { - type: "link", - path: "/learn/fundamentals/admin/tips", - title: "Tips", - }, - ], - }, - { - type: "link", - path: "/learn/storefront-development", - title: "Storefront Development", - chapterTitle: "Storefront", - }, - { - type: "category", - title: "Configurations", - children: [ - { - type: "link", - title: "Environment Variables", - path: "/learn/fundamentals/environment-variables", - }, - { - type: "link", - title: "Type Aliases", - path: "/learn/conventions/ts-aliases", - }, - ], - }, - { - type: "category", - title: "Debugging & Testing", - children: [ - { - type: "link", - path: "/learn/debugging-and-testing/testing-tools", - title: "Testing Tools", - }, - { - type: "link", - path: "/learn/debugging-and-testing/testing-tools/integration-tests", - title: "Integration Tests", - children: [ - { - type: "link", - path: "/learn/debugging-and-testing/testing-tools/integration-tests/api-routes", - title: "Example: API Routes Tests", - }, - { - type: "link", - path: "/learn/debugging-and-testing/testing-tools/integration-tests/workflows", - title: "Example: Workflows Tests", - }, - ], - }, - { - type: "link", - path: "/learn/debugging-and-testing/testing-tools/modules-tests", - title: "Modules Tests", - children: [ - { - type: "link", - path: "/learn/debugging-and-testing/testing-tools/modules-tests/module-example", - title: "Example", - }, - ], - }, - { - type: "link", - path: "/learn/debugging-and-testing/instrumentation", - title: "Instrumentation", - }, - { - type: "link", - path: "/learn/debugging-and-testing/logging", - title: "Logging", - }, - ], - }, - { - type: "link", - path: "/learn/build", - title: "Build", - chapterTitle: "Production", - children: [ - { - type: "link", - path: "/learn/deployment", - title: "Deployment Overview", - }, - { - type: "link", - path: "/learn/deployment/general", - title: "General Deployment", - }, - ], - }, - { - type: "category", - title: "Upgrade", - children: [ - { - type: "link", - path: "/learn/update", - title: "Update Medusa", - }, - { - type: "external", - path: "https://github.com/medusajs/medusa/releases", - title: "Release Notes", - }, - ], - }, - { - type: "category", - title: "Resources", - children: [ - { - type: "sub-category", - title: "Contribution Guidelines", - children: [ - { - type: "link", - path: "/resources/contribution-guidelines/docs", - title: "Docs", - }, - { - type: "link", - path: "/resources//contribution-guidelines/admin-translations", - title: "Admin Translations", - }, - ], - }, - { - type: "link", - path: "/resources/usage", - title: "Usage", - }, - ], - }, -]) +] diff --git a/www/apps/book/types/index.d.ts b/www/apps/book/types/index.d.ts deleted file mode 100644 index 3934655afd..0000000000 --- a/www/apps/book/types/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { SidebarSectionItems, SidebarItem as SidebarItemType } from "types" - -export declare type SidebarItem = SidebarItemType & { - isSoon: boolean - number?: string -} - -export declare type SidebarConfig = SidebarSectionItems diff --git a/www/apps/book/utils/sidebar-attach-common-options.mjs b/www/apps/book/utils/sidebar-attach-common-options.mjs deleted file mode 100644 index 350a3f07bb..0000000000 --- a/www/apps/book/utils/sidebar-attach-common-options.mjs +++ /dev/null @@ -1,31 +0,0 @@ -/** @type {Partial} */ -const commonOptions = { - loaded: true, - isPathHref: true, -} - -/** - * - * @param {import("@/types").SidebarItem[]} sidebar - * @param {boolean} nested - * @returns {import("@/types").SidebarItem[]} - */ -export function sidebarAttachHrefCommonOptions(sidebar, nested = false) { - return sidebar.map((item) => { - if (item.type === "separator") { - return item - } - - const updatedItem = { - ...commonOptions, - ...item, - children: sidebarAttachHrefCommonOptions(item.children || [], true), - } - - if (updatedItem.type !== "category" && !nested) { - updatedItem.childrenSameLevel = true - } - - return updatedItem - }) -} diff --git a/www/apps/resources/app/admin-components/page.mdx b/www/apps/resources/app/admin-components/page.mdx index 57f0abde07..97dab89aff 100644 --- a/www/apps/resources/app/admin-components/page.mdx +++ b/www/apps/resources/app/admin-components/page.mdx @@ -16,7 +16,7 @@ Refer to the [Medusa UI documentation](!ui!) for a full list of components. Use these components to set the layout of your UI route. - + --- @@ -24,4 +24,4 @@ Use these components to set the layout of your UI route. Use these components in your widgets and UI routes. - + diff --git a/www/apps/resources/app/examples/guides/quote-management/page.mdx b/www/apps/resources/app/examples/guides/quote-management/page.mdx new file mode 100644 index 0000000000..e69de29bb2 diff --git a/www/apps/resources/app/layout.tsx b/www/apps/resources/app/layout.tsx index 318f1f61e6..e3e4540776 100644 --- a/www/apps/resources/app/layout.tsx +++ b/www/apps/resources/app/layout.tsx @@ -63,13 +63,7 @@ export default function RootLayout({ htmlClassName={clsx(inter.variable, robotoMono.variable)} gaId={process.env.NEXT_PUBLIC_GA_ID} > - } - > + }> {children} diff --git a/www/apps/resources/app/recipes/page.mdx b/www/apps/resources/app/recipes/page.mdx index a0758ec215..c402998142 100644 --- a/www/apps/resources/app/recipes/page.mdx +++ b/www/apps/resources/app/recipes/page.mdx @@ -8,4 +8,4 @@ export const metadata = { This section of the documentation provides recipes for common use cases with example implementations. - \ No newline at end of file + \ No newline at end of file diff --git a/www/apps/resources/app/storefront-development/page.mdx b/www/apps/resources/app/storefront-development/page.mdx index 37dee4d7c4..3d781174e6 100644 --- a/www/apps/resources/app/storefront-development/page.mdx +++ b/www/apps/resources/app/storefront-development/page.mdx @@ -20,4 +20,4 @@ You can build your storefront from scratch, or built it on top of the [Next.js S --- - + diff --git a/www/apps/resources/app/troubleshooting/page.mdx b/www/apps/resources/app/troubleshooting/page.mdx index 648bcc9973..5544804f56 100644 --- a/www/apps/resources/app/troubleshooting/page.mdx +++ b/www/apps/resources/app/troubleshooting/page.mdx @@ -12,4 +12,4 @@ The following troubleshooting guides are intended for technical users. If you're - \ No newline at end of file + \ No newline at end of file diff --git a/www/apps/resources/components/CommerceModuleSections/index.tsx b/www/apps/resources/components/CommerceModuleSections/index.tsx index f5381bef68..80fcb16333 100644 --- a/www/apps/resources/components/CommerceModuleSections/index.tsx +++ b/www/apps/resources/components/CommerceModuleSections/index.tsx @@ -12,7 +12,7 @@ export const CommerceModuleSections = () => { showItems: ["Server Guides"], defaultItemsPerRow: 2, }) - if (serverGuideItems?.default.length) { + if (serverGuideItems?.length) { guideComponents.push(serverGuidesComponent) } const { items: storefrontGuideItems, component: storefrontGuidesComponent } = @@ -20,7 +20,7 @@ export const CommerceModuleSections = () => { showItems: ["Storefront Guides"], defaultItemsPerRow: 2, }) - if (storefrontGuideItems?.default.length) { + if (storefrontGuideItems?.length) { guideComponents.push(storefrontGuidesComponent) } const { items: adminGuideItems, component: adminGuidesComponent } = @@ -28,7 +28,7 @@ export const CommerceModuleSections = () => { showItems: ["Admin Guides"], defaultItemsPerRow: 2, }) - if (adminGuideItems?.default.length) { + if (adminGuideItems?.length) { guideComponents.push(adminGuidesComponent) } const { items: userGuideItems, component: userGuidesComponent } = @@ -36,14 +36,14 @@ export const CommerceModuleSections = () => { showItems: ["User Guides"], defaultItemsPerRow: 2, }) - if (userGuideItems?.default.length) { + if (userGuideItems?.length) { guideComponents.push(userGuidesComponent) } const { items: jsSdkItems, component: jsSdkComponent } = useChildDocs({ showItems: ["JS SDK"], itemsPerRow: 2, }) - if (jsSdkItems?.default.length) { + if (jsSdkItems?.length) { referenceComponents.push(jsSdkComponent) } const { items: referenceItems, component: referencesComponent } = @@ -51,7 +51,7 @@ export const CommerceModuleSections = () => { showItems: ["References"], defaultItemsPerRow: 2, }) - if (referenceItems?.default.length) { + if (referenceItems?.length) { referenceComponents.push(referencesComponent) } diff --git a/www/apps/resources/config/index.ts b/www/apps/resources/config/index.ts index 6ae1ffbdcc..034d4eb79b 100644 --- a/www/apps/resources/config/index.ts +++ b/www/apps/resources/config/index.ts @@ -1,5 +1,5 @@ -import { DocsConfig, SidebarItem } from "types" -import { generatedSidebar } from "../generated/sidebar.mjs" +import { DocsConfig, Sidebar } from "types" +import { generatedSidebars } from "../generated/sidebar.mjs" import { globalConfig } from "docs-ui" const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000" @@ -9,16 +9,18 @@ export const config: DocsConfig = { titleSuffix: "Medusa Development Resources", baseUrl, basePath: process.env.NEXT_PUBLIC_BASE_PATH, - sidebar: { - default: generatedSidebar as SidebarItem[], - mobile: [], - }, + sidebars: generatedSidebars as Sidebar.Sidebar[], project: { title: "Development Resources", key: "resources", }, breadcrumbOptions: { - showCategories: true, + startItems: [ + { + title: "Documentation", + link: baseUrl, + }, + ], }, logo: `${process.env.NEXT_PUBLIC_BASE_PATH}/images/logo.png`, } diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 0a00ec1900..ff277ad41f 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -123,7 +123,7 @@ export const generatedEditDates = { "app/recipes/pos/page.mdx": "2025-02-26T12:42:52.949Z", "app/recipes/subscriptions/examples/standard/page.mdx": "2025-03-03T15:02:56.854Z", "app/recipes/subscriptions/page.mdx": "2025-02-26T12:31:49.933Z", - "app/recipes/page.mdx": "2024-07-11T15:56:41+00:00", + "app/recipes/page.mdx": "2025-03-07T07:48:28.203Z", "app/service-factory-reference/methods/create/page.mdx": "2024-07-31T17:01:33+03:00", "app/service-factory-reference/methods/delete/page.mdx": "2024-07-31T17:01:33+03:00", "app/service-factory-reference/methods/list/page.mdx": "2024-07-31T17:01:33+03:00", @@ -177,7 +177,7 @@ export const generatedEditDates = { "app/storefront-development/regions/store-retrieve-region/page.mdx": "2024-12-19T16:36:22.800Z", "app/storefront-development/regions/page.mdx": "2024-06-09T15:19:09+02:00", "app/storefront-development/tips/page.mdx": "2024-12-19T16:36:32.938Z", - "app/storefront-development/page.mdx": "2024-12-10T09:23:20.666Z", + "app/storefront-development/page.mdx": "2025-03-07T07:49:27.809Z", "app/troubleshooting/cors-errors/page.mdx": "2024-05-03T17:36:38+03:00", "app/troubleshooting/create-medusa-app-errors/page.mdx": "2024-07-11T10:29:13+03:00", "app/troubleshooting/database-errors/page.mdx": "2024-05-03T17:36:38+03:00", @@ -2101,7 +2101,7 @@ export const generatedEditDates = { "app/admin-components/components/json-view-section/page.mdx": "2024-10-07T11:15:58.833Z", "app/admin-components/components/section-row/page.mdx": "2024-10-07T11:15:58.832Z", "app/admin-components/components/table/page.mdx": "2025-03-03T14:53:37.952Z", - "app/admin-components/page.mdx": "2024-10-07T11:09:49.493Z", + "app/admin-components/page.mdx": "2025-03-07T08:00:46.960Z", "app/admin-components/layouts/single-column/page.mdx": "2024-10-07T11:16:06.435Z", "app/admin-components/layouts/two-column/page.mdx": "2024-10-07T11:16:10.092Z", "app/admin-components/components/forms/page.mdx": "2024-10-09T12:48:04.229Z", diff --git a/www/apps/resources/generated/files-map.mjs b/www/apps/resources/generated/files-map.mjs index 1f46ecfcae..5a7b81c8f8 100644 --- a/www/apps/resources/generated/files-map.mjs +++ b/www/apps/resources/generated/files-map.mjs @@ -787,6 +787,10 @@ export const filesMap = [ "filePath": "/www/apps/resources/app/examples/guides/custom-item-price/page.mdx", "pathname": "/examples/guides/custom-item-price" }, + { + "filePath": "/www/apps/resources/app/examples/guides/quote-management/page.mdx", + "pathname": "/examples/guides/quote-management" + }, { "filePath": "/www/apps/resources/app/examples/page.mdx", "pathname": "/examples" diff --git a/www/apps/resources/generated/sidebar.mjs b/www/apps/resources/generated/sidebar.mjs index b81a5816a1..6da6ecf758 100644 --- a/www/apps/resources/generated/sidebar.mjs +++ b/www/apps/resources/generated/sidebar.mjs @@ -1,275 +1,88 @@ -export const generatedSidebar = [ +export const generatedSidebars = [ { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/examples", - "title": "Examples", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "path": "/examples", - "title": "Example Snippets", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "path": "/recipes", - "title": "Recipes", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "path": "/plugins", - "title": "Plugins", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "path": "/integrations", - "title": "Integrations", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Server Examples", - "autogenerate_tags": "example+server", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Custom Item Price", - "path": "/examples/guides/custom-item-price", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Storefront Examples", - "autogenerate_tags": "example+storefront", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Implement Express Checkout with Medusa", - "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes", - "title": "Recipes", - "isChildSidebar": true, - "children": [ + "sidebar_id": "resources", + "title": "Development Resources", + "items": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/recipes/marketplace", - "title": "Marketplace", + "path": "/", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "examples", + "title": "Examples", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/recipes/marketplace/examples/vendors", - "title": "Example: Vendors", + "path": "/examples", + "title": "Example Snippets", "children": [] }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/recipes/marketplace/examples/restaurant-delivery", - "title": "Example: Restaurant-Delivery", + "type": "ref", + "path": "/recipes", + "title": "Recipes", "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/plugins", + "title": "Plugins", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/integrations", + "title": "Integrations", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Examples", + "autogenerate_tags": "example+storefront", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Express Checkout with Medusa", + "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", + "children": [] + } + ] } ] }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/recipes/subscriptions", - "title": "Subscriptions", + "type": "sidebar", + "sidebar_id": "recipes", + "title": "Recipes", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/recipes/subscriptions/examples/standard", - "title": "Example", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/digital-products", - "title": "Digital Products", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/digital-products/examples/standard", - "title": "Example", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/erp", - "title": "Integrate ERP", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/erp/odoo", - "title": "Example: Odoo Integration", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/b2b", - "title": "B2B", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/commerce-automation", - "title": "Commerce Automation", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/commerce-automation/restock-notification", - "title": "Example: Restock Notifications", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/ecommerce", - "title": "Ecommerce", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/multi-region-store", - "title": "Multi-Region Store", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/omnichannel", - "title": "Omnichannel Store", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/oms", - "title": "OMS", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/personalized-products", - "title": "Personalized Products", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/recipes/pos", - "title": "POS", - "children": [] - } - ] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules", - "title": "Commerce Modules", - "hideChildren": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "API Key Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/api-key", + "path": "/recipes", "title": "Overview", "children": [] }, @@ -279,24 +92,24 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, + "type": "link", + "path": "/recipes/marketplace", + "title": "Marketplace", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/api-key/concepts", - "title": "API Key Concepts", + "path": "/recipes/marketplace/examples/vendors", + "title": "Example: Vendors", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/api-key/links-to-other-modules", - "title": "Link to Modules", + "path": "/recipes/marketplace/examples/restaurant-delivery", + "title": "Example: Restaurant-Delivery", "children": [] } ] @@ -304,75 +117,847 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Storefront Guides", - "initialOpen": false, - "autogenerate_tags": "storefront+apiKey,-jsSdk", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the API Key Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Use a Publishable API Key in the Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/publishable-api-keys", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "initialOpen": false, - "autogenerate_tags": "userGuide+apiKey", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage API Key features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Publishable API Keys", - "path": "https://docs.medusajs.com/user-guide/settings/developer/publishable-api-keys", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Secret API Keys", - "path": "https://docs.medusajs.com/user-guide/settings/developer/secret-api-keys", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the API Key Module, such as data models, methods, and more. These are useful for your customizations.", + "type": "link", + "path": "/recipes/subscriptions", + "title": "Subscriptions", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/api-key/workflows", - "title": "Workflows", - "hideChildren": true, + "path": "/recipes/subscriptions/examples/standard", + "title": "Example", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/digital-products", + "title": "Digital Products", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/digital-products/examples/standard", + "title": "Example", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/erp", + "title": "Integrate ERP", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/erp/odoo", + "title": "Example: Odoo Integration", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/b2b", + "title": "B2B", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/commerce-automation", + "title": "Commerce Automation", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/commerce-automation/restock-notification", + "title": "Example: Restock Notifications", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/ecommerce", + "title": "Ecommerce", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/multi-region-store", + "title": "Multi-Region Store", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/omnichannel", + "title": "Omnichannel Store", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/oms", + "title": "OMS", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/personalized-products", + "title": "Personalized Products", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/recipes/pos", + "title": "POS", + "children": [] + } + ] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules", + "title": "Commerce Modules", + "hideChildren": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "api-key", + "title": "API Key Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/api-key", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, "children": [ { "loaded": true, "isPathHref": true, - "type": "category", + "type": "link", + "path": "/commerce-modules/api-key/concepts", + "title": "API Key Concepts", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/api-key/links-to-other-modules", + "title": "Link to Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "initialOpen": false, + "autogenerate_tags": "storefront+apiKey,-jsSdk", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the API Key Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Use a Publishable API Key in the Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/publishable-api-keys", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "initialOpen": false, + "autogenerate_tags": "userGuide+apiKey", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage API Key features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Publishable API Keys", + "path": "https://docs.medusajs.com/user-guide/settings/developer/publishable-api-keys", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Secret API Keys", + "path": "https://docs.medusajs.com/user-guide/settings/developer/secret-api-keys", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the API Key Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/api-key/workflows", "title": "Workflows", - "autogenerate_tags": "workflow+apiKey", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+apiKey", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createApiKeysWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createApiKeysWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteApiKeysWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteApiKeysWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "revokeApiKeysWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/revokeApiKeysWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateApiKeysWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateApiKeysWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+apiKey", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createApiKeysStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createApiKeysStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteApiKeysStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteApiKeysStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "revokeApiKeysStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/revokeApiKeysStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateApiKeysStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateApiKeysStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/api-key/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+apiKey", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the API Key Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "apiKey", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/apiKey", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/api-key/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "api-key-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "API Key Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "hasTitleStyling": true, + "autogenerate_path": "/references/api_key/IApiKeyModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/authenticate", + "title": "authenticate", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/createApiKeys", + "title": "createApiKeys", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/deleteApiKeys", + "title": "deleteApiKeys", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/listAndCountApiKeys", + "title": "listAndCountApiKeys", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/listApiKeys", + "title": "listApiKeys", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/retrieveApiKey", + "title": "retrieveApiKey", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/revoke", + "title": "revoke", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/updateApiKeys", + "title": "updateApiKeys", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/upsertApiKeys", + "title": "upsertApiKeys", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "api-key-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "API Key Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "hasTitleStyling": true, + "autogenerate_path": "/references/api_key_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/api-key/models/ApiKey", + "title": "ApiKey", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "auth", + "title": "Auth Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/module-options", + "title": "Module Options", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/auth-identity-and-actor-types", + "title": "Identity and Actor Types", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/auth-providers", + "title": "Auth Providers", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/auth-flows", + "title": "Auth Flow with Module", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/authentication-route", + "title": "Auth Flow with Routes", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+auth", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Auth Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/create-actor-type", + "title": "Create an Actor Type", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/provider", + "title": "Create Auth Provider Module", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/reset-password", + "title": "Handle Password Reset Event", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+auth,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Auth Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Log-out Customer in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/log-out", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Login Customer in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/login", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Register Customer in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/register", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Reset Customer Password in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/reset-password", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve Logged-In Customer in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/retrieve", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Third-Party or Social Login in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/third-party-login", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+auth", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Auth features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Reset Password", + "path": "https://docs.medusajs.com/user-guide/reset-password", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Providers", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/auth-providers/emailpass", + "title": "Emailpass Provider", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/auth-providers/google", + "title": "Google Provider", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/auth-providers/github", + "title": "GitHub Provider", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Auth Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+auth", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "acceptInviteWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/acceptInviteWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCustomerAccountWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomerAccountWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createUserAccountWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createUserAccountWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeCustomerAccountWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeCustomerAccountWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeUserAccountWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeUserAccountWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+auth", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "setAuthAppMetadataStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setAuthAppMetadataStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "autogenerate_tags": "jsSdk+auth", "autogenerate_as_ref": true, "sort_sidebar": "alphabetize", "children": [ @@ -380,32 +965,56 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "ref", - "title": "createApiKeysWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createApiKeysWorkflow", + "title": "callback", + "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/callback", "children": [] }, { "loaded": true, "isPathHref": true, "type": "ref", - "title": "deleteApiKeysWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteApiKeysWorkflow", + "title": "login", + "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/login", "children": [] }, { "loaded": true, "isPathHref": true, "type": "ref", - "title": "revokeApiKeysWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/revokeApiKeysWorkflow", + "title": "logout", + "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/logout", "children": [] }, { "loaded": true, "isPathHref": true, "type": "ref", - "title": "updateApiKeysWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateApiKeysWorkflow", + "title": "refresh", + "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/refresh", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "register", + "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/register", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "resetPassword", + "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/resetPassword", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProvider", + "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/updateProvider", "children": [] } ] @@ -413,213 +1022,16006 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+apiKey", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", + "type": "link", + "path": "/commerce-modules/auth/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/auth/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "auth-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Auth Module's Main Service Reference", "children": [ { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "createApiKeysStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createApiKeysStep", + "type": "link", + "path": "/references/auth", + "title": "Reference Overview", "children": [] }, + { + "type": "separator" + }, { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "deleteApiKeysStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteApiKeysStep", + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/auth/IAuthModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/authenticate", + "title": "authenticate", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/createAuthIdentities", + "title": "createAuthIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/createProviderIdentities", + "title": "createProviderIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/deleteAuthIdentities", + "title": "deleteAuthIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/deleteProviderIdentities", + "title": "deleteProviderIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/listAndCountAuthIdentities", + "title": "listAndCountAuthIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/listAuthIdentities", + "title": "listAuthIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/listProviderIdentities", + "title": "listProviderIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/register", + "title": "register", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/retrieveAuthIdentity", + "title": "retrieveAuthIdentity", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/retrieveProviderIdentity", + "title": "retrieveProviderIdentity", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/updateAuthIdentities", + "title": "updateAuthIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/updateProvider", + "title": "updateProvider", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/updateProviderIdentities", + "title": "updateProviderIdentities", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/validateCallback", + "title": "validateCallback", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "auth-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Auth Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/models", + "title": "Reference Overview", "children": [] }, + { + "type": "separator" + }, { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "revokeApiKeysStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/revokeApiKeysStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateApiKeysStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateApiKeysStep", - "children": [] + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/auth_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/models/AuthIdentity", + "title": "AuthIdentity", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/auth/models/ProviderIdentity", + "title": "ProviderIdentity", + "description": "", + "children": [] + } + ] } ] } ] - }, + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "cart", + "title": "Cart Module", + "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/api-key/js-sdk", - "title": "JS SDK", - "hideChildren": true, + "path": "/commerce-modules/cart", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, "children": [ { "loaded": true, "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+apiKey", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the API Key Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "apiKey", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/apiKey", - "children": [] - } - ] + "type": "link", + "path": "/commerce-modules/cart/concepts", + "title": "Cart Concepts", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/cart/promotions", + "title": "Promotion Adjustments", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/cart/tax-lines", + "title": "Tax Lines", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/cart/links-to-other-modules", + "title": "Links to Other Modules", + "children": [] } ] }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+cart", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Cart Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/cart/extend", + "title": "Extend Module", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Custom Line Item Pricing in Medusa", + "path": "https://docs.medusajs.com/resources/examples/guides/custom-item-price", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+cart,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Cart Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 1: Enter Email", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/email", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 2: Set Address", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/address", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 3: Choose Shipping Method", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/shipping", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 4: Choose Payment Provider", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/payment", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 5: Complete Cart", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Create Cart Context in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/cart/context", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Create Cart in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/cart/create", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Express Checkout with Medusa", + "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Cart's Items in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/cart/manage-items", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Payment with Stripe in React Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/payment/stripe", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve Cart in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/cart/retrieve", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Update Cart in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/cart/update", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Cart Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/cart/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+cart", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addShippingMethodToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshCartItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshCartShippingMethodsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartShippingMethodsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "transferCartCustomerWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartPromotionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartPromotionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateLineItemInCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateTaxLinesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateTaxLinesWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+cart", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addShippingMethodToCartStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/addShippingMethodToCartStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCartsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createLineItemAdjustmentsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createLineItemAdjustmentsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createLineItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createLineItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShippingMethodAdjustmentsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createShippingMethodAdjustmentsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteLineItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteLineItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "getLineItemActionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getLineItemActionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeLineItemAdjustmentsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeLineItemAdjustmentsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeShippingMethodAdjustmentsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeShippingMethodAdjustmentsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeShippingMethodFromCartStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeShippingMethodFromCartStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "setTaxLinesForItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setTaxLinesForItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCartsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateLineItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateLineItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateLineItemsStepWithSelector", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateLineItemsStepWithSelector", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateShippingMethodsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateShippingMethodsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/cart/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Store", + "autogenerate_tags": "jsSdk+storefront+cart", + "description": "The following methods or properties are used to send requests to Store API Routes related to the Cart Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cart", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/cart", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/cart/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "cart-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Cart Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/cart/ICartModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/addLineItemAdjustments", + "title": "addLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/addLineItemTaxLines", + "title": "addLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/addLineItems", + "title": "addLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/addShippingMethodAdjustments", + "title": "addShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/addShippingMethodTaxLines", + "title": "addShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/addShippingMethods", + "title": "addShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/createAddresses", + "title": "createAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/createCarts", + "title": "createCarts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/deleteAddresses", + "title": "deleteAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/deleteCarts", + "title": "deleteCarts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/deleteLineItemAdjustments", + "title": "deleteLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/deleteLineItemTaxLines", + "title": "deleteLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/deleteLineItems", + "title": "deleteLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/deleteShippingMethodAdjustments", + "title": "deleteShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/deleteShippingMethodTaxLines", + "title": "deleteShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/deleteShippingMethods", + "title": "deleteShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listAddresses", + "title": "listAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listAndCountCarts", + "title": "listAndCountCarts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listCarts", + "title": "listCarts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listLineItemAdjustments", + "title": "listLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listLineItemTaxLines", + "title": "listLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listLineItems", + "title": "listLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listShippingMethodAdjustments", + "title": "listShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listShippingMethodTaxLines", + "title": "listShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/listShippingMethods", + "title": "listShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/restoreAddresses", + "title": "restoreAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/restoreCarts", + "title": "restoreCarts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/restoreLineItemAdjustments", + "title": "restoreLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/restoreLineItemTaxLines", + "title": "restoreLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/restoreLineItems", + "title": "restoreLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/restoreShippingMethodAdjustments", + "title": "restoreShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/restoreShippingMethodTaxLines", + "title": "restoreShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/restoreShippingMethods", + "title": "restoreShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/retrieveCart", + "title": "retrieveCart", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/retrieveLineItem", + "title": "retrieveLineItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/setLineItemAdjustments", + "title": "setLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/setLineItemTaxLines", + "title": "setLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/setShippingMethodAdjustments", + "title": "setShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/setShippingMethodTaxLines", + "title": "setShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/softDeleteAddresses", + "title": "softDeleteAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/softDeleteCarts", + "title": "softDeleteCarts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/softDeleteLineItemAdjustments", + "title": "softDeleteLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/softDeleteLineItemTaxLines", + "title": "softDeleteLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/softDeleteLineItems", + "title": "softDeleteLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/softDeleteShippingMethodAdjustments", + "title": "softDeleteShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/softDeleteShippingMethodTaxLines", + "title": "softDeleteShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/softDeleteShippingMethods", + "title": "softDeleteShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/updateAddresses", + "title": "updateAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/updateCarts", + "title": "updateCarts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/updateLineItems", + "title": "updateLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/updateShippingMethods", + "title": "updateShippingMethods", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "cart-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Cart Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/cart_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/Address", + "title": "Address", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/Cart", + "title": "Cart", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/CreditLine", + "title": "CreditLine", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/LineItem", + "title": "LineItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/LineItemAdjustment", + "title": "LineItemAdjustment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/LineItemTaxLine", + "title": "LineItemTaxLine", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/ShippingMethod", + "title": "ShippingMethod", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/ShippingMethodAdjustment", + "title": "ShippingMethodAdjustment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/cart/models/ShippingMethodTaxLine", + "title": "ShippingMethodTaxLine", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "currency", + "title": "Currency Module", + "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/api-key/admin-widget-zones", - "title": "Admin Widget Zones", + "path": "/commerce-modules/currency", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/currency/links-to-other-modules", + "title": "Link to Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+currency", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Currency features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Store", + "path": "https://docs.medusajs.com/user-guide/settings/store", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Currency Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/currency/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+currency", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Currency Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "currency", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/currency", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "currency-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Currency Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/currency", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/currency/ICurrencyModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/currency/listAndCountCurrencies", + "title": "listAndCountCurrencies", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/currency/listCurrencies", + "title": "listCurrencies", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/currency/retrieveCurrency", + "title": "retrieveCurrency", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "currency-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Currency Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/currency/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/currency_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/currency/models/Currency", + "title": "Currency", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "customer", + "title": "Customer Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/customer", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/customer/customer-accounts", + "title": "Customer Accounts", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/customer/links-to-other-modules", + "title": "Link to Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+customer", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Customer Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/customer/extend", + "title": "Extend Module", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+customer,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Customer Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Customer Context in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/context", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Edit Customer Profile in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/profile", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Log-out Customer in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/log-out", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Login Customer in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/login", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Customer Addresses in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/addresses", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Register Customer in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/register", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Reset Customer Password in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/reset-password", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve Logged-In Customer in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/retrieve", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Third-Party or Social Login in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/customers/third-party-login", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+customer", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Customer features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Customers Overview", + "path": "https://docs.medusajs.com/user-guide/customers", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Customer Groups", + "path": "https://docs.medusajs.com/user-guide/customers/groups", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Customers", + "path": "https://docs.medusajs.com/user-guide/customers/manage", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Customer Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/customer/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+customer", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addOrderLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCustomerAccountWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomerAccountWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCustomerAddressesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomerAddressesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCustomerGroupsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomerGroupsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCustomersWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomersWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCustomerAddressesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCustomerAddressesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCustomerGroupsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCustomerGroupsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCustomersWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCustomersWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "linkCustomerGroupsToCustomerWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/linkCustomerGroupsToCustomerWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "linkCustomersToCustomerGroupWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/linkCustomersToCustomerGroupWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEditAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderExchangeAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeCustomerAccountWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeCustomerAccountWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCustomerAddressesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCustomerAddressesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCustomerGroupsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCustomerGroupsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCustomersWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCustomersWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+customer", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCustomerAddressesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCustomerAddressesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCustomerGroupsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCustomerGroupsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCustomersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCustomersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCustomerAddressesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCustomerAddressesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCustomerGroupStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCustomerGroupStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCustomersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCustomersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "findOrCreateCustomerStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findOrCreateCustomerStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "linkCustomerGroupsToCustomerStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/linkCustomerGroupsToCustomerStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "linkCustomersToCustomerGroupStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/linkCustomersToCustomerGroupStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "maybeUnsetDefaultBillingAddressesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/maybeUnsetDefaultBillingAddressesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "maybeUnsetDefaultShippingAddressesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/maybeUnsetDefaultShippingAddressesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCustomerAddressesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCustomerAddressesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCustomerGroupsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCustomerGroupsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCustomersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCustomersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validateCustomerAccountCreation", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateCustomerAccountCreation", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/customer/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Store", + "autogenerate_tags": "jsSdk+storefront+customer", + "description": "The following methods or properties are used to send requests to Store API Routes related to the Customer Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "customer", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/customer", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+customer", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Customer Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "customer", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/customer", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "customerGroup", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/customerGroup", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/customer/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/customer/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "customer-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Customer Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/customer/ICustomerModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/addCustomerToGroup", + "title": "addCustomerToGroup", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/createCustomerAddresses", + "title": "createCustomerAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/createCustomerGroups", + "title": "createCustomerGroups", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/createCustomers", + "title": "createCustomers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/deleteCustomerAddresses", + "title": "deleteCustomerAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/deleteCustomerGroups", + "title": "deleteCustomerGroups", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/deleteCustomers", + "title": "deleteCustomers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/listAndCountCustomerAddresses", + "title": "listAndCountCustomerAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/listAndCountCustomerGroups", + "title": "listAndCountCustomerGroups", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/listAndCountCustomers", + "title": "listAndCountCustomers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/listCustomerAddresses", + "title": "listCustomerAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/listCustomerGroupCustomers", + "title": "listCustomerGroupCustomers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/listCustomerGroups", + "title": "listCustomerGroups", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/listCustomers", + "title": "listCustomers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/removeCustomerFromGroup", + "title": "removeCustomerFromGroup", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/restoreCustomerGroups", + "title": "restoreCustomerGroups", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/restoreCustomers", + "title": "restoreCustomers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/retrieveCustomer", + "title": "retrieveCustomer", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/retrieveCustomerGroup", + "title": "retrieveCustomerGroup", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/softDeleteCustomerGroups", + "title": "softDeleteCustomerGroups", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/softDeleteCustomers", + "title": "softDeleteCustomers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/updateCustomerAddresses", + "title": "updateCustomerAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/updateCustomerGroups", + "title": "updateCustomerGroups", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/updateCustomers", + "title": "updateCustomers", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "customer-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Customer Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/customer_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/models/Customer", + "title": "Customer", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/models/CustomerAddress", + "title": "CustomerAddress", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/models/CustomerGroup", + "title": "CustomerGroup", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/customer/models/CustomerGroupCustomer", + "title": "CustomerGroupCustomer", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "fulfillment", + "title": "Fulfillment Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment", + "title": "Overview", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/api-key", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "API Key Module's Main Service Reference", + "path": "/commerce-modules/fulfillment/module-options", + "title": "Module Options", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "autogenerate_tags": "concept+fulfillment", + "autogenerate_as_ref": true, "children": [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Methods", - "hasTitleStyling": true, - "autogenerate_path": "/references/api_key/IApiKeyModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/authenticate", - "title": "authenticate", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/createApiKeys", - "title": "createApiKeys", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/deleteApiKeys", - "title": "deleteApiKeys", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/listAndCountApiKeys", - "title": "listAndCountApiKeys", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/listApiKeys", - "title": "listApiKeys", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/retrieveApiKey", - "title": "retrieveApiKey", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/revoke", - "title": "revoke", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/updateApiKeys", - "title": "updateApiKeys", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/api-key/upsertApiKeys", - "title": "upsertApiKeys", - "description": "", - "children": [] - } - ] + "type": "link", + "path": "/commerce-modules/fulfillment/concepts", + "title": "Fulfillment Concepts", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment/fulfillment-provider", + "title": "Fulfillment Provider", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment/shipping-option", + "title": "Shipping Option", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment/item-fulfillment", + "title": "Item Fulfillment", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment/links-to-other-modules", + "title": "Links to Other Modules", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Product Shipping Requirement", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/selling-products", + "children": [] } ] }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/references/api-key/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "API Key Module Data Models Reference", + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+fulfillment", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Fulfillment Module in your customizations on the Medusa application server.", "children": [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Data Models", - "hasTitleStyling": true, - "autogenerate_path": "/references/api_key_models/variables", + "type": "link", + "path": "/references/fulfillment/provider", + "title": "Create Fulfillment Provider Module", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "path": "/integrations/guides/shipstation", + "title": "Integrate ShipStation", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+fulfillment,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Fulfillment Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 3: Choose Shipping Method", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/shipping", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Express Checkout with Medusa", + "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+fulfillment", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Fulfillment features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Locations & Shipping Overview", + "path": "https://docs.medusajs.com/user-guide/settings/locations-and-shipping", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Order Fulfillments", + "path": "https://docs.medusajs.com/user-guide/orders/fulfillments", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Shipping Profiles", + "path": "https://docs.medusajs.com/user-guide/settings/locations-and-shipping/shipping-profiles", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Fulfillment Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+fulfillment", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addShippingMethodToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchShippingOptionRulesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchShippingOptionRulesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "calculateShippingOptionsPricesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/calculateShippingOptionsPricesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmClaimRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmClaimRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmExchangeRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmExchangeRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmReturnRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createAndCompleteReturnOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createAndCompleteReturnOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createLocationFulfillmentSetWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createLocationFulfillmentSetWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderShipmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderShipmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReturnFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReturnFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createServiceZonesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createServiceZonesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShipmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShipmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShippingOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShippingOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShippingProfilesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShippingProfilesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteFulfillmentSetsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteFulfillmentSetsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteServiceZonesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteServiceZonesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteShippingOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteShippingOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteShippingProfileWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteShippingProfileWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "importProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/importProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "listShippingOptionsForCartWithPricingWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/listShippingOptionsForCartWithPricingWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "markFulfillmentAsDeliveredWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/markFulfillmentAsDeliveredWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "markOrderFulfillmentAsDeliveredWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshCartItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshCartShippingMethodsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartShippingMethodsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "transferCartCustomerWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateLineItemInCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateServiceZonesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateServiceZonesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateShippingOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateShippingOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateShippingProfilesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateShippingProfilesWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+fulfillment", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "calculateShippingOptionsPricesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/calculateShippingOptionsPricesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelFulfillmentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelFulfillmentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createFulfillmentSets", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createFulfillmentSets", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createFulfillmentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createFulfillmentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReturnFulfillmentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createReturnFulfillmentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createServiceZonesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createServiceZonesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShippingOptionRulesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createShippingOptionRulesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShippingProfilesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createShippingProfilesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteFulfillmentSetsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteFulfillmentSetsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteServiceZonesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteServiceZonesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteShippingOptionRulesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteShippingOptionRulesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteShippingOptionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteShippingOptionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteShippingProfilesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteShippingProfilesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "parseProductCsvStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/parseProductCsvStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateFulfillmentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateFulfillmentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateServiceZonesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateServiceZonesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateShippingOptionRulesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateShippingOptionRulesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateShippingProfilesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateShippingProfilesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "upsertShippingOptionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/upsertShippingOptionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validateAndReturnShippingMethodsDataStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateAndReturnShippingMethodsDataStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validateCartShippingOptionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateCartShippingOptionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validateShipmentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateShipmentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validateShippingOptionPricesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateShippingOptionPricesStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Store", + "autogenerate_tags": "jsSdk+storefront+fulfillment", + "description": "The following methods or properties are used to send requests to Store API Routes related to the Fulfillment Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "fulfillment", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/fulfillment", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+fulfillment", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Fulfillment Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "fulfillment", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/fulfillment", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "fulfillmentProvider", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/fulfillmentProvider", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "fulfillmentSet", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/fulfillmentSet", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "shippingOption", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/shippingOption", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "shippingProfile", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/shippingProfile", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/fulfillment/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "fulfillment-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Fulfillment Module's Main Service Reference", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/api-key/models/ApiKey", - "title": "ApiKey", - "description": "", + "path": "/references/fulfillment", + "title": "Reference Overview", "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/fulfillment/IFulfillmentModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/calculateShippingOptionsPrices", + "title": "calculateShippingOptionsPrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/cancelFulfillment", + "title": "cancelFulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/createFulfillment", + "title": "createFulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/createFulfillmentSets", + "title": "createFulfillmentSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/createGeoZones", + "title": "createGeoZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/createReturnFulfillment", + "title": "createReturnFulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/createServiceZones", + "title": "createServiceZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/createShippingOptionRules", + "title": "createShippingOptionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/createShippingOptions", + "title": "createShippingOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/createShippingProfiles", + "title": "createShippingProfiles", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/deleteFulfillment", + "title": "deleteFulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/deleteFulfillmentSets", + "title": "deleteFulfillmentSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/deleteGeoZones", + "title": "deleteGeoZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/deleteServiceZones", + "title": "deleteServiceZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/deleteShippingOptionRules", + "title": "deleteShippingOptionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/deleteShippingOptionTypes", + "title": "deleteShippingOptionTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/deleteShippingOptions", + "title": "deleteShippingOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/deleteShippingProfiles", + "title": "deleteShippingProfiles", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listAndCountFulfillmentSets", + "title": "listAndCountFulfillmentSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listAndCountFulfillments", + "title": "listAndCountFulfillments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listAndCountGeoZones", + "title": "listAndCountGeoZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listAndCountServiceZones", + "title": "listAndCountServiceZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listAndCountShippingOptionRules", + "title": "listAndCountShippingOptionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listAndCountShippingOptionTypes", + "title": "listAndCountShippingOptionTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listAndCountShippingOptions", + "title": "listAndCountShippingOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listAndCountShippingProfiles", + "title": "listAndCountShippingProfiles", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listFulfillmentProviders", + "title": "listFulfillmentProviders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listFulfillmentSets", + "title": "listFulfillmentSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listFulfillments", + "title": "listFulfillments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listGeoZones", + "title": "listGeoZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listServiceZones", + "title": "listServiceZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listShippingOptionRules", + "title": "listShippingOptionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listShippingOptionTypes", + "title": "listShippingOptionTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listShippingOptions", + "title": "listShippingOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listShippingOptionsForContext", + "title": "listShippingOptionsForContext", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/listShippingProfiles", + "title": "listShippingProfiles", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/restoreFulfillmentSets", + "title": "restoreFulfillmentSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/restoreGeoZones", + "title": "restoreGeoZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/restoreServiceZones", + "title": "restoreServiceZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/restoreShippingOptions", + "title": "restoreShippingOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/restoreShippingProfiles", + "title": "restoreShippingProfiles", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveFulfillment", + "title": "retrieveFulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveFulfillmentOptions", + "title": "retrieveFulfillmentOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveFulfillmentSet", + "title": "retrieveFulfillmentSet", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveGeoZone", + "title": "retrieveGeoZone", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveServiceZone", + "title": "retrieveServiceZone", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveShippingOption", + "title": "retrieveShippingOption", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveShippingOptionRule", + "title": "retrieveShippingOptionRule", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveShippingOptionType", + "title": "retrieveShippingOptionType", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/retrieveShippingProfile", + "title": "retrieveShippingProfile", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/softDeleteFulfillmentSets", + "title": "softDeleteFulfillmentSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/softDeleteGeoZones", + "title": "softDeleteGeoZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/softDeleteServiceZones", + "title": "softDeleteServiceZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/softDeleteShippingOptions", + "title": "softDeleteShippingOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/softDeleteShippingProfiles", + "title": "softDeleteShippingProfiles", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/updateFulfillment", + "title": "updateFulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/updateFulfillmentSets", + "title": "updateFulfillmentSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/updateGeoZones", + "title": "updateGeoZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/updateServiceZones", + "title": "updateServiceZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/updateShippingOptionRules", + "title": "updateShippingOptionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/updateShippingOptions", + "title": "updateShippingOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/updateShippingProfiles", + "title": "updateShippingProfiles", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/upsertServiceZones", + "title": "upsertServiceZones", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/upsertShippingOptions", + "title": "upsertShippingOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/upsertShippingProfiles", + "title": "upsertShippingProfiles", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/validateFulfillmentData", + "title": "validateFulfillmentData", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/validateFulfillmentOption", + "title": "validateFulfillmentOption", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/validateShippingOption", + "title": "validateShippingOption", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/validateShippingOptionsForPriceCalculation", + "title": "validateShippingOptionsForPriceCalculation", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "fulfillment-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Fulfillment Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "hasTitleStyling": true, + "autogenerate_path": "/references/fulfillment_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/Fulfillment", + "title": "Fulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/FulfillmentAddress", + "title": "FulfillmentAddress", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/FulfillmentItem", + "title": "FulfillmentItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/FulfillmentLabel", + "title": "FulfillmentLabel", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/FulfillmentProvider", + "title": "FulfillmentProvider", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/FulfillmentSet", + "title": "FulfillmentSet", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/GeoZone", + "title": "GeoZone", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/ServiceZone", + "title": "ServiceZone", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/ShippingOption", + "title": "ShippingOption", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/ShippingOptionRule", + "title": "ShippingOptionRule", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/ShippingOptionType", + "title": "ShippingOptionType", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/fulfillment/models/ShippingProfile", + "title": "ShippingProfile", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "inventory", + "title": "Inventory Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/inventory", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "autogenerate_tags": "concept+inventory", + "autogenerate_as_ref": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/inventory/concepts", + "title": "Inventory Concepts", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/inventory/inventory-in-flows", + "title": "Inventory in Flows", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/inventory/inventory-kit", + "title": "Inventory Kit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/inventory/links-to-other-modules", + "title": "Links to Modules", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Inventory Kits", + "path": "https://docs.medusajs.com/resources/commerce-modules/inventory/inventory-kit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Product Variant Inventory", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/variant-inventory", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+inventory,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Inventory Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve Product Variant's Inventory in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/inventory", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+inventory", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Inventory features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Inventory Overview", + "path": "https://docs.medusajs.com/user-guide/inventory", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Inventory Items", + "path": "https://docs.medusajs.com/user-guide/inventory/inventory", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Reservations", + "path": "https://docs.medusajs.com/user-guide/inventory/reservations", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Inventory Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/inventory/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+inventory", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addOrderLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchInventoryItemLevelsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchInventoryItemLevelsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "bulkCreateDeleteLevelsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/bulkCreateDeleteLevelsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderClaimWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderClaimWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderExchangeWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderExchangeWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmClaimRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmClaimRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmExchangeRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmExchangeRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmOrderEditRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmOrderEditRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmReturnReceiveWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnReceiveWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmVariantInventoryWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmVariantInventoryWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createInventoryItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createInventoryItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createInventoryLevelsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createInventoryLevelsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReservationsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReservationsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteInventoryItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteInventoryItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteReservationsByLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteReservationsByLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteReservationsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteReservationsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEditAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderExchangeAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateInventoryItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateInventoryItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateInventoryLevelsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateInventoryLevelsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateLineItemInCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateReservationsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReservationsWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+inventory", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "adjustInventoryLevelsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/adjustInventoryLevelsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmInventoryStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/confirmInventoryStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createInventoryItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createInventoryItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createInventoryLevelsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createInventoryLevelsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReservationsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createReservationsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteInventoryItemStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteInventoryItemStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteReservationsByLineItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteReservationsByLineItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteReservationsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteReservationsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "reserveInventoryStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/reserveInventoryStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateInventoryItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateInventoryItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateInventoryLevelsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateInventoryLevelsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateReservationsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateReservationsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/inventory/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+inventory", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Inventory Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "inventoryItem", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/inventoryItem", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "reservation", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/reservation", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/inventory/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "inventory-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Inventory Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/inventory_next/IInventoryService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/adjustInventory", + "title": "adjustInventory", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/confirmInventory", + "title": "confirmInventory", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/createInventoryItems", + "title": "createInventoryItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/createInventoryLevels", + "title": "createInventoryLevels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/createReservationItems", + "title": "createReservationItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/deleteInventoryItemLevelByLocationId", + "title": "deleteInventoryItemLevelByLocationId", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/deleteInventoryItems", + "title": "deleteInventoryItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/deleteInventoryLevel", + "title": "deleteInventoryLevel", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/deleteInventoryLevels", + "title": "deleteInventoryLevels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/deleteReservationItemByLocationId", + "title": "deleteReservationItemByLocationId", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/deleteReservationItems", + "title": "deleteReservationItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/deleteReservationItemsByLineItem", + "title": "deleteReservationItemsByLineItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/listAndCountInventoryItems", + "title": "listAndCountInventoryItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/listAndCountInventoryLevels", + "title": "listAndCountInventoryLevels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/listAndCountReservationItems", + "title": "listAndCountReservationItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/listInventoryItems", + "title": "listInventoryItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/listInventoryLevels", + "title": "listInventoryLevels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/listReservationItems", + "title": "listReservationItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/restoreInventoryItems", + "title": "restoreInventoryItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/restoreInventoryLevels", + "title": "restoreInventoryLevels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/restoreReservationItems", + "title": "restoreReservationItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/restoreReservationItemsByLineItem", + "title": "restoreReservationItemsByLineItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/retrieveAvailableQuantity", + "title": "retrieveAvailableQuantity", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/retrieveInventoryItem", + "title": "retrieveInventoryItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/retrieveInventoryLevel", + "title": "retrieveInventoryLevel", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/retrieveInventoryLevelByItemAndLocation", + "title": "retrieveInventoryLevelByItemAndLocation", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/retrieveReservationItem", + "title": "retrieveReservationItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/retrieveReservedQuantity", + "title": "retrieveReservedQuantity", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/retrieveStockedQuantity", + "title": "retrieveStockedQuantity", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/softDeleteInventoryItems", + "title": "softDeleteInventoryItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/softDeleteInventoryLevels", + "title": "softDeleteInventoryLevels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/softDeleteReservationItems", + "title": "softDeleteReservationItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/updateInventoryItems", + "title": "updateInventoryItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/updateInventoryLevels", + "title": "updateInventoryLevels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/updateReservationItems", + "title": "updateReservationItems", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "inventory-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Inventory Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/inventory_next_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/models/InventoryItem", + "title": "InventoryItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/models/InventoryLevel", + "title": "InventoryLevel", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/inventory-next/models/ReservationItem", + "title": "ReservationItem", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "order", + "title": "Order Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/concepts", + "title": "Order Concepts", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/promotion-adjustments", + "title": "Promotions Adjustments", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/tax-lines", + "title": "Tax Lines", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/transactions", + "title": "Transactions", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/order-versioning", + "title": "Order Versioning", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/return", + "title": "Return", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/exchange", + "title": "Exchange", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/claim", + "title": "Claim", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/edit", + "title": "Order Edit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/order-change", + "title": "Order Change", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/links-to-other-modules", + "title": "Links to Other Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+order,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Order Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 5: Complete Cart", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Express Checkout with Medusa", + "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+order", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Order features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Edit Order Items", + "path": "https://docs.medusajs.com/user-guide/orders/edit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Order Claims", + "path": "https://docs.medusajs.com/user-guide/orders/claims", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Order Details", + "path": "https://docs.medusajs.com/user-guide/orders/manage", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Order Exchanges", + "path": "https://docs.medusajs.com/user-guide/orders/exchanges", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Order Fulfillments", + "path": "https://docs.medusajs.com/user-guide/orders/fulfillments", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Order Payments", + "path": "https://docs.medusajs.com/user-guide/orders/payments", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Order Returns", + "path": "https://docs.medusajs.com/user-guide/orders/returns", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Return Reasons", + "path": "https://docs.medusajs.com/user-guide/settings/return-reasons", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Orders Overview", + "path": "https://docs.medusajs.com/user-guide/orders", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Order Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+order", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "acceptOrderTransferWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/acceptOrderTransferWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addOrderLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "archiveOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/archiveOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "beginClaimOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginClaimOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "beginExchangeOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginExchangeOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "beginOrderEditOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginOrderEditOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "beginReceiveReturnWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginReceiveReturnWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "beginReturnOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginReturnOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelBeginOrderClaimWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelBeginOrderClaimWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelBeginOrderEditWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelBeginOrderEditWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelBeginOrderExchangeWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelBeginOrderExchangeWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderChangeWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderChangeWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderClaimWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderClaimWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderExchangeWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderExchangeWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderTransferRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderTransferRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelReturnReceiveWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelReturnReceiveWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelReturnRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelReturnRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelReturnWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelReturnWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "capturePaymentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/capturePaymentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmClaimRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmClaimRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmExchangeRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmExchangeRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmOrderEditRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmOrderEditRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmReturnReceiveWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnReceiveWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmReturnRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createAndCompleteReturnOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createAndCompleteReturnOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createClaimShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createClaimShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createExchangeShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createExchangeShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderChangeWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderChangeWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderEditShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderEditShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderFulfillmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderFulfillmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderShipmentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderShipmentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReturnReasonsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReturnReasonsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReturnShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReturnShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "declineOrderChangeWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/declineOrderChangeWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "declineOrderTransferRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/declineOrderTransferRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteOrderChangeActionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteOrderChangeActionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteOrderChangeWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteOrderChangeWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteReturnReasonsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteReturnReasonsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "dismissItemReturnRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/dismissItemReturnRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "markPaymentCollectionAsPaid", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/markPaymentCollectionAsPaid", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimRequestItemReturnWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimRequestItemReturnWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEditAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEditUpdateItemQuantityWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditUpdateItemQuantityWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderExchangeAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderExchangeRequestItemReturnWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeRequestItemReturnWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "processPaymentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/processPaymentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "receiveItemReturnRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/receiveItemReturnRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refundPaymentsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refundPaymentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeAddItemClaimActionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeAddItemClaimActionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeClaimShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeClaimShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeExchangeShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeExchangeShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeItemClaimActionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemClaimActionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeItemExchangeActionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemExchangeActionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeItemOrderEditActionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemOrderEditActionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeItemReceiveReturnActionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemReceiveReturnActionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeItemReturnActionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemReturnActionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeOrderEditShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeOrderEditShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeReturnShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeReturnShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "requestItemReturnWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/requestItemReturnWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "requestOrderEditRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/requestOrderEditRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "requestOrderTransferWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/requestOrderTransferWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateClaimAddItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateClaimAddItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateClaimItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateClaimItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateClaimShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateClaimShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateExchangeAddItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateExchangeAddItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateExchangeShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateExchangeShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderChangeActionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderChangeActionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderChangesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderChangesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderEditAddItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderEditAddItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderEditItemQuantityWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderEditItemQuantityWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderEditShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderEditShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderTaxLinesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderTaxLinesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateReceiveItemReturnRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReceiveItemReturnRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateRequestItemReturnWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRequestItemReturnWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateReturnReasonsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReturnReasonsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateReturnShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReturnShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateReturnWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReturnWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+order", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addOrderTransactionStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/addOrderTransactionStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "archiveOrdersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/archiveOrdersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderChangeStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderChangeStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderClaimStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderClaimStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderExchangeStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderExchangeStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderFulfillmentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderFulfillmentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderReturnStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderReturnStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrdersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrdersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeOrdersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/completeOrdersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCompleteReturnStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCompleteReturnStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderChangeStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderChangeStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderClaimItemsFromActionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderClaimItemsFromActionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderClaimsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderClaimsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderExchangeItemsFromActionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderExchangeItemsFromActionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderExchangesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderExchangesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderLineItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderLineItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrdersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrdersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReturnReasonsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createReturnReasonsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReturnsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createReturnsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "declineOrderChangeStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/declineOrderChangeStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteClaimsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteClaimsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteExchangesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteExchangesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteOrderChangeActionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteOrderChangeActionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteOrderChangesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteOrderChangesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteOrderShippingMethods", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteOrderShippingMethods", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteReturnReasonStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteReturnReasonStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteReturnsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteReturnsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "previewOrderChangeStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/previewOrderChangeStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "registerOrderChangesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/registerOrderChangesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "registerOrderFulfillmentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/registerOrderFulfillmentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "registerOrderShipmentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/registerOrderShipmentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "setOrderTaxLinesForItemsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setOrderTaxLinesForItemsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderChangeActionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateOrderChangeActionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderChangesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateOrderChangesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderShippingMethodsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateOrderShippingMethodsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrdersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateOrdersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateReturnReasonsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateReturnReasonsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Store", + "autogenerate_tags": "jsSdk+storefront+order", + "description": "The following methods or properties are used to send requests to Store API Routes related to the Order Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "order", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/order", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+order", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Order Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "claim", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/claim", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "draftOrder", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/draftOrder", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "exchange", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/exchange", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "order", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/order", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEdit", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/orderEdit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundReason", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/refundReason", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "return", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/return", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "returnReason", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/returnReason", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/order/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "order-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Order Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/order/IOrderModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/addOrderAction", + "title": "addOrderAction", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/addOrderTransactions", + "title": "addOrderTransactions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/applyPendingOrderActions", + "title": "applyPendingOrderActions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/archive", + "title": "archive", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/cancel", + "title": "cancel", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/cancelClaim", + "title": "cancelClaim", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/cancelExchange", + "title": "cancelExchange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/cancelFulfillment", + "title": "cancelFulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/cancelOrderChange", + "title": "cancelOrderChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/cancelReturn", + "title": "cancelReturn", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/completeOrder", + "title": "completeOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/confirmOrderChange", + "title": "confirmOrderChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createClaim", + "title": "createClaim", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createExchange", + "title": "createExchange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderAddresses", + "title": "createOrderAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderChange", + "title": "createOrderChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderClaimItems", + "title": "createOrderClaimItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderClaims", + "title": "createOrderClaims", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderCreditLines", + "title": "createOrderCreditLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderExchangeItems", + "title": "createOrderExchangeItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderExchanges", + "title": "createOrderExchanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderLineItemAdjustments", + "title": "createOrderLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderLineItemTaxLines", + "title": "createOrderLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderLineItems", + "title": "createOrderLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderShippingMethodAdjustments", + "title": "createOrderShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderShippingMethodTaxLines", + "title": "createOrderShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrderShippingMethods", + "title": "createOrderShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createOrders", + "title": "createOrders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createReturn", + "title": "createReturn", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createReturnItems", + "title": "createReturnItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createReturnReasons", + "title": "createReturnReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/createReturns", + "title": "createReturns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/declineOrderChange", + "title": "declineOrderChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderAddresses", + "title": "deleteOrderAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderChangeActions", + "title": "deleteOrderChangeActions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderChanges", + "title": "deleteOrderChanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderClaimItemImages", + "title": "deleteOrderClaimItemImages", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderClaimItems", + "title": "deleteOrderClaimItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderClaims", + "title": "deleteOrderClaims", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderExchangeItems", + "title": "deleteOrderExchangeItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderExchanges", + "title": "deleteOrderExchanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderLineItemAdjustments", + "title": "deleteOrderLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderLineItemTaxLines", + "title": "deleteOrderLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderLineItems", + "title": "deleteOrderLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderShippingMethodAdjustments", + "title": "deleteOrderShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderShippingMethodTaxLines", + "title": "deleteOrderShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderShippingMethods", + "title": "deleteOrderShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrderTransactions", + "title": "deleteOrderTransactions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteOrders", + "title": "deleteOrders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteReturnItems", + "title": "deleteReturnItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteReturnReasons", + "title": "deleteReturnReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/deleteReturns", + "title": "deleteReturns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listAndCountOrderClaims", + "title": "listAndCountOrderClaims", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listAndCountOrderExchanges", + "title": "listAndCountOrderExchanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listAndCountOrders", + "title": "listAndCountOrders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listAndCountReturns", + "title": "listAndCountReturns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderAddresses", + "title": "listOrderAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderChangeActions", + "title": "listOrderChangeActions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderChanges", + "title": "listOrderChanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderClaims", + "title": "listOrderClaims", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderExchanges", + "title": "listOrderExchanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderLineItemAdjustments", + "title": "listOrderLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderLineItemTaxLines", + "title": "listOrderLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderLineItems", + "title": "listOrderLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderShippingMethodAdjustments", + "title": "listOrderShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderShippingMethodTaxLines", + "title": "listOrderShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderShippingMethods", + "title": "listOrderShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrderTransactions", + "title": "listOrderTransactions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listOrders", + "title": "listOrders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listReturnReasons", + "title": "listReturnReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/listReturns", + "title": "listReturns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/previewOrderChange", + "title": "previewOrderChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/receiveReturn", + "title": "receiveReturn", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/registerDelivery", + "title": "registerDelivery", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/registerFulfillment", + "title": "registerFulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/registerOrderChange", + "title": "registerOrderChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/registerShipment", + "title": "registerShipment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderAddresses", + "title": "restoreOrderAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderChangeActions", + "title": "restoreOrderChangeActions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderChanges", + "title": "restoreOrderChanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderClaims", + "title": "restoreOrderClaims", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderExchanges", + "title": "restoreOrderExchanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderLineItemAdjustments", + "title": "restoreOrderLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderLineItemTaxLines", + "title": "restoreOrderLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderLineItems", + "title": "restoreOrderLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderShippingMethodAdjustments", + "title": "restoreOrderShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderShippingMethodTaxLines", + "title": "restoreOrderShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderShippingMethods", + "title": "restoreOrderShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrderTransactions", + "title": "restoreOrderTransactions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreOrders", + "title": "restoreOrders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreReturnReasons", + "title": "restoreReturnReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/restoreReturns", + "title": "restoreReturns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/retrieveOrder", + "title": "retrieveOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/retrieveOrderChange", + "title": "retrieveOrderChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/retrieveOrderChangeAction", + "title": "retrieveOrderChangeAction", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/retrieveOrderClaim", + "title": "retrieveOrderClaim", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/retrieveOrderExchange", + "title": "retrieveOrderExchange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/retrieveOrderLineItem", + "title": "retrieveOrderLineItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/retrieveReturn", + "title": "retrieveReturn", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/retrieveReturnReason", + "title": "retrieveReturnReason", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/revertLastVersion", + "title": "revertLastVersion", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/setOrderLineItemAdjustments", + "title": "setOrderLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/setOrderLineItemTaxLines", + "title": "setOrderLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/setOrderShippingMethodAdjustments", + "title": "setOrderShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/setOrderShippingMethodTaxLines", + "title": "setOrderShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderAddresses", + "title": "softDeleteOrderAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderChangeActions", + "title": "softDeleteOrderChangeActions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderChanges", + "title": "softDeleteOrderChanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderClaims", + "title": "softDeleteOrderClaims", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderExchanges", + "title": "softDeleteOrderExchanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderLineItemAdjustments", + "title": "softDeleteOrderLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderLineItemTaxLines", + "title": "softDeleteOrderLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderLineItems", + "title": "softDeleteOrderLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderShippingMethodAdjustments", + "title": "softDeleteOrderShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderShippingMethodTaxLines", + "title": "softDeleteOrderShippingMethodTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderShippingMethods", + "title": "softDeleteOrderShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrderTransactions", + "title": "softDeleteOrderTransactions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteOrders", + "title": "softDeleteOrders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteReturnReasons", + "title": "softDeleteReturnReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/softDeleteReturns", + "title": "softDeleteReturns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/undoLastChange", + "title": "undoLastChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrderAddresses", + "title": "updateOrderAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrderChangeActions", + "title": "updateOrderChangeActions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrderChanges", + "title": "updateOrderChanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrderClaims", + "title": "updateOrderClaims", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrderExchanges", + "title": "updateOrderExchanges", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrderItem", + "title": "updateOrderItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrderLineItems", + "title": "updateOrderLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrderShippingMethods", + "title": "updateOrderShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateOrders", + "title": "updateOrders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateReturnReasons", + "title": "updateReturnReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/updateReturns", + "title": "updateReturns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/upsertOrderLineItemAdjustments", + "title": "upsertOrderLineItemAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/upsertOrderLineItemTaxLines", + "title": "upsertOrderLineItemTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/upsertOrderShippingMethodAdjustments", + "title": "upsertOrderShippingMethodAdjustments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/upsertOrderShippingMethodTaxLines", + "title": "upsertOrderShippingMethodTaxLines", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "order-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Order Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "hasTitleStyling": true, + "autogenerate_path": "/references/order_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/Order", + "title": "Order", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderAddress", + "title": "OrderAddress", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderChange", + "title": "OrderChange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderChangeAction", + "title": "OrderChangeAction", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderClaim", + "title": "OrderClaim", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderClaimItem", + "title": "OrderClaimItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderClaimItemImage", + "title": "OrderClaimItemImage", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderCreditLine", + "title": "OrderCreditLine", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderExchange", + "title": "OrderExchange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderExchangeItem", + "title": "OrderExchangeItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderItem", + "title": "OrderItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderLineItem", + "title": "OrderLineItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderLineItemAdjustment", + "title": "OrderLineItemAdjustment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderLineItemTaxLine", + "title": "OrderLineItemTaxLine", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderShipping", + "title": "OrderShipping", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderShippingMethod", + "title": "OrderShippingMethod", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderShippingMethodAdjustment", + "title": "OrderShippingMethodAdjustment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderShippingMethodTaxLine", + "title": "OrderShippingMethodTaxLine", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderSummary", + "title": "OrderSummary", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/OrderTransaction", + "title": "OrderTransaction", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/Return", + "title": "Return", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/ReturnItem", + "title": "ReturnItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/order/models/ReturnReason", + "title": "ReturnReason", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "payment", + "title": "Payment Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/module-options", + "title": "Module Options", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/payment-collection", + "title": "Payment Collections", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/payment-session", + "title": "Payment Session", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/payment", + "title": "Payment", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/payment-provider", + "title": "Payment Provider Module", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/account-holder", + "title": "Account Holder", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/webhook-events", + "title": "Webhook Events", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/links-to-other-modules", + "title": "Links to Other Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+payment", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Payment Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/payment-flow", + "title": "Accept Payment Flow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/provider", + "title": "Create Payment Provider", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+payment,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Payment Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 4: Choose Payment Provider", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/payment", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Checkout Step 5: Complete Cart", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Customize the Stripe Integration in the Next.js Starter", + "path": "https://docs.medusajs.com/resources/nextjs-starter/guides/customize-stripe", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Express Checkout with Medusa", + "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Payment with Stripe in React Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/checkout/payment/stripe", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+payment", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Payment features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Order Payments", + "path": "https://docs.medusajs.com/user-guide/orders/payments", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Providers", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/payment-provider/stripe", + "title": "Stripe", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Payment Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+payment", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addShippingMethodToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "capturePaymentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/capturePaymentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmClaimRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmClaimRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmExchangeRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmExchangeRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmOrderEditRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmOrderEditRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "confirmReturnRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderPaymentCollectionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderPaymentCollectionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrUpdateOrderPaymentCollectionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrUpdateOrderPaymentCollectionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPaymentCollectionForCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPaymentCollectionForCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPaymentSessionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPaymentSessionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createRefundReasonsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createRefundReasonsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createRegionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePaymentSessionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePaymentSessionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteRefundReasonsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteRefundReasonsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "markPaymentCollectionAsPaid", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/markPaymentCollectionAsPaid", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "processPaymentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/processPaymentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshCartItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshPaymentCollectionForCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshPaymentCollectionForCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refundPaymentsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refundPaymentWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "requestOrderEditRequestWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/requestOrderEditRequestWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "transferCartCustomerWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateLineItemInCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateRefundReasonsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRefundReasonsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRegionsWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+payment", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "authorizePaymentSessionStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/authorizePaymentSessionStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "cancelPaymentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelPaymentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "capturePaymentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/capturePaymentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPaymentAccountHolderStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPaymentAccountHolderStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPaymentCollectionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPaymentCollectionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPaymentSessionStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPaymentSessionStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createRefundReasonStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createRefundReasonStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePaymentSessionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deletePaymentSessionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteRefundReasonsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteRefundReasonsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/refundPaymentsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/refundPaymentStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "setRegionsPaymentProvidersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setRegionsPaymentProvidersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePaymentCollectionStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePaymentCollectionStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateRefundReasonsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateRefundReasonsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Store", + "autogenerate_tags": "jsSdk+storefront+payment", + "description": "The following methods or properties are used to send requests to Store API Routes related to the Payment Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "payment", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/payment", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+payment", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Payment Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "payment", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/payment", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "paymentCollection", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/paymentCollection", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/payment/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "payment-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Payment Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/payment/IPaymentModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/authorizePaymentSession", + "title": "authorizePaymentSession", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/cancelPayment", + "title": "cancelPayment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/capturePayment", + "title": "capturePayment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/completePaymentCollections", + "title": "completePaymentCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/createAccountHolder", + "title": "createAccountHolder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/createPaymentCollections", + "title": "createPaymentCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/createPaymentMethods", + "title": "createPaymentMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/createPaymentSession", + "title": "createPaymentSession", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/createRefundReasons", + "title": "createRefundReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/deleteAccountHolder", + "title": "deleteAccountHolder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/deleteCaptures", + "title": "deleteCaptures", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/deletePaymentCollections", + "title": "deletePaymentCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/deletePaymentSession", + "title": "deletePaymentSession", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/deleteRefundReasons", + "title": "deleteRefundReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/deleteRefunds", + "title": "deleteRefunds", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/getWebhookActionAndData", + "title": "getWebhookActionAndData", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listAndCountPaymentCollections", + "title": "listAndCountPaymentCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listAndCountPaymentMethods", + "title": "listAndCountPaymentMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listAndCountPaymentProviders", + "title": "listAndCountPaymentProviders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listCaptures", + "title": "listCaptures", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listPaymentCollections", + "title": "listPaymentCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listPaymentMethods", + "title": "listPaymentMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listPaymentProviders", + "title": "listPaymentProviders", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listPaymentSessions", + "title": "listPaymentSessions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listPayments", + "title": "listPayments", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listRefundReasons", + "title": "listRefundReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/listRefunds", + "title": "listRefunds", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/refundPayment", + "title": "refundPayment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/restorePaymentCollections", + "title": "restorePaymentCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/restoreRefundReasons", + "title": "restoreRefundReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/retrievePaymentCollection", + "title": "retrievePaymentCollection", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/retrievePaymentSession", + "title": "retrievePaymentSession", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/softDeletePaymentCollections", + "title": "softDeletePaymentCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/softDeleteRefundReasons", + "title": "softDeleteRefundReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/updateAccountHolder", + "title": "updateAccountHolder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/updatePayment", + "title": "updatePayment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/updatePaymentCollections", + "title": "updatePaymentCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/updatePaymentSession", + "title": "updatePaymentSession", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/updateRefundReasons", + "title": "updateRefundReasons", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/upsertPaymentCollections", + "title": "upsertPaymentCollections", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "payment-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Payment Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/payment_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models/AccountHolder", + "title": "AccountHolder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models/Capture", + "title": "Capture", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models/Payment", + "title": "Payment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models/PaymentCollection", + "title": "PaymentCollection", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models/PaymentProvider", + "title": "PaymentProvider", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models/PaymentSession", + "title": "PaymentSession", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models/Refund", + "title": "Refund", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/payment/models/RefundReason", + "title": "RefundReason", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "pricing", + "title": "Pricing Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing/concepts", + "title": "Pricing Concepts", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing/price-rules", + "title": "Price Rules", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing/price-calculation", + "title": "Prices Calculation", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing/tax-inclusive-pricing", + "title": "Tax-Inclusive Pricing", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing/links-to-other-modules", + "title": "Links to Other Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+pricing", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Pricing Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Get Variant Price with Taxes", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price-with-taxes", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Get Variant Prices", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Custom Line Item Pricing in Medusa", + "path": "https://docs.medusajs.com/resources/examples/guides/custom-item-price", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+pricing,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Pricing Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Example: Show Price with Taxes", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/tax-price", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Example: Show Sale Price", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/sale-price", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Example: Show Variant's Price", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/show-price", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve Product Variant's Prices in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+pricing", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Pricing features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Create a Price List", + "path": "https://docs.medusajs.com/user-guide/price-lists/create", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Price Lists", + "path": "https://docs.medusajs.com/user-guide/price-lists/manage", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Price Lists Overview", + "path": "https://docs.medusajs.com/user-guide/price-lists", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Pricing Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+pricing", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchPriceListPricesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchPriceListPricesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPriceListPricesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPriceListPricesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPriceListsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPriceListsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPricePreferencesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPricePreferencesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createRegionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShippingOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShippingOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createStoresWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createStoresWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePriceListsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePriceListsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePricePreferencesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePricePreferencesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removePriceListPricesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removePriceListPricesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePriceListPricesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePriceListPricesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePriceListsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePriceListsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePricePreferencesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePricePreferencesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRegionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateShippingOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateShippingOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateStoresWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateStoresWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "upsertVariantPricesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/upsertVariantPricesWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+pricing", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPriceListPricesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPriceListPricesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPriceListsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPriceListsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPricePreferencesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPricePreferencesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPriceSetsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPriceSetsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShippingOptionsPriceSetsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createShippingOptionsPriceSetsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePriceListsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deletePriceListsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePricePreferencesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deletePricePreferencesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removePriceListPricesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removePriceListPricesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "setShippingOptionsPricesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setShippingOptionsPricesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePriceListPricesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePriceListPricesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePriceListsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePriceListsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePricePreferencesAsArrayStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePricePreferencesAsArrayStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePricePreferencesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePricePreferencesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePriceSetsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePriceSetsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validatePriceListsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validatePriceListsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+pricing", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Pricing Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "priceList", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/priceList", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "pricePreference", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/pricePreference", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/pricing/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "pricing-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Pricing Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/pricing/IPricingModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/addPriceListPrices", + "title": "addPriceListPrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/addPrices", + "title": "addPrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/calculatePrices", + "title": "calculatePrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/createPriceLists", + "title": "createPriceLists", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/createPricePreferences", + "title": "createPricePreferences", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/createPriceRules", + "title": "createPriceRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/createPriceSets", + "title": "createPriceSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/deletePriceListRules", + "title": "deletePriceListRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/deletePriceLists", + "title": "deletePriceLists", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/deletePricePreferences", + "title": "deletePricePreferences", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/deletePriceRules", + "title": "deletePriceRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/deletePriceSets", + "title": "deletePriceSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listAndCountPriceListRules", + "title": "listAndCountPriceListRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listAndCountPriceLists", + "title": "listAndCountPriceLists", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listAndCountPriceRules", + "title": "listAndCountPriceRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listAndCountPriceSets", + "title": "listAndCountPriceSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listAndCountPrices", + "title": "listAndCountPrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listPriceListRules", + "title": "listPriceListRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listPriceLists", + "title": "listPriceLists", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listPricePreferences", + "title": "listPricePreferences", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listPriceRules", + "title": "listPriceRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listPriceSets", + "title": "listPriceSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/listPrices", + "title": "listPrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/removePriceListRules", + "title": "removePriceListRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/removePrices", + "title": "removePrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/restorePriceLists", + "title": "restorePriceLists", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/restorePricePreferences", + "title": "restorePricePreferences", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/restorePrices", + "title": "restorePrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/retrievePriceList", + "title": "retrievePriceList", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/retrievePriceListRule", + "title": "retrievePriceListRule", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/retrievePricePreference", + "title": "retrievePricePreference", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/retrievePriceRule", + "title": "retrievePriceRule", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/retrievePriceSet", + "title": "retrievePriceSet", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/setPriceListRules", + "title": "setPriceListRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/softDeletePriceLists", + "title": "softDeletePriceLists", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/softDeletePricePreferences", + "title": "softDeletePricePreferences", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/softDeletePrices", + "title": "softDeletePrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/updatePriceListPrices", + "title": "updatePriceListPrices", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/updatePriceLists", + "title": "updatePriceLists", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/updatePricePreferences", + "title": "updatePricePreferences", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/updatePriceRules", + "title": "updatePriceRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/updatePriceSets", + "title": "updatePriceSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/upsertPricePreferences", + "title": "upsertPricePreferences", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/upsertPriceSets", + "title": "upsertPriceSets", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "pricing-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Pricing Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "hasTitleStyling": true, + "autogenerate_path": "/references/pricing_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/models/Price", + "title": "Price", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/models/PriceList", + "title": "PriceList", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/models/PriceListRule", + "title": "PriceListRule", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/models/PricePreference", + "title": "PricePreference", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/models/PriceRule", + "title": "PriceRule", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/pricing/models/PriceSet", + "title": "PriceSet", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "product", + "title": "Product Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "autogenerate_tags": "concept+product", + "autogenerate_as_ref": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/variant-inventory", + "title": "Variant Inventory", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/selling-products", + "title": "Selling Use Cases", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/links-to-other-modules", + "title": "Links to Other Modules", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Inventory Kits", + "path": "https://docs.medusajs.com/resources/commerce-modules/inventory/inventory-kit", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+product", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Product Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/extend", + "title": "Extend Module", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/guides/price-with-taxes", + "title": "Get Variant Price with Taxes", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Get Variant Price with Taxes", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price-with-taxes", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/guides/price", + "title": "Get Variant Prices", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Get Variant Prices", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+product,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Product Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Example: Show Price with Taxes", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/tax-price", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Example: Show Sale Price", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/sale-price", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Example: Show Variant's Price", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/show-price", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Express Checkout with Medusa", + "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "List Product Categories in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/categories/list", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "List Product Collections in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/collections/list", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "List Products in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/list", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve a Category in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/categories/retrieve", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve a Category's Products in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/categories/products", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve a Collection in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/collections/retrieve", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve a Collection's Products in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/collections/products", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve a Product in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/retrieve", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve Nested Categories in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/categories/nested-categories", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve Product Variant's Inventory in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/inventory", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Retrieve Product Variant's Prices in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Select Product Variants in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/products/variants", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+product", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Product features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Create Bundle Product", + "path": "https://docs.medusajs.com/user-guide/products/create/bundle", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Create Multi-Part Product", + "path": "https://docs.medusajs.com/user-guide/products/create/multi-part", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Create Product", + "path": "https://docs.medusajs.com/user-guide/products/create", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Edit Product", + "path": "https://docs.medusajs.com/user-guide/products/edit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Export Products", + "path": "https://docs.medusajs.com/user-guide/products/export", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Import Products", + "path": "https://docs.medusajs.com/user-guide/products/import", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Product Categories", + "path": "https://docs.medusajs.com/user-guide/products/categories", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Product Collections", + "path": "https://docs.medusajs.com/user-guide/products/collections", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Product Tags", + "path": "https://docs.medusajs.com/user-guide/settings/product-tags", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Product Types", + "path": "https://docs.medusajs.com/user-guide/settings/product-types", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Product Variants", + "path": "https://docs.medusajs.com/user-guide/products/variants", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Products Overview", + "path": "https://docs.medusajs.com/user-guide/products", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Product Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+product", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchLinkProductsToCategoryWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchLinkProductsToCategoryWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchLinkProductsToCollectionWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchLinkProductsToCollectionWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCollectionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCollectionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductCategoriesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductCategoriesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductTagsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductTagsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductTypesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductTypesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCollectionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCollectionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductCategoriesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductCategoriesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductTagsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductTagsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductTypesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductTypesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductVariantsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "importProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/importProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCollectionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCollectionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductCategoriesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductCategoriesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductTagsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductTagsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductTypesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductTypesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductVariantsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductVariantsWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+product", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchLinkProductsToCategoryStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/batchLinkProductsToCategoryStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchLinkProductsToCollectionStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/batchLinkProductsToCollectionStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCollectionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCollectionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductCategoriesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductCategoriesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductOptionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductOptionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductTagsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductTagsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductTypesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductTypesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createProductVariantsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductVariantsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCollectionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCollectionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductCategoriesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductCategoriesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductOptionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductOptionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductTagsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductTagsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductTypesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductTypesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteProductVariantsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductVariantsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "getProductsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getProductsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "groupProductsForBatchStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/groupProductsForBatchStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "parseProductCsvStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/parseProductCsvStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCollectionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCollectionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductCategoriesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductCategoriesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductOptionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductOptionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductTagsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductTagsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductTypesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductTypesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateProductVariantsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductVariantsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Store", + "autogenerate_tags": "jsSdk+storefront+product", + "description": "The following methods or properties are used to send requests to Store API Routes related to the Product Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "category", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/category", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "collection", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/collection", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "product", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/product", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+product", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Product Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "product", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/product", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "productCategory", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productCategory", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "productCollection", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productCollection", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "productTag", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productTag", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "productType", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productType", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "productVariant", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productVariant", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/product/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "product-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Product Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/product/IProductModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/createProductCategories", + "title": "createProductCategories", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/createProductCollections", + "title": "createProductCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/createProductOptionValues", + "title": "createProductOptionValues", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/createProductOptions", + "title": "createProductOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/createProductTags", + "title": "createProductTags", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/createProductTypes", + "title": "createProductTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/createProductVariants", + "title": "createProductVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/createProducts", + "title": "createProducts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/deleteProductCategories", + "title": "deleteProductCategories", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/deleteProductCollections", + "title": "deleteProductCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/deleteProductOptionValues", + "title": "deleteProductOptionValues", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/deleteProductOptions", + "title": "deleteProductOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/deleteProductTags", + "title": "deleteProductTags", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/deleteProductTypes", + "title": "deleteProductTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/deleteProductVariants", + "title": "deleteProductVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/deleteProducts", + "title": "deleteProducts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listAndCountProductCategories", + "title": "listAndCountProductCategories", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listAndCountProductCollections", + "title": "listAndCountProductCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listAndCountProductOptionValues", + "title": "listAndCountProductOptionValues", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listAndCountProductOptions", + "title": "listAndCountProductOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listAndCountProductTags", + "title": "listAndCountProductTags", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listAndCountProductTypes", + "title": "listAndCountProductTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listAndCountProductVariants", + "title": "listAndCountProductVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listAndCountProducts", + "title": "listAndCountProducts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listProductCategories", + "title": "listProductCategories", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listProductCollections", + "title": "listProductCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listProductOptionValues", + "title": "listProductOptionValues", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listProductOptions", + "title": "listProductOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listProductTags", + "title": "listProductTags", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listProductTypes", + "title": "listProductTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listProductVariants", + "title": "listProductVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/listProducts", + "title": "listProducts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/restoreProductCategories", + "title": "restoreProductCategories", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/restoreProductCollections", + "title": "restoreProductCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/restoreProductOptionValues", + "title": "restoreProductOptionValues", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/restoreProductOptions", + "title": "restoreProductOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/restoreProductTags", + "title": "restoreProductTags", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/restoreProductTypes", + "title": "restoreProductTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/restoreProductVariants", + "title": "restoreProductVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/restoreProducts", + "title": "restoreProducts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/retrieveProduct", + "title": "retrieveProduct", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/retrieveProductCategory", + "title": "retrieveProductCategory", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/retrieveProductCollection", + "title": "retrieveProductCollection", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/retrieveProductOption", + "title": "retrieveProductOption", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/retrieveProductTag", + "title": "retrieveProductTag", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/retrieveProductType", + "title": "retrieveProductType", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/retrieveProductVariant", + "title": "retrieveProductVariant", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/softDeleteProductCategories", + "title": "softDeleteProductCategories", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/softDeleteProductCollections", + "title": "softDeleteProductCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/softDeleteProductOptionValues", + "title": "softDeleteProductOptionValues", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/softDeleteProductOptions", + "title": "softDeleteProductOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/softDeleteProductTags", + "title": "softDeleteProductTags", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/softDeleteProductTypes", + "title": "softDeleteProductTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/softDeleteProductVariants", + "title": "softDeleteProductVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/softDeleteProducts", + "title": "softDeleteProducts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/updateProductCategories", + "title": "updateProductCategories", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/updateProductCollections", + "title": "updateProductCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/updateProductOptionValues", + "title": "updateProductOptionValues", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/updateProductOptions", + "title": "updateProductOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/updateProductTags", + "title": "updateProductTags", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/updateProductTypes", + "title": "updateProductTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/updateProductVariants", + "title": "updateProductVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/updateProducts", + "title": "updateProducts", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/upsertProductCategories", + "title": "upsertProductCategories", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/upsertProductCollections", + "title": "upsertProductCollections", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/upsertProductOptions", + "title": "upsertProductOptions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/upsertProductTags", + "title": "upsertProductTags", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/upsertProductTypes", + "title": "upsertProductTypes", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/upsertProductVariants", + "title": "upsertProductVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/upsertProducts", + "title": "upsertProducts", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "product-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Product Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "hasTitleStyling": true, + "autogenerate_path": "/references/product_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/Product", + "title": "Product", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/ProductCategory", + "title": "ProductCategory", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/ProductCollection", + "title": "ProductCollection", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/ProductImage", + "title": "ProductImage", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/ProductOption", + "title": "ProductOption", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/ProductOptionValue", + "title": "ProductOptionValue", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/ProductTag", + "title": "ProductTag", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/ProductType", + "title": "ProductType", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/product/models/ProductVariant", + "title": "ProductVariant", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "promotion", + "title": "Promotion Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/concepts", + "title": "Promotion", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/application-method", + "title": "Application Method", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/campaign", + "title": "Campaign", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/actions", + "title": "Promotion Actions", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/links-to-other-modules", + "title": "Links to Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+promotion", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Promotion Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/extend", + "title": "Extend Module", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+promotion", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Promotion features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Create a Promotion", + "path": "https://docs.medusajs.com/user-guide/promotions/create", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Campaigns", + "path": "https://docs.medusajs.com/user-guide/promotions/campaigns", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Promotions", + "path": "https://docs.medusajs.com/user-guide/promotions/manage", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Promotions Overview", + "path": "https://docs.medusajs.com/user-guide/promotions", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Promotion Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+promotion", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addOrRemoveCampaignPromotionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addShippingMethodToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "batchPromotionRulesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchPromotionRulesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCampaignsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCampaignsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPromotionRulesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPromotionRulesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPromotionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPromotionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCampaignsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCampaignsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePromotionRulesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePromotionRulesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePromotionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePromotionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshCartItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "transferCartCustomerWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCampaignsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCampaignsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartPromotionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartPromotionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateLineItemInCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePromotionRulesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePromotionRulesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePromotionsStatusWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePromotionsStatusWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePromotionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePromotionsWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+promotion", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addCampaignPromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/addCampaignPromotionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addRulesToPromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/addRulesToPromotionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCampaignsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCampaignsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createPromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPromotionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteCampaignsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCampaignsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deletePromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deletePromotionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "getActionsToComputeFromPromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getActionsToComputeFromPromotionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "getPromotionCodesToApply", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getPromotionCodesToApply", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "prepareAdjustmentsFromPromotionActionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/prepareAdjustmentsFromPromotionActionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeCampaignPromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeCampaignPromotionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeRulesFromPromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeRulesFromPromotionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCampaignsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCampaignsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartPromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCartPromotionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePromotionRulesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePromotionRulesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updatePromotionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePromotionsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+promotion", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Promotion Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "campaign", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/campaign", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "promotion", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/promotion", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/promotion/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "promotion-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Promotion Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "hasTitleStyling": true, + "autogenerate_path": "/references/promotion/IPromotionModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/addPromotionBuyRules", + "title": "addPromotionBuyRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/addPromotionRules", + "title": "addPromotionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/addPromotionTargetRules", + "title": "addPromotionTargetRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/addPromotionsToCampaign", + "title": "addPromotionsToCampaign", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/computeActions", + "title": "computeActions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/createCampaigns", + "title": "createCampaigns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/createPromotions", + "title": "createPromotions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/deleteCampaigns", + "title": "deleteCampaigns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/deletePromotions", + "title": "deletePromotions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/listAndCountCampaigns", + "title": "listAndCountCampaigns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/listAndCountPromotions", + "title": "listAndCountPromotions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/listCampaigns", + "title": "listCampaigns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/listPromotionRules", + "title": "listPromotionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/listPromotions", + "title": "listPromotions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/registerUsage", + "title": "registerUsage", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/removePromotionBuyRules", + "title": "removePromotionBuyRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/removePromotionRules", + "title": "removePromotionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/removePromotionTargetRules", + "title": "removePromotionTargetRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/removePromotionsFromCampaign", + "title": "removePromotionsFromCampaign", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/restoreCampaigns", + "title": "restoreCampaigns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/restorePromotions", + "title": "restorePromotions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/retrieveCampaign", + "title": "retrieveCampaign", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/retrievePromotion", + "title": "retrievePromotion", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/revertUsage", + "title": "revertUsage", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/softDeleteCampaigns", + "title": "softDeleteCampaigns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/softDeletePromotions", + "title": "softDeletePromotions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/updateCampaigns", + "title": "updateCampaigns", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/updatePromotionRules", + "title": "updatePromotionRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/updatePromotions", + "title": "updatePromotions", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "promotion-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Promotion Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "hasTitleStyling": true, + "autogenerate_path": "/references/promotion_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/models/ApplicationMethod", + "title": "ApplicationMethod", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/models/Campaign", + "title": "Campaign", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/models/CampaignBudget", + "title": "CampaignBudget", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/models/Promotion", + "title": "Promotion", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/models/PromotionRule", + "title": "PromotionRule", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/promotion/models/PromotionRuleValue", + "title": "PromotionRuleValue", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "region", + "title": "Region Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/region", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/region/links-to-other-modules", + "title": "Links to Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+region,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Region Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Implement Express Checkout with Medusa", + "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "List Regions in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/regions/list", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Region Context in Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/regions/context", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Store and Retrieve Region", + "path": "https://docs.medusajs.com/resources/storefront-development/regions/store-retrieve-region", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+region", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Region features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Regions", + "path": "https://docs.medusajs.com/user-guide/settings/regions", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Region Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/region/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+region", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addOrderLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createRegionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createShippingOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShippingOptionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteRegionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "exportProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/exportProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "importProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/importProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEditAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderExchangeAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRegionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateShippingOptionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateShippingOptionsWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+region", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createRegionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createRegionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteRegionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteRegionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "findOneOrAnyRegionStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findOneOrAnyRegionStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "generateProductCsvStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/generateProductCsvStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "parseProductCsvStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/parseProductCsvStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateRegionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateRegionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validateShippingOptionPricesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateShippingOptionPricesStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/region/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Store", + "autogenerate_tags": "jsSdk+storefront+region", + "description": "The following methods or properties are used to send requests to Store API Routes related to the Region Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "region", + "path": "https://docs.medusajs.com/resources/references/js-sdk/store/region", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+region", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Region Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "region", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/region", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/region/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/region/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "region-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Region Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/region/IRegionModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/createRegions", + "title": "createRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/deleteRegions", + "title": "deleteRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/listAndCountCountries", + "title": "listAndCountCountries", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/listAndCountRegions", + "title": "listAndCountRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/listCountries", + "title": "listCountries", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/listRegions", + "title": "listRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/restoreRegions", + "title": "restoreRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/retrieveCountry", + "title": "retrieveCountry", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/retrieveRegion", + "title": "retrieveRegion", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/softDeleteRegions", + "title": "softDeleteRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/updateRegions", + "title": "updateRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/upsertRegions", + "title": "upsertRegions", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "region-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Region Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/region_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/models/Country", + "title": "Country", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/region/models/Region", + "title": "Region", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "sales-channel", + "title": "Sales Channel Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/sales-channel", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "autogenerate_tags": "concept+salesChannel", + "autogenerate_as_ref": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/sales-channel/publishable-api-keys", + "title": "Publishable API Keys", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/sales-channel/links-to-other-modules", + "title": "Links to Modules", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Product Variant Inventory", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/variant-inventory", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+salesChannel,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Sales Channel Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Use a Publishable API Key in the Storefront", + "path": "https://docs.medusajs.com/resources/storefront-development/publishable-api-keys", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+salesChannel", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Sales Channel features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Sales Channels", + "path": "https://docs.medusajs.com/user-guide/settings/sales-channels", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Sales Channel Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/sales-channel/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+salesChannel", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addOrderLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createDefaultsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createDefaultsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createSalesChannelsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createSalesChannelsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteSalesChannelsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteSalesChannelsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "importProductsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/importProductsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "linkSalesChannelsToApiKeyWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/linkSalesChannelsToApiKeyWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEditAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderExchangeAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateSalesChannelsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateSalesChannelsWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+salesChannel", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createDefaultSalesChannelStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createDefaultSalesChannelStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createSalesChannelsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createSalesChannelsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteSalesChannelsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteSalesChannelsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "findSalesChannelStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findSalesChannelStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "parseProductCsvStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/parseProductCsvStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateSalesChannelsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateSalesChannelsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validateSalesChannelsExistStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateSalesChannelsExistStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/sales-channel/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+salesChannel", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Sales Channel Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "salesChannel", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/salesChannel", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/sales-channel/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/sales-channel/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "sales-channel-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Sales Channel Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel", + "title": "Reference Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/sales_channel/ISalesChannelModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/createSalesChannels", + "title": "createSalesChannels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/deleteSalesChannels", + "title": "deleteSalesChannels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/listAndCountSalesChannels", + "title": "listAndCountSalesChannels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/listSalesChannels", + "title": "listSalesChannels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/restoreSalesChannels", + "title": "restoreSalesChannels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/retrieveSalesChannel", + "title": "retrieveSalesChannel", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/softDeleteSalesChannels", + "title": "softDeleteSalesChannels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/updateSalesChannels", + "title": "updateSalesChannels", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/upsertSalesChannels", + "title": "upsertSalesChannels", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "sales-channel-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Sales Channel Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/sales_channel_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/sales-channel/models/SalesChannel", + "title": "SalesChannel", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "stock-location", + "title": "Stock Location Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/stock-location", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "autogenerate_tags": "concept+stockLocation", + "autogenerate_as_ref": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/stock-location/concepts", + "title": "Stock Location Concepts", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/stock-location/links-to-other-modules", + "title": "Links to Modules", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Inventory Kits", + "path": "https://docs.medusajs.com/resources/commerce-modules/inventory/inventory-kit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Product Variant Inventory", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/variant-inventory", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+stockLocation", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Stock Location features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Locations & Shipping Overview", + "path": "https://docs.medusajs.com/user-guide/settings/locations-and-shipping", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Locations", + "path": "https://docs.medusajs.com/user-guide/settings/locations-and-shipping/locations", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Stock Location Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/stock-location/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+stockLocation", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createStockLocationsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createStockLocationsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteStockLocationsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteStockLocationsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateStockLocationsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateStockLocationsWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+stockLocation", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createStockLocations", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createStockLocations", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteStockLocationsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteStockLocationsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateStockLocationsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateStockLocationsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/stock-location/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+stockLocation", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Stock Location Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "stockLocation", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/stockLocation", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/stock-location/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "stock-location-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Stock Location Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/stock_location_next/IStockLocationService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/createStockLocations", + "title": "createStockLocations", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/deleteStockLocationAddresses", + "title": "deleteStockLocationAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/deleteStockLocations", + "title": "deleteStockLocations", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/listAndCountStockLocations", + "title": "listAndCountStockLocations", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/listStockLocationAddresses", + "title": "listStockLocationAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/listStockLocations", + "title": "listStockLocations", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/restoreStockLocations", + "title": "restoreStockLocations", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/retrieveStockLocation", + "title": "retrieveStockLocation", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/softDeleteStockLocations", + "title": "softDeleteStockLocations", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/updateStockLocations", + "title": "updateStockLocations", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/upsertStockLocationAddresses", + "title": "upsertStockLocationAddresses", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/upsertStockLocations", + "title": "upsertStockLocations", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "stock-location-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Stock Location Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/stock_location_next_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/models/StockLocation", + "title": "StockLocation", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/stock-location-next/models/StockLocationAddress", + "title": "StockLocationAddress", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "store", + "title": "Store Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/store", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/store/links-to-other-modules", + "title": "Link to Modules", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+store", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Store features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Store", + "path": "https://docs.medusajs.com/user-guide/settings/store", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Store Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/store/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+store", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addOrderLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createDefaultsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createDefaultsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createStoresWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createStoresWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteStoresWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteStoresWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEditAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderExchangeAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateStoresWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateStoresWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+store", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createDefaultStoreStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createDefaultStoreStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createStoresStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createStoresStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteStoresStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteStoresStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "findOneOrAnyRegionStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findOneOrAnyRegionStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "findSalesChannelStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findSalesChannelStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateStoresStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateStoresStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/store/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+store", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Store Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "store", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/store", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/store/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "store-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Store Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/store/IStoreModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/createStores", + "title": "createStores", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/deleteStores", + "title": "deleteStores", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/listAndCountStores", + "title": "listAndCountStores", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/listStores", + "title": "listStores", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/restoreStores", + "title": "restoreStores", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/retrieveStore", + "title": "retrieveStore", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/softDeleteStores", + "title": "softDeleteStores", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/updateStores", + "title": "updateStores", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/upsertStores", + "title": "upsertStores", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "store-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Store Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/store_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/models/Store", + "title": "Store", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/store/models/StoreCurrency", + "title": "StoreCurrency", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "tax", + "title": "Tax Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/tax", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/tax/module-options", + "title": "Module Options", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Concepts", + "initialOpen": false, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/tax/tax-region", + "title": "Tax Region", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/tax/tax-rates-and-rules", + "title": "Tax Rates and Rules", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/tax/tax-calculation-with-provider", + "title": "Tax Calculation and Providers", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+tax", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the Tax Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Get Variant Price with Taxes", + "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price-with-taxes", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/provider", + "title": "Tax Provider Reference", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Storefront Guides", + "autogenerate_tags": "storefront+tax,-jsSdk", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to integrate the Tax Module's features into your storefront.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Example: Show Price with Taxes", + "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/tax-price", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+tax", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage Tax features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Tax Regions", + "path": "https://docs.medusajs.com/user-guide/settings/tax-regions", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the Tax Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/tax/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+tax", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addShippingMethodToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "addToCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createClaimShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createClaimShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createExchangeShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createExchangeShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderEditShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderEditShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createOrderWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createReturnShippingMethodWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReturnShippingMethodWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createTaxRateRulesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createTaxRateRulesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createTaxRatesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createTaxRatesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createTaxRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createTaxRegionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteLineItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteTaxRateRulesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteTaxRateRulesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteTaxRatesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteTaxRatesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteTaxRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteTaxRegionsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderClaimAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderEditAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "orderExchangeAddNewItemWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshCartItemsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "setTaxRateRulesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/setTaxRateRulesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "transferCartCustomerWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateLineItemInCartWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateOrderTaxLinesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderTaxLinesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateTaxLinesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateTaxLinesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateTaxRatesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateTaxRatesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateTaxRegionsWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateTaxRegionsWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+tax", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createTaxRateRulesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createTaxRateRulesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createTaxRatesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createTaxRatesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createTaxRegionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createTaxRegionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteTaxRateRulesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteTaxRateRulesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteTaxRatesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteTaxRatesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteTaxRegionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteTaxRegionsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "getItemTaxLinesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getItemTaxLinesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "listTaxRateRuleIdsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/listTaxRateRuleIdsStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateTaxRatesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateTaxRatesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateTaxRegionsStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateTaxRegionsStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/tax/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+tax", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the Tax Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "taxRate", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/taxRate", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "taxRegion", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/taxRegion", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/tax/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "tax-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "Tax Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/tax/ITaxModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/createTaxRateRules", + "title": "createTaxRateRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/createTaxRates", + "title": "createTaxRates", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/createTaxRegions", + "title": "createTaxRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/deleteTaxRateRules", + "title": "deleteTaxRateRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/deleteTaxRates", + "title": "deleteTaxRates", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/deleteTaxRegions", + "title": "deleteTaxRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/getTaxLines", + "title": "getTaxLines", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/listAndCountTaxRates", + "title": "listAndCountTaxRates", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/listTaxRateRules", + "title": "listTaxRateRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/listTaxRates", + "title": "listTaxRates", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/listTaxRegions", + "title": "listTaxRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/restoreTaxRateRules", + "title": "restoreTaxRateRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/restoreTaxRates", + "title": "restoreTaxRates", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/restoreTaxRegions", + "title": "restoreTaxRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/retrieveTaxRate", + "title": "retrieveTaxRate", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/softDeleteTaxRateRules", + "title": "softDeleteTaxRateRules", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/softDeleteTaxRates", + "title": "softDeleteTaxRates", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/softDeleteTaxRegions", + "title": "softDeleteTaxRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/updateTaxRates", + "title": "updateTaxRates", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/updateTaxRegions", + "title": "updateTaxRegions", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/upsertTaxRates", + "title": "upsertTaxRates", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "tax-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "Tax Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "autogenerate_path": "/references/tax_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/models/TaxProvider", + "title": "TaxProvider", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/models/TaxRate", + "title": "TaxRate", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/models/TaxRateRule", + "title": "TaxRateRule", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/tax/models/TaxRegion", + "title": "TaxRegion", + "description": "", + "children": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "user", + "title": "User Module", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/user", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/user/module-options", + "title": "Module Options", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Server Guides", + "autogenerate_tags": "server+user", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to use the User Module in your customizations on the Medusa application server.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/user/user-creation-flows", + "title": "User Creation Flows", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin User Guides", + "autogenerate_tags": "userGuide+user", + "initialOpen": false, + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "description": "Learn how to utilize and manage User features in the Medusa Admin dashboard.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Invites", + "path": "https://docs.medusajs.com/user-guide/settings/users/invites", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Profile", + "path": "https://docs.medusajs.com/user-guide/settings/profile", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Manage Users", + "path": "https://docs.medusajs.com/user-guide/settings/users", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Reset Password", + "path": "https://docs.medusajs.com/user-guide/reset-password", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "initialOpen": false, + "description": "Find references for tools and resources related to the User Module, such as data models, methods, and more. These are useful for your customizations.", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/user/workflows", + "title": "Workflows", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflows", + "autogenerate_tags": "workflow+user", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "acceptInviteWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/acceptInviteWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createInvitesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createInvitesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createUserAccountWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createUserAccountWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createUsersWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createUsersWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteInvitesWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteInvitesWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteUsersWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteUsersWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshInviteTokensWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshInviteTokensWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "removeUserAccountWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeUserAccountWorkflow", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateUsersWorkflow", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateUsersWorkflow", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Steps", + "autogenerate_tags": "step+user", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createInviteStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createInviteStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "createUsersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createUsersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteInvitesStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteInvitesStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "deleteUsersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteUsersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refreshInviteTokensStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/refreshInviteTokensStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateUsersStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateUsersStep", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "validateTokenStep", + "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateTokenStep", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/user/js-sdk", + "title": "JS SDK", + "hideChildren": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Admin", + "autogenerate_tags": "jsSdk+admin+user", + "description": "The following methods or properties are used to send requests to Admin API Routes related to the User Module.", + "autogenerate_as_ref": true, + "sort_sidebar": "alphabetize", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "invite", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/invite", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "user", + "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/user", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/user/events", + "title": "Events Reference", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/commerce-modules/user/admin-widget-zones", + "title": "Admin Widget Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "user-service-reference", + "title": "Main Service Reference", + "childSidebarTitle": "User Module's Main Service Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/references/user/IUserModuleService/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/createInvites", + "title": "createInvites", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/createUsers", + "title": "createUsers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/deleteInvites", + "title": "deleteInvites", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/deleteUsers", + "title": "deleteUsers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/listAndCountInvites", + "title": "listAndCountInvites", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/listAndCountUsers", + "title": "listAndCountUsers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/listInvites", + "title": "listInvites", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/listUsers", + "title": "listUsers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/refreshInviteTokens", + "title": "refreshInviteTokens", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/restoreInvites", + "title": "restoreInvites", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/restoreUsers", + "title": "restoreUsers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/retrieveInvite", + "title": "retrieveInvite", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/retrieveUser", + "title": "retrieveUser", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/softDeleteInvites", + "title": "softDeleteInvites", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/softDeleteUsers", + "title": "softDeleteUsers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/updateInvites", + "title": "updateInvites", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/updateUsers", + "title": "updateUsers", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/validateInviteToken", + "title": "validateInviteToken", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "user-models-reference", + "title": "Data Models Reference", + "childSidebarTitle": "User Module Data Models Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/models", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Data Models", + "hasTitleStyling": true, + "autogenerate_path": "/references/user_models/variables", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/models/Invite", + "title": "Invite", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/user/models/User", + "title": "User", + "description": "", + "children": [] + } + ] } ] } @@ -632,26 +17034,18 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Auth Module", - "isChildSidebar": true, + "type": "sidebar", + "sidebar_id": "architectural-modules", + "title": "Architectural Modules", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/auth", + "path": "/architectural-modules", "title": "Overview", "children": [] }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/module-options", - "title": "Module Options", - "children": [] - }, { "type": "separator" }, @@ -659,40 +17053,47 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Concepts", - "initialOpen": false, + "title": "Cache Modules", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/auth/auth-identity-and-actor-types", - "title": "Identity and Actor Types", + "path": "/architectural-modules/cache", + "title": "Overview", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/auth/auth-providers", - "title": "Auth Providers", + "path": "/architectural-modules/cache/in-memory", + "title": "In-Memory", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/auth/auth-flows", - "title": "Auth Flow with Module", + "path": "/architectural-modules/cache/redis", + "title": "Redis", "children": [] }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/authentication-route", - "title": "Auth Flow with Routes", - "children": [] + "type": "sub-category", + "title": "Guides", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/cache/create", + "title": "Create Cache Module", + "children": [] + } + ] } ] }, @@ -700,36 +17101,47 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+auth", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Auth Module in your customizations on the Medusa application server.", + "title": "Event Modules", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/auth/create-actor-type", - "title": "Create an Actor Type", + "path": "/architectural-modules/event", + "title": "Overview", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/auth/provider", - "title": "Create Auth Provider Module", + "path": "/architectural-modules/event/local", + "title": "Local", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/auth/reset-password", - "title": "Handle Password Reset Event", + "path": "/architectural-modules/event/redis", + "title": "Redis", "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Guides", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/event/create", + "title": "Create Event Module", + "children": [] + } + ] } ] }, @@ -737,105 +17149,178 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+auth,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Auth Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Log-out Customer in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/log-out", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Login Customer in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/login", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Register Customer in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/register", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Reset Customer Password in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/reset-password", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve Logged-In Customer in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/retrieve", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Third-Party or Social Login in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/third-party-login", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+auth", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Auth features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Reset Password", - "path": "https://docs.medusajs.com/user-guide/reset-password", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Providers", - "initialOpen": false, + "title": "File Module Providers", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/auth/auth-providers/emailpass", - "title": "Emailpass Provider", + "path": "/architectural-modules/file", + "title": "Overview", "children": [] }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/file/local", + "title": "Local", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/file/s3", + "title": "AWS S3 (and Compatible APIs)", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Guides", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/file-provider-module", + "title": "Create File Provider", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Notification Module Providers", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/notification", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/notification/local", + "title": "Local", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/notification/sendgrid", + "title": "SendGrid", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Guides", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/notification-provider-module", + "title": "Create Notification Provider", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/integrations/guides/resend", + "title": "Integrate Resend", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/notification/send-notification", + "title": "Send Notification", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Workflow Engine Modules", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/workflow-engine", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/workflow-engine/in-memory", + "title": "In-Memory", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/architectural-modules/workflow-engine/redis", + "title": "Redis", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "integrations", + "title": "Integrations", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/integrations", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Auth", + "children": [ { "loaded": true, "isPathHref": true, "type": "link", "path": "/commerce-modules/auth/auth-providers/google", - "title": "Google Provider", + "title": "Google", "children": [] }, { @@ -843,7 +17328,7 @@ export const generatedSidebar = [ "isPathHref": true, "type": "link", "path": "/commerce-modules/auth/auth-providers/github", - "title": "GitHub Provider", + "title": "GitHub", "children": [] } ] @@ -852,427 +17337,14 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Auth Module, such as data models, methods, and more. These are useful for your customizations.", + "title": "CMS", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/auth/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+auth", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "acceptInviteWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/acceptInviteWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCustomerAccountWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomerAccountWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createUserAccountWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createUserAccountWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeCustomerAccountWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeCustomerAccountWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeUserAccountWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeUserAccountWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+auth", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "setAuthAppMetadataStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setAuthAppMetadataStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "autogenerate_tags": "jsSdk+auth", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "callback", - "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/callback", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "login", - "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/login", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "logout", - "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/logout", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refresh", - "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/refresh", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "register", - "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/register", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "resetPassword", - "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/resetPassword", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProvider", - "path": "https://docs.medusajs.com/resources/references/js-sdk/auth/updateProvider", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/events", - "title": "Events Reference", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Auth Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/auth/IAuthModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/authenticate", - "title": "authenticate", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/createAuthIdentities", - "title": "createAuthIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/createProviderIdentities", - "title": "createProviderIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/deleteAuthIdentities", - "title": "deleteAuthIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/deleteProviderIdentities", - "title": "deleteProviderIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/listAndCountAuthIdentities", - "title": "listAndCountAuthIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/listAuthIdentities", - "title": "listAuthIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/listProviderIdentities", - "title": "listProviderIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/register", - "title": "register", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/retrieveAuthIdentity", - "title": "retrieveAuthIdentity", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/retrieveProviderIdentity", - "title": "retrieveProviderIdentity", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/updateAuthIdentities", - "title": "updateAuthIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/updateProvider", - "title": "updateProvider", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/updateProviderIdentities", - "title": "updateProviderIdentities", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/validateCallback", - "title": "validateCallback", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Auth Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/auth_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/models/AuthIdentity", - "title": "AuthIdentity", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/auth/models/ProviderIdentity", - "title": "ProviderIdentity", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Cart Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/cart", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/cart/concepts", - "title": "Cart Concepts", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/cart/promotions", - "title": "Promotion Adjustments", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/cart/tax-lines", - "title": "Tax Lines", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/cart/links-to-other-modules", - "title": "Links to Other Modules", + "path": "/integrations/guides/sanity", + "title": "Sanity", "children": [] } ] @@ -1281,27 +17353,14 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+cart", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Cart Module in your customizations on the Medusa application server.", + "title": "File", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/cart/extend", - "title": "Extend Module", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Implement Custom Line Item Pricing in Medusa", - "path": "https://docs.medusajs.com/resources/examples/guides/custom-item-price", + "path": "/architectural-modules/file/s3", + "title": "AWS", "children": [] } ] @@ -1310,2149 +17369,14 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+cart,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Cart Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 1: Enter Email", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/email", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 2: Set Address", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/address", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 3: Choose Shipping Method", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/shipping", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 4: Choose Payment Provider", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/payment", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 5: Complete Cart", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Create Cart Context in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/cart/context", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Create Cart in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/cart/create", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Implement Express Checkout with Medusa", - "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Cart's Items in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/cart/manage-items", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Payment with Stripe in React Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/payment/stripe", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve Cart in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/cart/retrieve", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Update Cart in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/cart/update", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Cart Module, such as data models, methods, and more. These are useful for your customizations.", + "title": "Fulfillment", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/cart/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+cart", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addShippingMethodToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "completeCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshCartItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshCartShippingMethodsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartShippingMethodsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "transferCartCustomerWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartPromotionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartPromotionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateLineItemInCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateTaxLinesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateTaxLinesWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+cart", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addShippingMethodToCartStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/addShippingMethodToCartStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCartsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createLineItemAdjustmentsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createLineItemAdjustmentsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createLineItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createLineItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShippingMethodAdjustmentsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createShippingMethodAdjustmentsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteLineItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteLineItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "getLineItemActionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getLineItemActionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeLineItemAdjustmentsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeLineItemAdjustmentsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeShippingMethodAdjustmentsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeShippingMethodAdjustmentsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeShippingMethodFromCartStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeShippingMethodFromCartStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "setTaxLinesForItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setTaxLinesForItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCartsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateLineItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateLineItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateLineItemsStepWithSelector", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateLineItemsStepWithSelector", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateShippingMethodsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateShippingMethodsStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/cart/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Store", - "autogenerate_tags": "jsSdk+storefront+cart", - "description": "The following methods or properties are used to send requests to Store API Routes related to the Cart Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cart", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/cart", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/cart/events", - "title": "Events Reference", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Cart Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/cart/ICartModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/addLineItemAdjustments", - "title": "addLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/addLineItemTaxLines", - "title": "addLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/addLineItems", - "title": "addLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/addShippingMethodAdjustments", - "title": "addShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/addShippingMethodTaxLines", - "title": "addShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/addShippingMethods", - "title": "addShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/createAddresses", - "title": "createAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/createCarts", - "title": "createCarts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/deleteAddresses", - "title": "deleteAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/deleteCarts", - "title": "deleteCarts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/deleteLineItemAdjustments", - "title": "deleteLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/deleteLineItemTaxLines", - "title": "deleteLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/deleteLineItems", - "title": "deleteLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/deleteShippingMethodAdjustments", - "title": "deleteShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/deleteShippingMethodTaxLines", - "title": "deleteShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/deleteShippingMethods", - "title": "deleteShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listAddresses", - "title": "listAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listAndCountCarts", - "title": "listAndCountCarts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listCarts", - "title": "listCarts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listLineItemAdjustments", - "title": "listLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listLineItemTaxLines", - "title": "listLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listLineItems", - "title": "listLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listShippingMethodAdjustments", - "title": "listShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listShippingMethodTaxLines", - "title": "listShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/listShippingMethods", - "title": "listShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/restoreAddresses", - "title": "restoreAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/restoreCarts", - "title": "restoreCarts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/restoreLineItemAdjustments", - "title": "restoreLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/restoreLineItemTaxLines", - "title": "restoreLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/restoreLineItems", - "title": "restoreLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/restoreShippingMethodAdjustments", - "title": "restoreShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/restoreShippingMethodTaxLines", - "title": "restoreShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/restoreShippingMethods", - "title": "restoreShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/retrieveCart", - "title": "retrieveCart", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/retrieveLineItem", - "title": "retrieveLineItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/setLineItemAdjustments", - "title": "setLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/setLineItemTaxLines", - "title": "setLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/setShippingMethodAdjustments", - "title": "setShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/setShippingMethodTaxLines", - "title": "setShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/softDeleteAddresses", - "title": "softDeleteAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/softDeleteCarts", - "title": "softDeleteCarts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/softDeleteLineItemAdjustments", - "title": "softDeleteLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/softDeleteLineItemTaxLines", - "title": "softDeleteLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/softDeleteLineItems", - "title": "softDeleteLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/softDeleteShippingMethodAdjustments", - "title": "softDeleteShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/softDeleteShippingMethodTaxLines", - "title": "softDeleteShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/softDeleteShippingMethods", - "title": "softDeleteShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/updateAddresses", - "title": "updateAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/updateCarts", - "title": "updateCarts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/updateLineItems", - "title": "updateLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/updateShippingMethods", - "title": "updateShippingMethods", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Cart Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/cart_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/Address", - "title": "Address", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/Cart", - "title": "Cart", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/CreditLine", - "title": "CreditLine", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/LineItem", - "title": "LineItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/LineItemAdjustment", - "title": "LineItemAdjustment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/LineItemTaxLine", - "title": "LineItemTaxLine", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/ShippingMethod", - "title": "ShippingMethod", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/ShippingMethodAdjustment", - "title": "ShippingMethodAdjustment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/cart/models/ShippingMethodTaxLine", - "title": "ShippingMethodTaxLine", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Currency Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/currency", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Concepts", - "initialOpen": false, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/currency/links-to-other-modules", - "title": "Link to Modules", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+currency", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Currency features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Store", - "path": "https://docs.medusajs.com/user-guide/settings/store", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Currency Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/currency/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+currency", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Currency Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "currency", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/currency", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/currency", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Currency Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/currency/ICurrencyModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/currency/listAndCountCurrencies", - "title": "listAndCountCurrencies", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/currency/listCurrencies", - "title": "listCurrencies", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/currency/retrieveCurrency", - "title": "retrieveCurrency", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/currency/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Currency Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/currency_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/currency/models/Currency", - "title": "Currency", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Customer Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/customer", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/customer/customer-accounts", - "title": "Customer Accounts", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/customer/links-to-other-modules", - "title": "Link to Modules", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+customer", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Customer Module in your customizations on the Medusa application server.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/customer/extend", - "title": "Extend Module", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+customer,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Customer Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Customer Context in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/context", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Edit Customer Profile in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/profile", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Log-out Customer in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/log-out", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Login Customer in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/login", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Customer Addresses in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/addresses", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Register Customer in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/register", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Reset Customer Password in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/reset-password", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve Logged-In Customer in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/retrieve", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Third-Party or Social Login in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/customers/third-party-login", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+customer", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Customer features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Customers Overview", - "path": "https://docs.medusajs.com/user-guide/customers", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Customer Groups", - "path": "https://docs.medusajs.com/user-guide/customers/groups", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Customers", - "path": "https://docs.medusajs.com/user-guide/customers/manage", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Customer Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/customer/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+customer", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addOrderLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCustomerAccountWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomerAccountWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCustomerAddressesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomerAddressesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCustomerGroupsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomerGroupsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCustomersWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCustomersWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCustomerAddressesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCustomerAddressesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCustomerGroupsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCustomerGroupsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCustomersWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCustomersWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "linkCustomerGroupsToCustomerWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/linkCustomerGroupsToCustomerWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "linkCustomersToCustomerGroupWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/linkCustomersToCustomerGroupWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEditAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderExchangeAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeCustomerAccountWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeCustomerAccountWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCustomerAddressesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCustomerAddressesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCustomerGroupsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCustomerGroupsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCustomersWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCustomersWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+customer", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCustomerAddressesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCustomerAddressesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCustomerGroupsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCustomerGroupsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCustomersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCustomersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCustomerAddressesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCustomerAddressesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCustomerGroupStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCustomerGroupStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCustomersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCustomersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "findOrCreateCustomerStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findOrCreateCustomerStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "linkCustomerGroupsToCustomerStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/linkCustomerGroupsToCustomerStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "linkCustomersToCustomerGroupStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/linkCustomersToCustomerGroupStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "maybeUnsetDefaultBillingAddressesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/maybeUnsetDefaultBillingAddressesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "maybeUnsetDefaultShippingAddressesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/maybeUnsetDefaultShippingAddressesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCustomerAddressesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCustomerAddressesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCustomerGroupsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCustomerGroupsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCustomersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCustomersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validateCustomerAccountCreation", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateCustomerAccountCreation", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/customer/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Store", - "autogenerate_tags": "jsSdk+storefront+customer", - "description": "The following methods or properties are used to send requests to Store API Routes related to the Customer Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "customer", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/customer", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+customer", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Customer Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "customer", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/customer", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "customerGroup", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/customerGroup", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/customer/events", - "title": "Events Reference", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/customer/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Customer Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/customer/ICustomerModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/addCustomerToGroup", - "title": "addCustomerToGroup", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/createCustomerAddresses", - "title": "createCustomerAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/createCustomerGroups", - "title": "createCustomerGroups", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/createCustomers", - "title": "createCustomers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/deleteCustomerAddresses", - "title": "deleteCustomerAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/deleteCustomerGroups", - "title": "deleteCustomerGroups", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/deleteCustomers", - "title": "deleteCustomers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/listAndCountCustomerAddresses", - "title": "listAndCountCustomerAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/listAndCountCustomerGroups", - "title": "listAndCountCustomerGroups", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/listAndCountCustomers", - "title": "listAndCountCustomers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/listCustomerAddresses", - "title": "listCustomerAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/listCustomerGroupCustomers", - "title": "listCustomerGroupCustomers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/listCustomerGroups", - "title": "listCustomerGroups", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/listCustomers", - "title": "listCustomers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/removeCustomerFromGroup", - "title": "removeCustomerFromGroup", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/restoreCustomerGroups", - "title": "restoreCustomerGroups", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/restoreCustomers", - "title": "restoreCustomers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/retrieveCustomer", - "title": "retrieveCustomer", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/retrieveCustomerGroup", - "title": "retrieveCustomerGroup", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/softDeleteCustomerGroups", - "title": "softDeleteCustomerGroups", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/softDeleteCustomers", - "title": "softDeleteCustomers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/updateCustomerAddresses", - "title": "updateCustomerAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/updateCustomerGroups", - "title": "updateCustomerGroups", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/updateCustomers", - "title": "updateCustomers", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Customer Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/customer_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/models/Customer", - "title": "Customer", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/models/CustomerAddress", - "title": "CustomerAddress", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/models/CustomerGroup", - "title": "CustomerGroup", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/customer/models/CustomerGroupCustomer", - "title": "CustomerGroupCustomer", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Fulfillment Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment/module-options", - "title": "Module Options", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "autogenerate_tags": "concept+fulfillment", - "autogenerate_as_ref": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment/concepts", - "title": "Fulfillment Concepts", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment/fulfillment-provider", - "title": "Fulfillment Provider", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment/shipping-option", - "title": "Shipping Option", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment/item-fulfillment", - "title": "Item Fulfillment", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment/links-to-other-modules", - "title": "Links to Other Modules", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Product Shipping Requirement", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/selling-products", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+fulfillment", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Fulfillment Module in your customizations on the Medusa application server.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/provider", - "title": "Create Fulfillment Provider Module", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", "path": "/integrations/guides/shipstation", - "title": "Integrate ShipStation", + "title": "ShipStation", "children": [] } ] @@ -3461,1533 +17385,22 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+fulfillment,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Fulfillment Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 3: Choose Shipping Method", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/shipping", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Implement Express Checkout with Medusa", - "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+fulfillment", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Fulfillment features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Locations & Shipping Overview", - "path": "https://docs.medusajs.com/user-guide/settings/locations-and-shipping", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Order Fulfillments", - "path": "https://docs.medusajs.com/user-guide/orders/fulfillments", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Shipping Profiles", - "path": "https://docs.medusajs.com/user-guide/settings/locations-and-shipping/shipping-profiles", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Fulfillment Module, such as data models, methods, and more. These are useful for your customizations.", + "title": "Notification", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/fulfillment/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+fulfillment", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addShippingMethodToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchShippingOptionRulesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchShippingOptionRulesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "calculateShippingOptionsPricesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/calculateShippingOptionsPricesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmClaimRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmClaimRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmExchangeRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmExchangeRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmReturnRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createAndCompleteReturnOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createAndCompleteReturnOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createLocationFulfillmentSetWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createLocationFulfillmentSetWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderShipmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderShipmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReturnFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReturnFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createServiceZonesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createServiceZonesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShipmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShipmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShippingOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShippingOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShippingProfilesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShippingProfilesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteFulfillmentSetsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteFulfillmentSetsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteServiceZonesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteServiceZonesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteShippingOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteShippingOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteShippingProfileWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteShippingProfileWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "importProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/importProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "listShippingOptionsForCartWithPricingWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/listShippingOptionsForCartWithPricingWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "markFulfillmentAsDeliveredWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/markFulfillmentAsDeliveredWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "markOrderFulfillmentAsDeliveredWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshCartItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshCartShippingMethodsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartShippingMethodsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "transferCartCustomerWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateLineItemInCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateServiceZonesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateServiceZonesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateShippingOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateShippingOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateShippingProfilesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateShippingProfilesWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+fulfillment", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "calculateShippingOptionsPricesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/calculateShippingOptionsPricesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelFulfillmentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelFulfillmentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createFulfillmentSets", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createFulfillmentSets", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createFulfillmentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createFulfillmentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReturnFulfillmentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createReturnFulfillmentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createServiceZonesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createServiceZonesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShippingOptionRulesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createShippingOptionRulesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShippingProfilesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createShippingProfilesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteFulfillmentSetsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteFulfillmentSetsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteServiceZonesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteServiceZonesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteShippingOptionRulesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteShippingOptionRulesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteShippingOptionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteShippingOptionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteShippingProfilesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteShippingProfilesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "parseProductCsvStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/parseProductCsvStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateFulfillmentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateFulfillmentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateServiceZonesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateServiceZonesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateShippingOptionRulesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateShippingOptionRulesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateShippingProfilesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateShippingProfilesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "upsertShippingOptionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/upsertShippingOptionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validateAndReturnShippingMethodsDataStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateAndReturnShippingMethodsDataStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validateCartShippingOptionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateCartShippingOptionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validateShipmentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateShipmentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validateShippingOptionPricesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateShippingOptionPricesStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Store", - "autogenerate_tags": "jsSdk+storefront+fulfillment", - "description": "The following methods or properties are used to send requests to Store API Routes related to the Fulfillment Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "fulfillment", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/fulfillment", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+fulfillment", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Fulfillment Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "fulfillment", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/fulfillment", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "fulfillmentProvider", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/fulfillmentProvider", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "fulfillmentSet", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/fulfillmentSet", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "shippingOption", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/shippingOption", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "shippingProfile", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/shippingProfile", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/fulfillment/events", - "title": "Events Reference", + "path": "/architectural-modules/notification/sendgrid", + "title": "SendGrid", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/fulfillment/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Fulfillment Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/fulfillment/IFulfillmentModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/calculateShippingOptionsPrices", - "title": "calculateShippingOptionsPrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/cancelFulfillment", - "title": "cancelFulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/createFulfillment", - "title": "createFulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/createFulfillmentSets", - "title": "createFulfillmentSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/createGeoZones", - "title": "createGeoZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/createReturnFulfillment", - "title": "createReturnFulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/createServiceZones", - "title": "createServiceZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/createShippingOptionRules", - "title": "createShippingOptionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/createShippingOptions", - "title": "createShippingOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/createShippingProfiles", - "title": "createShippingProfiles", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/deleteFulfillment", - "title": "deleteFulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/deleteFulfillmentSets", - "title": "deleteFulfillmentSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/deleteGeoZones", - "title": "deleteGeoZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/deleteServiceZones", - "title": "deleteServiceZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/deleteShippingOptionRules", - "title": "deleteShippingOptionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/deleteShippingOptionTypes", - "title": "deleteShippingOptionTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/deleteShippingOptions", - "title": "deleteShippingOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/deleteShippingProfiles", - "title": "deleteShippingProfiles", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listAndCountFulfillmentSets", - "title": "listAndCountFulfillmentSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listAndCountFulfillments", - "title": "listAndCountFulfillments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listAndCountGeoZones", - "title": "listAndCountGeoZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listAndCountServiceZones", - "title": "listAndCountServiceZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listAndCountShippingOptionRules", - "title": "listAndCountShippingOptionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listAndCountShippingOptionTypes", - "title": "listAndCountShippingOptionTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listAndCountShippingOptions", - "title": "listAndCountShippingOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listAndCountShippingProfiles", - "title": "listAndCountShippingProfiles", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listFulfillmentProviders", - "title": "listFulfillmentProviders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listFulfillmentSets", - "title": "listFulfillmentSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listFulfillments", - "title": "listFulfillments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listGeoZones", - "title": "listGeoZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listServiceZones", - "title": "listServiceZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listShippingOptionRules", - "title": "listShippingOptionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listShippingOptionTypes", - "title": "listShippingOptionTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listShippingOptions", - "title": "listShippingOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listShippingOptionsForContext", - "title": "listShippingOptionsForContext", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/listShippingProfiles", - "title": "listShippingProfiles", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/restoreFulfillmentSets", - "title": "restoreFulfillmentSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/restoreGeoZones", - "title": "restoreGeoZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/restoreServiceZones", - "title": "restoreServiceZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/restoreShippingOptions", - "title": "restoreShippingOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/restoreShippingProfiles", - "title": "restoreShippingProfiles", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveFulfillment", - "title": "retrieveFulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveFulfillmentOptions", - "title": "retrieveFulfillmentOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveFulfillmentSet", - "title": "retrieveFulfillmentSet", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveGeoZone", - "title": "retrieveGeoZone", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveServiceZone", - "title": "retrieveServiceZone", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveShippingOption", - "title": "retrieveShippingOption", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveShippingOptionRule", - "title": "retrieveShippingOptionRule", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveShippingOptionType", - "title": "retrieveShippingOptionType", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/retrieveShippingProfile", - "title": "retrieveShippingProfile", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/softDeleteFulfillmentSets", - "title": "softDeleteFulfillmentSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/softDeleteGeoZones", - "title": "softDeleteGeoZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/softDeleteServiceZones", - "title": "softDeleteServiceZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/softDeleteShippingOptions", - "title": "softDeleteShippingOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/softDeleteShippingProfiles", - "title": "softDeleteShippingProfiles", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/updateFulfillment", - "title": "updateFulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/updateFulfillmentSets", - "title": "updateFulfillmentSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/updateGeoZones", - "title": "updateGeoZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/updateServiceZones", - "title": "updateServiceZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/updateShippingOptionRules", - "title": "updateShippingOptionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/updateShippingOptions", - "title": "updateShippingOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/updateShippingProfiles", - "title": "updateShippingProfiles", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/upsertServiceZones", - "title": "upsertServiceZones", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/upsertShippingOptions", - "title": "upsertShippingOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/upsertShippingProfiles", - "title": "upsertShippingProfiles", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/validateFulfillmentData", - "title": "validateFulfillmentData", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/validateFulfillmentOption", - "title": "validateFulfillmentOption", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/validateShippingOption", - "title": "validateShippingOption", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/validateShippingOptionsForPriceCalculation", - "title": "validateShippingOptionsForPriceCalculation", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Fulfillment Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "hasTitleStyling": true, - "autogenerate_path": "/references/fulfillment_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/Fulfillment", - "title": "Fulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/FulfillmentAddress", - "title": "FulfillmentAddress", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/FulfillmentItem", - "title": "FulfillmentItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/FulfillmentLabel", - "title": "FulfillmentLabel", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/FulfillmentProvider", - "title": "FulfillmentProvider", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/FulfillmentSet", - "title": "FulfillmentSet", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/GeoZone", - "title": "GeoZone", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/ServiceZone", - "title": "ServiceZone", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/ShippingOption", - "title": "ShippingOption", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/ShippingOptionRule", - "title": "ShippingOptionRule", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/ShippingOptionType", - "title": "ShippingOptionType", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/fulfillment/models/ShippingProfile", - "title": "ShippingProfile", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Inventory Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/inventory", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "autogenerate_tags": "concept+inventory", - "autogenerate_as_ref": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/inventory/concepts", - "title": "Inventory Concepts", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/inventory/inventory-in-flows", - "title": "Inventory in Flows", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/inventory/inventory-kit", - "title": "Inventory Kit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/inventory/links-to-other-modules", - "title": "Links to Modules", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Inventory Kits", - "path": "https://docs.medusajs.com/resources/commerce-modules/inventory/inventory-kit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Product Variant Inventory", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/variant-inventory", + "path": "/integrations/guides/resend", + "title": "Resend", "children": [] } ] @@ -4996,3967 +17409,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+inventory,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Inventory Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve Product Variant's Inventory in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/inventory", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+inventory", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Inventory features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Inventory Overview", - "path": "https://docs.medusajs.com/user-guide/inventory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Inventory Items", - "path": "https://docs.medusajs.com/user-guide/inventory/inventory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Reservations", - "path": "https://docs.medusajs.com/user-guide/inventory/reservations", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Inventory Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/inventory/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+inventory", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addOrderLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchInventoryItemLevelsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchInventoryItemLevelsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "bulkCreateDeleteLevelsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/bulkCreateDeleteLevelsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderClaimWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderClaimWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderExchangeWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderExchangeWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "completeCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmClaimRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmClaimRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmExchangeRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmExchangeRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmOrderEditRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmOrderEditRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmReturnReceiveWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnReceiveWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmVariantInventoryWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmVariantInventoryWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createInventoryItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createInventoryItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createInventoryLevelsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createInventoryLevelsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReservationsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReservationsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteInventoryItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteInventoryItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteReservationsByLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteReservationsByLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteReservationsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteReservationsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEditAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderExchangeAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateInventoryItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateInventoryItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateInventoryLevelsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateInventoryLevelsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateLineItemInCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateReservationsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReservationsWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+inventory", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "adjustInventoryLevelsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/adjustInventoryLevelsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmInventoryStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/confirmInventoryStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createInventoryItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createInventoryItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createInventoryLevelsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createInventoryLevelsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReservationsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createReservationsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteInventoryItemStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteInventoryItemStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteReservationsByLineItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteReservationsByLineItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteReservationsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteReservationsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "reserveInventoryStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/reserveInventoryStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateInventoryItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateInventoryItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateInventoryLevelsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateInventoryLevelsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateReservationsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateReservationsStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/inventory/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+inventory", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Inventory Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "inventoryItem", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/inventoryItem", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "reservation", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/reservation", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/inventory/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Inventory Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/inventory_next/IInventoryService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/adjustInventory", - "title": "adjustInventory", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/confirmInventory", - "title": "confirmInventory", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/createInventoryItems", - "title": "createInventoryItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/createInventoryLevels", - "title": "createInventoryLevels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/createReservationItems", - "title": "createReservationItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/deleteInventoryItemLevelByLocationId", - "title": "deleteInventoryItemLevelByLocationId", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/deleteInventoryItems", - "title": "deleteInventoryItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/deleteInventoryLevel", - "title": "deleteInventoryLevel", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/deleteInventoryLevels", - "title": "deleteInventoryLevels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/deleteReservationItemByLocationId", - "title": "deleteReservationItemByLocationId", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/deleteReservationItems", - "title": "deleteReservationItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/deleteReservationItemsByLineItem", - "title": "deleteReservationItemsByLineItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/listAndCountInventoryItems", - "title": "listAndCountInventoryItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/listAndCountInventoryLevels", - "title": "listAndCountInventoryLevels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/listAndCountReservationItems", - "title": "listAndCountReservationItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/listInventoryItems", - "title": "listInventoryItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/listInventoryLevels", - "title": "listInventoryLevels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/listReservationItems", - "title": "listReservationItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/restoreInventoryItems", - "title": "restoreInventoryItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/restoreInventoryLevels", - "title": "restoreInventoryLevels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/restoreReservationItems", - "title": "restoreReservationItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/restoreReservationItemsByLineItem", - "title": "restoreReservationItemsByLineItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/retrieveAvailableQuantity", - "title": "retrieveAvailableQuantity", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/retrieveInventoryItem", - "title": "retrieveInventoryItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/retrieveInventoryLevel", - "title": "retrieveInventoryLevel", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/retrieveInventoryLevelByItemAndLocation", - "title": "retrieveInventoryLevelByItemAndLocation", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/retrieveReservationItem", - "title": "retrieveReservationItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/retrieveReservedQuantity", - "title": "retrieveReservedQuantity", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/retrieveStockedQuantity", - "title": "retrieveStockedQuantity", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/softDeleteInventoryItems", - "title": "softDeleteInventoryItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/softDeleteInventoryLevels", - "title": "softDeleteInventoryLevels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/softDeleteReservationItems", - "title": "softDeleteReservationItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/updateInventoryItems", - "title": "updateInventoryItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/updateInventoryLevels", - "title": "updateInventoryLevels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/updateReservationItems", - "title": "updateReservationItems", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Inventory Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/inventory_next_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/models/InventoryItem", - "title": "InventoryItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/models/InventoryLevel", - "title": "InventoryLevel", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/inventory-next/models/ReservationItem", - "title": "ReservationItem", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Order Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/concepts", - "title": "Order Concepts", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/promotion-adjustments", - "title": "Promotions Adjustments", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/tax-lines", - "title": "Tax Lines", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/transactions", - "title": "Transactions", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/order-versioning", - "title": "Order Versioning", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/return", - "title": "Return", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/exchange", - "title": "Exchange", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/claim", - "title": "Claim", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/edit", - "title": "Order Edit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/order-change", - "title": "Order Change", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/links-to-other-modules", - "title": "Links to Other Modules", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+order,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Order Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 5: Complete Cart", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Implement Express Checkout with Medusa", - "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+order", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Order features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Edit Order Items", - "path": "https://docs.medusajs.com/user-guide/orders/edit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Order Claims", - "path": "https://docs.medusajs.com/user-guide/orders/claims", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Order Details", - "path": "https://docs.medusajs.com/user-guide/orders/manage", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Order Exchanges", - "path": "https://docs.medusajs.com/user-guide/orders/exchanges", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Order Fulfillments", - "path": "https://docs.medusajs.com/user-guide/orders/fulfillments", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Order Payments", - "path": "https://docs.medusajs.com/user-guide/orders/payments", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Order Returns", - "path": "https://docs.medusajs.com/user-guide/orders/returns", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Return Reasons", - "path": "https://docs.medusajs.com/user-guide/settings/return-reasons", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Orders Overview", - "path": "https://docs.medusajs.com/user-guide/orders", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Order Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+order", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "acceptOrderTransferWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/acceptOrderTransferWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addOrderLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "archiveOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/archiveOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "beginClaimOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginClaimOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "beginExchangeOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginExchangeOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "beginOrderEditOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginOrderEditOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "beginReceiveReturnWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginReceiveReturnWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "beginReturnOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/beginReturnOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelBeginOrderClaimWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelBeginOrderClaimWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelBeginOrderEditWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelBeginOrderEditWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelBeginOrderExchangeWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelBeginOrderExchangeWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderChangeWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderChangeWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderClaimWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderClaimWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderExchangeWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderExchangeWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderTransferRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderTransferRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelReturnReceiveWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelReturnReceiveWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelReturnRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelReturnRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelReturnWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelReturnWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "capturePaymentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/capturePaymentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "completeCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "completeOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmClaimRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmClaimRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmExchangeRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmExchangeRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmOrderEditRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmOrderEditRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmReturnReceiveWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnReceiveWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmReturnRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createAndCompleteReturnOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createAndCompleteReturnOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createClaimShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createClaimShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createExchangeShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createExchangeShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderChangeWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderChangeWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderEditShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderEditShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderFulfillmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderFulfillmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderShipmentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderShipmentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReturnReasonsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReturnReasonsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReturnShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReturnShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "declineOrderChangeWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/declineOrderChangeWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "declineOrderTransferRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/declineOrderTransferRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteOrderChangeActionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteOrderChangeActionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteOrderChangeWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteOrderChangeWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteReturnReasonsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteReturnReasonsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "dismissItemReturnRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/dismissItemReturnRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "markPaymentCollectionAsPaid", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/markPaymentCollectionAsPaid", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimRequestItemReturnWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimRequestItemReturnWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEditAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEditUpdateItemQuantityWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditUpdateItemQuantityWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderExchangeAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderExchangeRequestItemReturnWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeRequestItemReturnWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "processPaymentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/processPaymentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "receiveItemReturnRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/receiveItemReturnRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refundPaymentsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refundPaymentsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refundPaymentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refundPaymentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeAddItemClaimActionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeAddItemClaimActionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeClaimShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeClaimShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeExchangeShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeExchangeShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeItemClaimActionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemClaimActionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeItemExchangeActionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemExchangeActionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeItemOrderEditActionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemOrderEditActionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeItemReceiveReturnActionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemReceiveReturnActionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeItemReturnActionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeItemReturnActionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeOrderEditShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeOrderEditShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeReturnShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeReturnShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "requestItemReturnWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/requestItemReturnWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "requestOrderEditRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/requestOrderEditRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "requestOrderTransferWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/requestOrderTransferWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateClaimAddItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateClaimAddItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateClaimItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateClaimItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateClaimShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateClaimShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateExchangeAddItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateExchangeAddItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateExchangeShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateExchangeShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderChangeActionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderChangeActionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderChangesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderChangesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderEditAddItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderEditAddItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderEditItemQuantityWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderEditItemQuantityWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderEditShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderEditShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderTaxLinesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderTaxLinesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateReceiveItemReturnRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReceiveItemReturnRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateRequestItemReturnWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRequestItemReturnWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateReturnReasonsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReturnReasonsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateReturnShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReturnShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateReturnWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateReturnWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+order", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addOrderTransactionStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/addOrderTransactionStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "archiveOrdersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/archiveOrdersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderChangeStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderChangeStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderClaimStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderClaimStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderExchangeStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderExchangeStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderFulfillmentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderFulfillmentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderReturnStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrderReturnStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrdersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelOrdersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "completeOrdersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/completeOrdersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCompleteReturnStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCompleteReturnStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderChangeStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderChangeStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderClaimItemsFromActionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderClaimItemsFromActionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderClaimsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderClaimsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderExchangeItemsFromActionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderExchangeItemsFromActionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderExchangesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderExchangesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderLineItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrderLineItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrdersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createOrdersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReturnReasonsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createReturnReasonsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReturnsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createReturnsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "declineOrderChangeStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/declineOrderChangeStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteClaimsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteClaimsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteExchangesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteExchangesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteOrderChangeActionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteOrderChangeActionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteOrderChangesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteOrderChangesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteOrderShippingMethods", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteOrderShippingMethods", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteReturnReasonStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteReturnReasonStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteReturnsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteReturnsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "previewOrderChangeStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/previewOrderChangeStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "registerOrderChangesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/registerOrderChangesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "registerOrderFulfillmentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/registerOrderFulfillmentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "registerOrderShipmentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/registerOrderShipmentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "setOrderTaxLinesForItemsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setOrderTaxLinesForItemsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderChangeActionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateOrderChangeActionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderChangesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateOrderChangesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderShippingMethodsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateOrderShippingMethodsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrdersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateOrdersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateReturnReasonsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateReturnReasonsStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Store", - "autogenerate_tags": "jsSdk+storefront+order", - "description": "The following methods or properties are used to send requests to Store API Routes related to the Order Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "order", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/order", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+order", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Order Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "claim", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/claim", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "draftOrder", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/draftOrder", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "exchange", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/exchange", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "order", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/order", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEdit", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/orderEdit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refundReason", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/refundReason", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "return", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/return", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "returnReason", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/returnReason", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/events", - "title": "Events Reference", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/order/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Order Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/order/IOrderModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/addOrderAction", - "title": "addOrderAction", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/addOrderTransactions", - "title": "addOrderTransactions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/applyPendingOrderActions", - "title": "applyPendingOrderActions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/archive", - "title": "archive", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/cancel", - "title": "cancel", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/cancelClaim", - "title": "cancelClaim", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/cancelExchange", - "title": "cancelExchange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/cancelFulfillment", - "title": "cancelFulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/cancelOrderChange", - "title": "cancelOrderChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/cancelReturn", - "title": "cancelReturn", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/completeOrder", - "title": "completeOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/confirmOrderChange", - "title": "confirmOrderChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createClaim", - "title": "createClaim", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createExchange", - "title": "createExchange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderAddresses", - "title": "createOrderAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderChange", - "title": "createOrderChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderClaimItems", - "title": "createOrderClaimItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderClaims", - "title": "createOrderClaims", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderCreditLines", - "title": "createOrderCreditLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderExchangeItems", - "title": "createOrderExchangeItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderExchanges", - "title": "createOrderExchanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderLineItemAdjustments", - "title": "createOrderLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderLineItemTaxLines", - "title": "createOrderLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderLineItems", - "title": "createOrderLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderShippingMethodAdjustments", - "title": "createOrderShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderShippingMethodTaxLines", - "title": "createOrderShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrderShippingMethods", - "title": "createOrderShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createOrders", - "title": "createOrders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createReturn", - "title": "createReturn", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createReturnItems", - "title": "createReturnItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createReturnReasons", - "title": "createReturnReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/createReturns", - "title": "createReturns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/declineOrderChange", - "title": "declineOrderChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderAddresses", - "title": "deleteOrderAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderChangeActions", - "title": "deleteOrderChangeActions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderChanges", - "title": "deleteOrderChanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderClaimItemImages", - "title": "deleteOrderClaimItemImages", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderClaimItems", - "title": "deleteOrderClaimItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderClaims", - "title": "deleteOrderClaims", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderExchangeItems", - "title": "deleteOrderExchangeItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderExchanges", - "title": "deleteOrderExchanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderLineItemAdjustments", - "title": "deleteOrderLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderLineItemTaxLines", - "title": "deleteOrderLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderLineItems", - "title": "deleteOrderLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderShippingMethodAdjustments", - "title": "deleteOrderShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderShippingMethodTaxLines", - "title": "deleteOrderShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderShippingMethods", - "title": "deleteOrderShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrderTransactions", - "title": "deleteOrderTransactions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteOrders", - "title": "deleteOrders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteReturnItems", - "title": "deleteReturnItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteReturnReasons", - "title": "deleteReturnReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/deleteReturns", - "title": "deleteReturns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listAndCountOrderClaims", - "title": "listAndCountOrderClaims", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listAndCountOrderExchanges", - "title": "listAndCountOrderExchanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listAndCountOrders", - "title": "listAndCountOrders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listAndCountReturns", - "title": "listAndCountReturns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderAddresses", - "title": "listOrderAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderChangeActions", - "title": "listOrderChangeActions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderChanges", - "title": "listOrderChanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderClaims", - "title": "listOrderClaims", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderExchanges", - "title": "listOrderExchanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderLineItemAdjustments", - "title": "listOrderLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderLineItemTaxLines", - "title": "listOrderLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderLineItems", - "title": "listOrderLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderShippingMethodAdjustments", - "title": "listOrderShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderShippingMethodTaxLines", - "title": "listOrderShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderShippingMethods", - "title": "listOrderShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrderTransactions", - "title": "listOrderTransactions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listOrders", - "title": "listOrders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listReturnReasons", - "title": "listReturnReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/listReturns", - "title": "listReturns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/previewOrderChange", - "title": "previewOrderChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/receiveReturn", - "title": "receiveReturn", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/registerDelivery", - "title": "registerDelivery", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/registerFulfillment", - "title": "registerFulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/registerOrderChange", - "title": "registerOrderChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/registerShipment", - "title": "registerShipment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderAddresses", - "title": "restoreOrderAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderChangeActions", - "title": "restoreOrderChangeActions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderChanges", - "title": "restoreOrderChanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderClaims", - "title": "restoreOrderClaims", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderExchanges", - "title": "restoreOrderExchanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderLineItemAdjustments", - "title": "restoreOrderLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderLineItemTaxLines", - "title": "restoreOrderLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderLineItems", - "title": "restoreOrderLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderShippingMethodAdjustments", - "title": "restoreOrderShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderShippingMethodTaxLines", - "title": "restoreOrderShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderShippingMethods", - "title": "restoreOrderShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrderTransactions", - "title": "restoreOrderTransactions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreOrders", - "title": "restoreOrders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreReturnReasons", - "title": "restoreReturnReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/restoreReturns", - "title": "restoreReturns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/retrieveOrder", - "title": "retrieveOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/retrieveOrderChange", - "title": "retrieveOrderChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/retrieveOrderChangeAction", - "title": "retrieveOrderChangeAction", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/retrieveOrderClaim", - "title": "retrieveOrderClaim", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/retrieveOrderExchange", - "title": "retrieveOrderExchange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/retrieveOrderLineItem", - "title": "retrieveOrderLineItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/retrieveReturn", - "title": "retrieveReturn", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/retrieveReturnReason", - "title": "retrieveReturnReason", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/revertLastVersion", - "title": "revertLastVersion", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/setOrderLineItemAdjustments", - "title": "setOrderLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/setOrderLineItemTaxLines", - "title": "setOrderLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/setOrderShippingMethodAdjustments", - "title": "setOrderShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/setOrderShippingMethodTaxLines", - "title": "setOrderShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderAddresses", - "title": "softDeleteOrderAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderChangeActions", - "title": "softDeleteOrderChangeActions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderChanges", - "title": "softDeleteOrderChanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderClaims", - "title": "softDeleteOrderClaims", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderExchanges", - "title": "softDeleteOrderExchanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderLineItemAdjustments", - "title": "softDeleteOrderLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderLineItemTaxLines", - "title": "softDeleteOrderLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderLineItems", - "title": "softDeleteOrderLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderShippingMethodAdjustments", - "title": "softDeleteOrderShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderShippingMethodTaxLines", - "title": "softDeleteOrderShippingMethodTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderShippingMethods", - "title": "softDeleteOrderShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrderTransactions", - "title": "softDeleteOrderTransactions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteOrders", - "title": "softDeleteOrders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteReturnReasons", - "title": "softDeleteReturnReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/softDeleteReturns", - "title": "softDeleteReturns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/undoLastChange", - "title": "undoLastChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrderAddresses", - "title": "updateOrderAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrderChangeActions", - "title": "updateOrderChangeActions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrderChanges", - "title": "updateOrderChanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrderClaims", - "title": "updateOrderClaims", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrderExchanges", - "title": "updateOrderExchanges", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrderItem", - "title": "updateOrderItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrderLineItems", - "title": "updateOrderLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrderShippingMethods", - "title": "updateOrderShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateOrders", - "title": "updateOrders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateReturnReasons", - "title": "updateReturnReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/updateReturns", - "title": "updateReturns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/upsertOrderLineItemAdjustments", - "title": "upsertOrderLineItemAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/upsertOrderLineItemTaxLines", - "title": "upsertOrderLineItemTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/upsertOrderShippingMethodAdjustments", - "title": "upsertOrderShippingMethodAdjustments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/upsertOrderShippingMethodTaxLines", - "title": "upsertOrderShippingMethodTaxLines", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Order Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "hasTitleStyling": true, - "autogenerate_path": "/references/order_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/Order", - "title": "Order", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderAddress", - "title": "OrderAddress", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderChange", - "title": "OrderChange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderChangeAction", - "title": "OrderChangeAction", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderClaim", - "title": "OrderClaim", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderClaimItem", - "title": "OrderClaimItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderClaimItemImage", - "title": "OrderClaimItemImage", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderCreditLine", - "title": "OrderCreditLine", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderExchange", - "title": "OrderExchange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderExchangeItem", - "title": "OrderExchangeItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderItem", - "title": "OrderItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderLineItem", - "title": "OrderLineItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderLineItemAdjustment", - "title": "OrderLineItemAdjustment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderLineItemTaxLine", - "title": "OrderLineItemTaxLine", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderShipping", - "title": "OrderShipping", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderShippingMethod", - "title": "OrderShippingMethod", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderShippingMethodAdjustment", - "title": "OrderShippingMethodAdjustment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderShippingMethodTaxLine", - "title": "OrderShippingMethodTaxLine", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderSummary", - "title": "OrderSummary", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/OrderTransaction", - "title": "OrderTransaction", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/Return", - "title": "Return", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/ReturnItem", - "title": "ReturnItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/order/models/ReturnReason", - "title": "ReturnReason", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Payment Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/module-options", - "title": "Module Options", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/payment-collection", - "title": "Payment Collections", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/payment-session", - "title": "Payment Session", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/payment", - "title": "Payment", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/payment-provider", - "title": "Payment Provider Module", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/account-holder", - "title": "Account Holder", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/webhook-events", - "title": "Webhook Events", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/links-to-other-modules", - "title": "Links to Other Modules", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+payment", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Payment Module in your customizations on the Medusa application server.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/payment-flow", - "title": "Accept Payment Flow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/provider", - "title": "Create Payment Provider", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+payment,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Payment Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 4: Choose Payment Provider", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/payment", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Checkout Step 5: Complete Cart", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Customize the Stripe Integration in the Next.js Starter", - "path": "https://docs.medusajs.com/resources/nextjs-starter/guides/customize-stripe", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Implement Express Checkout with Medusa", - "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Payment with Stripe in React Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/checkout/payment/stripe", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+payment", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Payment features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Order Payments", - "path": "https://docs.medusajs.com/user-guide/orders/payments", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Providers", - "initialOpen": false, + "title": "Payment", "children": [ { "loaded": true, @@ -8967,944 +17420,38 @@ export const generatedSidebar = [ "children": [] } ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "plugins", + "title": "Plugins", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Overview", + "path": "/plugins", + "children": [] }, { "loaded": true, "isPathHref": true, "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Payment Module, such as data models, methods, and more. These are useful for your customizations.", + "title": "Guides", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/payment/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+payment", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addShippingMethodToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/cancelOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "capturePaymentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/capturePaymentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "completeCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/completeCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmClaimRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmClaimRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmExchangeRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmExchangeRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmOrderEditRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmOrderEditRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "confirmReturnRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/confirmReturnRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderPaymentCollectionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderPaymentCollectionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrUpdateOrderPaymentCollectionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrUpdateOrderPaymentCollectionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPaymentCollectionForCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPaymentCollectionForCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPaymentSessionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPaymentSessionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createRefundReasonsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createRefundReasonsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createRegionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePaymentSessionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePaymentSessionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteRefundReasonsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteRefundReasonsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "markPaymentCollectionAsPaid", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/markPaymentCollectionAsPaid", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "processPaymentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/processPaymentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshCartItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshPaymentCollectionForCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshPaymentCollectionForCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refundPaymentsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refundPaymentsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refundPaymentWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refundPaymentWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "requestOrderEditRequestWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/requestOrderEditRequestWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "transferCartCustomerWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateLineItemInCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateRefundReasonsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRefundReasonsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRegionsWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+payment", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "authorizePaymentSessionStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/authorizePaymentSessionStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "cancelPaymentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/cancelPaymentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "capturePaymentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/capturePaymentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPaymentAccountHolderStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPaymentAccountHolderStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPaymentCollectionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPaymentCollectionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPaymentSessionStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPaymentSessionStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createRefundReasonStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createRefundReasonStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePaymentSessionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deletePaymentSessionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteRefundReasonsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteRefundReasonsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refundPaymentsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/refundPaymentsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refundPaymentStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/refundPaymentStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "setRegionsPaymentProvidersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setRegionsPaymentProvidersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePaymentCollectionStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePaymentCollectionStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateRefundReasonsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateRefundReasonsStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Store", - "autogenerate_tags": "jsSdk+storefront+payment", - "description": "The following methods or properties are used to send requests to Store API Routes related to the Payment Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "payment", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/payment", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+payment", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Payment Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "payment", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/payment", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "paymentCollection", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/paymentCollection", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/events", - "title": "Events Reference", + "title": "Wishlist", + "path": "/plugins/guides/wishlist", + "description": "Learn how to build a wishlist plugin.", "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Payment Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/payment/IPaymentModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/authorizePaymentSession", - "title": "authorizePaymentSession", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/cancelPayment", - "title": "cancelPayment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/capturePayment", - "title": "capturePayment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/completePaymentCollections", - "title": "completePaymentCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/createAccountHolder", - "title": "createAccountHolder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/createPaymentCollections", - "title": "createPaymentCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/createPaymentMethods", - "title": "createPaymentMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/createPaymentSession", - "title": "createPaymentSession", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/createRefundReasons", - "title": "createRefundReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/deleteAccountHolder", - "title": "deleteAccountHolder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/deleteCaptures", - "title": "deleteCaptures", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/deletePaymentCollections", - "title": "deletePaymentCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/deletePaymentSession", - "title": "deletePaymentSession", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/deleteRefundReasons", - "title": "deleteRefundReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/deleteRefunds", - "title": "deleteRefunds", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/getWebhookActionAndData", - "title": "getWebhookActionAndData", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listAndCountPaymentCollections", - "title": "listAndCountPaymentCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listAndCountPaymentMethods", - "title": "listAndCountPaymentMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listAndCountPaymentProviders", - "title": "listAndCountPaymentProviders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listCaptures", - "title": "listCaptures", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listPaymentCollections", - "title": "listPaymentCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listPaymentMethods", - "title": "listPaymentMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listPaymentProviders", - "title": "listPaymentProviders", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listPaymentSessions", - "title": "listPaymentSessions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listPayments", - "title": "listPayments", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listRefundReasons", - "title": "listRefundReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/listRefunds", - "title": "listRefunds", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/refundPayment", - "title": "refundPayment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/restorePaymentCollections", - "title": "restorePaymentCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/restoreRefundReasons", - "title": "restoreRefundReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/retrievePaymentCollection", - "title": "retrievePaymentCollection", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/retrievePaymentSession", - "title": "retrievePaymentSession", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/softDeletePaymentCollections", - "title": "softDeletePaymentCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/softDeleteRefundReasons", - "title": "softDeleteRefundReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/updateAccountHolder", - "title": "updateAccountHolder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/updatePayment", - "title": "updatePayment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/updatePaymentCollections", - "title": "updatePaymentCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/updatePaymentSession", - "title": "updatePaymentSession", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/updateRefundReasons", - "title": "updateRefundReasons", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/upsertPaymentCollections", - "title": "upsertPaymentCollections", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Payment Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/payment_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models/AccountHolder", - "title": "AccountHolder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models/Capture", - "title": "Capture", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models/Payment", - "title": "Payment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models/PaymentCollection", - "title": "PaymentCollection", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models/PaymentProvider", - "title": "PaymentProvider", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models/PaymentSession", - "title": "PaymentSession", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models/Refund", - "title": "Refund", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/payment/models/RefundReason", - "title": "RefundReason", - "description": "", - "children": [] - } - ] - } - ] } ] } @@ -9913,15 +17460,15 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Pricing Module", - "isChildSidebar": true, + "type": "sidebar", + "sidebar_id": "storefront-development", + "title": "Storefront Development", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/pricing", + "path": "/storefront-development", "title": "Overview", "children": [] }, @@ -9932,47 +17479,22 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Concepts", - "initialOpen": false, + "title": "General", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/pricing/concepts", - "title": "Pricing Concepts", + "path": "/storefront-development/tips", + "title": "Tips", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/pricing/price-rules", - "title": "Price Rules", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/pricing/price-calculation", - "title": "Prices Calculation", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/pricing/tax-inclusive-pricing", - "title": "Tax-Inclusive Pricing", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/pricing/links-to-other-modules", - "title": "Links to Other Modules", + "path": "/storefront-development/publishable-api-keys", + "title": "Publishable API Key", "children": [] } ] @@ -9981,1823 +17503,122 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+pricing", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Pricing Module in your customizations on the Medusa application server.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Get Variant Price with Taxes", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price-with-taxes", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Get Variant Prices", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Implement Custom Line Item Pricing in Medusa", - "path": "https://docs.medusajs.com/resources/examples/guides/custom-item-price", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+pricing,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Pricing Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Example: Show Price with Taxes", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/tax-price", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Example: Show Sale Price", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/sale-price", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Example: Show Variant's Price", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/show-price", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve Product Variant's Prices in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+pricing", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Pricing features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Create a Price List", - "path": "https://docs.medusajs.com/user-guide/price-lists/create", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Price Lists", - "path": "https://docs.medusajs.com/user-guide/price-lists/manage", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Price Lists Overview", - "path": "https://docs.medusajs.com/user-guide/price-lists", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Pricing Module, such as data models, methods, and more. These are useful for your customizations.", + "title": "Examples", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/pricing/workflows", - "title": "Workflows", - "hideChildren": true, + "path": "/storefront-development/guides/express-checkout", + "title": "Express Checkout Storefront", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Regions", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/regions", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/regions/list", + "title": "List Regions", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/regions/store-retrieve-region", + "title": "Store and Retrieve Regions", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/regions/context", + "title": "Region React Context", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Products", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/products/list", + "title": "List Products", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/products/retrieve", + "title": "Retrieve a Product", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/products/variants", + "title": "Select a Variant", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/products/price", + "title": "Retrieve Variant Prices", + "autogenerate_path": "storefront-development/products/price/examples", "children": [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+pricing", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchPriceListPricesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchPriceListPricesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPriceListPricesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPriceListPricesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPriceListsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPriceListsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPricePreferencesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPricePreferencesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createRegionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShippingOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShippingOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createStoresWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createStoresWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePriceListsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePriceListsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePricePreferencesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePricePreferencesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removePriceListPricesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removePriceListPricesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePriceListPricesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePriceListPricesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePriceListsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePriceListsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePricePreferencesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePricePreferencesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRegionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateShippingOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateShippingOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateStoresWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateStoresWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "upsertVariantPricesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/upsertVariantPricesWorkflow", - "children": [] - } - ] + "type": "link", + "path": "/storefront-development/products/price/examples/show-price", + "title": "Example: Show Variant's Price", + "description": "", + "children": [] }, { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+pricing", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPriceListPricesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPriceListPricesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPriceListsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPriceListsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPricePreferencesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPricePreferencesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPriceSetsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPriceSetsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShippingOptionsPriceSetsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createShippingOptionsPriceSetsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePriceListsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deletePriceListsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePricePreferencesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deletePricePreferencesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removePriceListPricesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removePriceListPricesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "setShippingOptionsPricesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/setShippingOptionsPricesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePriceListPricesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePriceListPricesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePriceListsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePriceListsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePricePreferencesAsArrayStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePricePreferencesAsArrayStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePricePreferencesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePricePreferencesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePriceSetsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePriceSetsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validatePriceListsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validatePriceListsStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/pricing/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+pricing", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Pricing Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "priceList", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/priceList", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "pricePreference", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/pricePreference", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/pricing/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Pricing Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/pricing/IPricingModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/addPriceListPrices", - "title": "addPriceListPrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/addPrices", - "title": "addPrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/calculatePrices", - "title": "calculatePrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/createPriceLists", - "title": "createPriceLists", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/createPricePreferences", - "title": "createPricePreferences", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/createPriceRules", - "title": "createPriceRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/createPriceSets", - "title": "createPriceSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/deletePriceListRules", - "title": "deletePriceListRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/deletePriceLists", - "title": "deletePriceLists", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/deletePricePreferences", - "title": "deletePricePreferences", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/deletePriceRules", - "title": "deletePriceRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/deletePriceSets", - "title": "deletePriceSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listAndCountPriceListRules", - "title": "listAndCountPriceListRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listAndCountPriceLists", - "title": "listAndCountPriceLists", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listAndCountPriceRules", - "title": "listAndCountPriceRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listAndCountPriceSets", - "title": "listAndCountPriceSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listAndCountPrices", - "title": "listAndCountPrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listPriceListRules", - "title": "listPriceListRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listPriceLists", - "title": "listPriceLists", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listPricePreferences", - "title": "listPricePreferences", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listPriceRules", - "title": "listPriceRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listPriceSets", - "title": "listPriceSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/listPrices", - "title": "listPrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/removePriceListRules", - "title": "removePriceListRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/removePrices", - "title": "removePrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/restorePriceLists", - "title": "restorePriceLists", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/restorePricePreferences", - "title": "restorePricePreferences", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/restorePrices", - "title": "restorePrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/retrievePriceList", - "title": "retrievePriceList", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/retrievePriceListRule", - "title": "retrievePriceListRule", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/retrievePricePreference", - "title": "retrievePricePreference", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/retrievePriceRule", - "title": "retrievePriceRule", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/retrievePriceSet", - "title": "retrievePriceSet", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/setPriceListRules", - "title": "setPriceListRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/softDeletePriceLists", - "title": "softDeletePriceLists", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/softDeletePricePreferences", - "title": "softDeletePricePreferences", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/softDeletePrices", - "title": "softDeletePrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/updatePriceListPrices", - "title": "updatePriceListPrices", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/updatePriceLists", - "title": "updatePriceLists", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/updatePricePreferences", - "title": "updatePricePreferences", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/updatePriceRules", - "title": "updatePriceRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/updatePriceSets", - "title": "updatePriceSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/upsertPricePreferences", - "title": "upsertPricePreferences", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/upsertPriceSets", - "title": "upsertPriceSets", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Pricing Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "hasTitleStyling": true, - "autogenerate_path": "/references/pricing_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/models/Price", - "title": "Price", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/models/PriceList", - "title": "PriceList", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/models/PriceListRule", - "title": "PriceListRule", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/models/PricePreference", - "title": "PricePreference", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/models/PriceRule", - "title": "PriceRule", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/pricing/models/PriceSet", - "title": "PriceSet", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Product Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "autogenerate_tags": "concept+product", - "autogenerate_as_ref": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/variant-inventory", - "title": "Variant Inventory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/selling-products", - "title": "Selling Use Cases", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/links-to-other-modules", - "title": "Links to Other Modules", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Inventory Kits", - "path": "https://docs.medusajs.com/resources/commerce-modules/inventory/inventory-kit", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+product", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Product Module in your customizations on the Medusa application server.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/extend", - "title": "Extend Module", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/guides/price-with-taxes", - "title": "Get Variant Price with Taxes", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Get Variant Price with Taxes", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price-with-taxes", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/guides/price", - "title": "Get Variant Prices", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Get Variant Prices", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+product,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Product Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Example: Show Price with Taxes", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/tax-price", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Example: Show Sale Price", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/sale-price", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Example: Show Variant's Price", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/show-price", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Implement Express Checkout with Medusa", - "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "List Product Categories in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/categories/list", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "List Product Collections in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/collections/list", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "List Products in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/list", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve a Category in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/categories/retrieve", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve a Category's Products in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/categories/products", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve a Collection in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/collections/retrieve", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve a Collection's Products in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/collections/products", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve a Product in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/retrieve", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve Nested Categories in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/categories/nested-categories", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve Product Variant's Inventory in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/inventory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Retrieve Product Variant's Prices in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Select Product Variants in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/products/variants", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+product", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Product features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Create Bundle Product", - "path": "https://docs.medusajs.com/user-guide/products/create/bundle", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Create Multi-Part Product", - "path": "https://docs.medusajs.com/user-guide/products/create/multi-part", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Create Product", - "path": "https://docs.medusajs.com/user-guide/products/create", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Edit Product", - "path": "https://docs.medusajs.com/user-guide/products/edit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Export Products", - "path": "https://docs.medusajs.com/user-guide/products/export", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Import Products", - "path": "https://docs.medusajs.com/user-guide/products/import", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Product Categories", - "path": "https://docs.medusajs.com/user-guide/products/categories", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Product Collections", - "path": "https://docs.medusajs.com/user-guide/products/collections", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Product Tags", - "path": "https://docs.medusajs.com/user-guide/settings/product-tags", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Product Types", - "path": "https://docs.medusajs.com/user-guide/settings/product-types", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Product Variants", - "path": "https://docs.medusajs.com/user-guide/products/variants", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Products Overview", - "path": "https://docs.medusajs.com/user-guide/products", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Product Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+product", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchLinkProductsToCategoryWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchLinkProductsToCategoryWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchLinkProductsToCollectionWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchLinkProductsToCollectionWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCollectionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCollectionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductCategoriesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductCategoriesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductTagsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductTagsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductTypesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductTypesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCollectionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCollectionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductCategoriesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductCategoriesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductTagsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductTagsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductTypesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductTypesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteProductVariantsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "importProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/importProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCollectionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCollectionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductCategoriesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductCategoriesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductTagsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductTagsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductTypesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductTypesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductVariantsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateProductVariantsWorkflow", - "children": [] - } - ] + "type": "link", + "path": "/storefront-development/products/price/examples/sale-price", + "title": "Example: Show Sale Price", + "description": "", + "children": [] }, { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+product", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchLinkProductsToCategoryStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/batchLinkProductsToCategoryStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchLinkProductsToCollectionStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/batchLinkProductsToCollectionStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCollectionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCollectionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductCategoriesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductCategoriesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductOptionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductOptionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductTagsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductTagsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductTypesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductTypesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createProductVariantsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createProductVariantsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCollectionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCollectionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductCategoriesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductCategoriesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductOptionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductOptionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductTagsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductTagsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductTypesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductTypesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteProductVariantsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteProductVariantsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "getProductsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getProductsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "groupProductsForBatchStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/groupProductsForBatchStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "parseProductCsvStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/parseProductCsvStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCollectionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCollectionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductCategoriesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductCategoriesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductOptionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductOptionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductTagsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductTagsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductTypesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductTypesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateProductVariantsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateProductVariantsStep", - "children": [] - } - ] + "type": "link", + "path": "/storefront-development/products/price/examples/tax-price", + "title": "Example: Show Price with Taxes", + "description": "", + "children": [] } ] }, @@ -11805,943 +17626,8 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/product/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Store", - "autogenerate_tags": "jsSdk+storefront+product", - "description": "The following methods or properties are used to send requests to Store API Routes related to the Product Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "category", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/category", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "collection", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/collection", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "product", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/product", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+product", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Product Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "product", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/product", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "productCategory", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productCategory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "productCollection", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productCollection", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "productTag", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productTag", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "productType", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productType", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "productVariant", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/productVariant", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/events", - "title": "Events Reference", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/product/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Product Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/product/IProductModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/createProductCategories", - "title": "createProductCategories", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/createProductCollections", - "title": "createProductCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/createProductOptionValues", - "title": "createProductOptionValues", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/createProductOptions", - "title": "createProductOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/createProductTags", - "title": "createProductTags", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/createProductTypes", - "title": "createProductTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/createProductVariants", - "title": "createProductVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/createProducts", - "title": "createProducts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/deleteProductCategories", - "title": "deleteProductCategories", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/deleteProductCollections", - "title": "deleteProductCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/deleteProductOptionValues", - "title": "deleteProductOptionValues", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/deleteProductOptions", - "title": "deleteProductOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/deleteProductTags", - "title": "deleteProductTags", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/deleteProductTypes", - "title": "deleteProductTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/deleteProductVariants", - "title": "deleteProductVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/deleteProducts", - "title": "deleteProducts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listAndCountProductCategories", - "title": "listAndCountProductCategories", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listAndCountProductCollections", - "title": "listAndCountProductCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listAndCountProductOptionValues", - "title": "listAndCountProductOptionValues", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listAndCountProductOptions", - "title": "listAndCountProductOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listAndCountProductTags", - "title": "listAndCountProductTags", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listAndCountProductTypes", - "title": "listAndCountProductTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listAndCountProductVariants", - "title": "listAndCountProductVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listAndCountProducts", - "title": "listAndCountProducts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listProductCategories", - "title": "listProductCategories", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listProductCollections", - "title": "listProductCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listProductOptionValues", - "title": "listProductOptionValues", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listProductOptions", - "title": "listProductOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listProductTags", - "title": "listProductTags", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listProductTypes", - "title": "listProductTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listProductVariants", - "title": "listProductVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/listProducts", - "title": "listProducts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/restoreProductCategories", - "title": "restoreProductCategories", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/restoreProductCollections", - "title": "restoreProductCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/restoreProductOptionValues", - "title": "restoreProductOptionValues", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/restoreProductOptions", - "title": "restoreProductOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/restoreProductTags", - "title": "restoreProductTags", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/restoreProductTypes", - "title": "restoreProductTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/restoreProductVariants", - "title": "restoreProductVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/restoreProducts", - "title": "restoreProducts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/retrieveProduct", - "title": "retrieveProduct", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/retrieveProductCategory", - "title": "retrieveProductCategory", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/retrieveProductCollection", - "title": "retrieveProductCollection", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/retrieveProductOption", - "title": "retrieveProductOption", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/retrieveProductTag", - "title": "retrieveProductTag", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/retrieveProductType", - "title": "retrieveProductType", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/retrieveProductVariant", - "title": "retrieveProductVariant", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/softDeleteProductCategories", - "title": "softDeleteProductCategories", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/softDeleteProductCollections", - "title": "softDeleteProductCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/softDeleteProductOptionValues", - "title": "softDeleteProductOptionValues", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/softDeleteProductOptions", - "title": "softDeleteProductOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/softDeleteProductTags", - "title": "softDeleteProductTags", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/softDeleteProductTypes", - "title": "softDeleteProductTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/softDeleteProductVariants", - "title": "softDeleteProductVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/softDeleteProducts", - "title": "softDeleteProducts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/updateProductCategories", - "title": "updateProductCategories", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/updateProductCollections", - "title": "updateProductCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/updateProductOptionValues", - "title": "updateProductOptionValues", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/updateProductOptions", - "title": "updateProductOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/updateProductTags", - "title": "updateProductTags", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/updateProductTypes", - "title": "updateProductTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/updateProductVariants", - "title": "updateProductVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/updateProducts", - "title": "updateProducts", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/upsertProductCategories", - "title": "upsertProductCategories", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/upsertProductCollections", - "title": "upsertProductCollections", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/upsertProductOptions", - "title": "upsertProductOptions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/upsertProductTags", - "title": "upsertProductTags", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/upsertProductTypes", - "title": "upsertProductTypes", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/upsertProductVariants", - "title": "upsertProductVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/upsertProducts", - "title": "upsertProducts", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Product Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "hasTitleStyling": true, - "autogenerate_path": "/references/product_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/Product", - "title": "Product", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/ProductCategory", - "title": "ProductCategory", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/ProductCollection", - "title": "ProductCollection", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/ProductImage", - "title": "ProductImage", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/ProductOption", - "title": "ProductOption", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/ProductOptionValue", - "title": "ProductOptionValue", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/ProductTag", - "title": "ProductTag", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/ProductType", - "title": "ProductType", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/product/models/ProductVariant", - "title": "ProductVariant", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Promotion Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/promotion", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/promotion/concepts", - "title": "Promotion", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/promotion/application-method", - "title": "Application Method", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/promotion/campaign", - "title": "Campaign", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/promotion/actions", - "title": "Promotion Actions", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/promotion/links-to-other-modules", - "title": "Links to Modules", + "path": "/storefront-development/products/inventory", + "title": "Retrieve Variant Inventory", "children": [] } ] @@ -12750,19 +17636,38 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+promotion", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Promotion Module in your customizations on the Medusa application server.", + "title": "Product Categories", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/promotion/extend", - "title": "Extend Module", + "path": "/storefront-development/products/categories/list", + "title": "List Categories", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/products/categories/retrieve", + "title": "Retrieve a Category", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/products/categories/products", + "title": "Retrieve a Category's Products", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/products/categories/nested-categories", + "title": "Retrieve Nested Categories", "children": [] } ] @@ -12771,43 +17676,30 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+promotion", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Promotion features in the Medusa Admin dashboard.", + "title": "Product Collections", "children": [ { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "Create a Promotion", - "path": "https://docs.medusajs.com/user-guide/promotions/create", + "type": "link", + "path": "/storefront-development/products/collections/list", + "title": "List Collections", "children": [] }, { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "Manage Campaigns", - "path": "https://docs.medusajs.com/user-guide/promotions/campaigns", + "type": "link", + "path": "/storefront-development/products/collections/retrieve", + "title": "Retrieve a Collection", "children": [] }, { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "Manage Promotions", - "path": "https://docs.medusajs.com/user-guide/promotions/manage", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Promotions Overview", - "path": "https://docs.medusajs.com/user-guide/promotions", + "type": "link", + "path": "/storefront-development/products/collections/products", + "title": "Retrieve a Collection's Products", "children": [] } ] @@ -12816,768 +17708,46 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Promotion Module, such as data models, methods, and more. These are useful for your customizations.", + "title": "Carts", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/promotion/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+promotion", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addOrRemoveCampaignPromotionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addShippingMethodToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "batchPromotionRulesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/batchPromotionRulesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCampaignsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCampaignsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPromotionRulesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPromotionRulesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPromotionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createPromotionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCampaignsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteCampaignsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePromotionRulesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePromotionRulesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePromotionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deletePromotionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshCartItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "transferCartCustomerWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCampaignsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCampaignsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartPromotionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartPromotionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateLineItemInCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePromotionRulesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePromotionRulesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePromotionsStatusWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePromotionsStatusWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePromotionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updatePromotionsWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+promotion", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addCampaignPromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/addCampaignPromotionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addRulesToPromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/addRulesToPromotionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCampaignsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createCampaignsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createPromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createPromotionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteCampaignsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteCampaignsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deletePromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deletePromotionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "getActionsToComputeFromPromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getActionsToComputeFromPromotionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "getPromotionCodesToApply", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getPromotionCodesToApply", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "prepareAdjustmentsFromPromotionActionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/prepareAdjustmentsFromPromotionActionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeCampaignPromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeCampaignPromotionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeRulesFromPromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/removeRulesFromPromotionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCampaignsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCampaignsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartPromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateCartPromotionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePromotionRulesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePromotionRulesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updatePromotionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updatePromotionsStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/promotion/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+promotion", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Promotion Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "campaign", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/campaign", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "promotion", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/promotion", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/promotion/admin-widget-zones", - "title": "Admin Widget Zones", + "path": "/storefront-development/cart/create", + "title": "Create Cart", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/promotion", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Promotion Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "hasTitleStyling": true, - "autogenerate_path": "/references/promotion/IPromotionModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/addPromotionBuyRules", - "title": "addPromotionBuyRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/addPromotionRules", - "title": "addPromotionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/addPromotionTargetRules", - "title": "addPromotionTargetRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/addPromotionsToCampaign", - "title": "addPromotionsToCampaign", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/computeActions", - "title": "computeActions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/createCampaigns", - "title": "createCampaigns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/createPromotions", - "title": "createPromotions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/deleteCampaigns", - "title": "deleteCampaigns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/deletePromotions", - "title": "deletePromotions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/listAndCountCampaigns", - "title": "listAndCountCampaigns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/listAndCountPromotions", - "title": "listAndCountPromotions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/listCampaigns", - "title": "listCampaigns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/listPromotionRules", - "title": "listPromotionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/listPromotions", - "title": "listPromotions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/registerUsage", - "title": "registerUsage", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/removePromotionBuyRules", - "title": "removePromotionBuyRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/removePromotionRules", - "title": "removePromotionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/removePromotionTargetRules", - "title": "removePromotionTargetRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/removePromotionsFromCampaign", - "title": "removePromotionsFromCampaign", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/restoreCampaigns", - "title": "restoreCampaigns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/restorePromotions", - "title": "restorePromotions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/retrieveCampaign", - "title": "retrieveCampaign", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/retrievePromotion", - "title": "retrievePromotion", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/revertUsage", - "title": "revertUsage", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/softDeleteCampaigns", - "title": "softDeleteCampaigns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/softDeletePromotions", - "title": "softDeletePromotions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/updateCampaigns", - "title": "updateCampaigns", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/updatePromotionRules", - "title": "updatePromotionRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/updatePromotions", - "title": "updatePromotions", - "description": "", - "children": [] - } - ] - } - ] + "path": "/storefront-development/cart/retrieve", + "title": "Retrieve Cart", + "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/promotion/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Promotion Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "hasTitleStyling": true, - "autogenerate_path": "/references/promotion_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/models/ApplicationMethod", - "title": "ApplicationMethod", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/models/Campaign", - "title": "Campaign", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/models/CampaignBudget", - "title": "CampaignBudget", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/models/Promotion", - "title": "Promotion", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/models/PromotionRule", - "title": "PromotionRule", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/promotion/models/PromotionRuleValue", - "title": "PromotionRuleValue", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Region Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/region", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "children": [ + "path": "/storefront-development/cart/context", + "title": "Cart React Context", + "children": [] + }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/region/links-to-other-modules", - "title": "Links to Modules", + "path": "/storefront-development/cart/update", + "title": "Update Cart", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/cart/manage-items", + "title": "Manage Line Items", "children": [] } ] @@ -13586,43 +17756,63 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+region,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Region Module's features into your storefront.", + "title": "Checkout", "children": [ { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "Implement Express Checkout with Medusa", - "path": "https://docs.medusajs.com/resources/storefront-development/guides/express-checkout", + "type": "link", + "path": "/storefront-development/checkout", + "title": "Overview", "children": [] }, { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "List Regions in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/regions/list", + "type": "link", + "path": "/storefront-development/checkout/email", + "title": "1. Enter Email", "children": [] }, { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "Region Context in Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/regions/context", + "type": "link", + "path": "/storefront-development/checkout/address", + "title": "2. Set Address", "children": [] }, { "loaded": true, "isPathHref": true, - "type": "ref", - "title": "Store and Retrieve Region", - "path": "https://docs.medusajs.com/resources/storefront-development/regions/store-retrieve-region", + "type": "link", + "path": "/storefront-development/checkout/shipping", + "title": "3. Choose Shipping Method", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/checkout/payment", + "title": "4. Choose Payment Provider", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/checkout/payment/stripe", + "title": "Example: Stripe", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/checkout/complete-cart", + "title": "5. Complete Cart", "children": [] } ] @@ -13631,3472 +17821,829 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+region", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Region features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Regions", - "path": "https://docs.medusajs.com/user-guide/settings/regions", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Region Module, such as data models, methods, and more. These are useful for your customizations.", + "title": "Customers", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/region/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+region", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addOrderLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createRegionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createShippingOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createShippingOptionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteRegionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "exportProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/exportProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "importProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/importProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEditAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderExchangeAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateRegionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateShippingOptionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateShippingOptionsWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+region", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createRegionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createRegionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteRegionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteRegionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "findOneOrAnyRegionStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findOneOrAnyRegionStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "generateProductCsvStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/generateProductCsvStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "parseProductCsvStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/parseProductCsvStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateRegionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateRegionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validateShippingOptionPricesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateShippingOptionPricesStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/region/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Store", - "autogenerate_tags": "jsSdk+storefront+region", - "description": "The following methods or properties are used to send requests to Store API Routes related to the Region Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "region", - "path": "https://docs.medusajs.com/resources/references/js-sdk/store/region", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+region", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Region Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "region", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/region", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/region/events", - "title": "Events Reference", + "path": "/storefront-development/customers/register", + "title": "Register Customer", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/region/admin-widget-zones", - "title": "Admin Widget Zones", + "path": "/storefront-development/customers/login", + "title": "Login Customer", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/region", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Region Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/region/IRegionModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/createRegions", - "title": "createRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/deleteRegions", - "title": "deleteRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/listAndCountCountries", - "title": "listAndCountCountries", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/listAndCountRegions", - "title": "listAndCountRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/listCountries", - "title": "listCountries", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/listRegions", - "title": "listRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/restoreRegions", - "title": "restoreRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/retrieveCountry", - "title": "retrieveCountry", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/retrieveRegion", - "title": "retrieveRegion", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/softDeleteRegions", - "title": "softDeleteRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/updateRegions", - "title": "updateRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/upsertRegions", - "title": "upsertRegions", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Region Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/region_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/models/Country", - "title": "Country", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/region/models/Region", - "title": "Region", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Sales Channel Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/sales-channel", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "autogenerate_tags": "concept+salesChannel", - "autogenerate_as_ref": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/sales-channel/publishable-api-keys", - "title": "Publishable API Keys", + "path": "/storefront-development/customers/third-party-login", + "title": "Third-Party (Social) Login", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/sales-channel/links-to-other-modules", - "title": "Links to Modules", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Product Variant Inventory", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/variant-inventory", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+salesChannel,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Sales Channel Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Use a Publishable API Key in the Storefront", - "path": "https://docs.medusajs.com/resources/storefront-development/publishable-api-keys", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+salesChannel", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Sales Channel features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Sales Channels", - "path": "https://docs.medusajs.com/user-guide/settings/sales-channels", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Sales Channel Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/sales-channel/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+salesChannel", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addOrderLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createDefaultsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createDefaultsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createSalesChannelsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createSalesChannelsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteSalesChannelsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteSalesChannelsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "importProductsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/importProductsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "linkSalesChannelsToApiKeyWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/linkSalesChannelsToApiKeyWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEditAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderExchangeAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateSalesChannelsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateSalesChannelsWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+salesChannel", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createDefaultSalesChannelStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createDefaultSalesChannelStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createSalesChannelsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createSalesChannelsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteSalesChannelsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteSalesChannelsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "findSalesChannelStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findSalesChannelStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "parseProductCsvStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/parseProductCsvStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateSalesChannelsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateSalesChannelsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validateSalesChannelsExistStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateSalesChannelsExistStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/sales-channel/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+salesChannel", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Sales Channel Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "salesChannel", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/salesChannel", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/sales-channel/events", - "title": "Events Reference", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/sales-channel/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Sales Channel Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/sales_channel/ISalesChannelModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/createSalesChannels", - "title": "createSalesChannels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/deleteSalesChannels", - "title": "deleteSalesChannels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/listAndCountSalesChannels", - "title": "listAndCountSalesChannels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/listSalesChannels", - "title": "listSalesChannels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/restoreSalesChannels", - "title": "restoreSalesChannels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/retrieveSalesChannel", - "title": "retrieveSalesChannel", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/softDeleteSalesChannels", - "title": "softDeleteSalesChannels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/updateSalesChannels", - "title": "updateSalesChannels", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/upsertSalesChannels", - "title": "upsertSalesChannels", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Sales Channel Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/sales_channel_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/sales-channel/models/SalesChannel", - "title": "SalesChannel", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Stock Location Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/stock-location", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "autogenerate_tags": "concept+stockLocation", - "autogenerate_as_ref": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/stock-location/concepts", - "title": "Stock Location Concepts", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/stock-location/links-to-other-modules", - "title": "Links to Modules", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Inventory Kits", - "path": "https://docs.medusajs.com/resources/commerce-modules/inventory/inventory-kit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Product Variant Inventory", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/variant-inventory", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+stockLocation", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Stock Location features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Locations & Shipping Overview", - "path": "https://docs.medusajs.com/user-guide/settings/locations-and-shipping", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Locations", - "path": "https://docs.medusajs.com/user-guide/settings/locations-and-shipping/locations", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Stock Location Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/stock-location/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+stockLocation", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createStockLocationsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createStockLocationsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteStockLocationsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteStockLocationsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateStockLocationsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateStockLocationsWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+stockLocation", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createStockLocations", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createStockLocations", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteStockLocationsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteStockLocationsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateStockLocationsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateStockLocationsStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/stock-location/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+stockLocation", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Stock Location Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "stockLocation", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/stockLocation", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/stock-location/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Stock Location Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/stock_location_next/IStockLocationService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/createStockLocations", - "title": "createStockLocations", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/deleteStockLocationAddresses", - "title": "deleteStockLocationAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/deleteStockLocations", - "title": "deleteStockLocations", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/listAndCountStockLocations", - "title": "listAndCountStockLocations", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/listStockLocationAddresses", - "title": "listStockLocationAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/listStockLocations", - "title": "listStockLocations", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/restoreStockLocations", - "title": "restoreStockLocations", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/retrieveStockLocation", - "title": "retrieveStockLocation", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/softDeleteStockLocations", - "title": "softDeleteStockLocations", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/updateStockLocations", - "title": "updateStockLocations", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/upsertStockLocationAddresses", - "title": "upsertStockLocationAddresses", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/upsertStockLocations", - "title": "upsertStockLocations", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Stock Location Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/stock_location_next_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/models/StockLocation", - "title": "StockLocation", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/stock-location-next/models/StockLocationAddress", - "title": "StockLocationAddress", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Store Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/store", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/store/links-to-other-modules", - "title": "Link to Modules", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+store", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Store features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Store", - "path": "https://docs.medusajs.com/user-guide/settings/store", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Store Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/store/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+store", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addOrderLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addOrderLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createDefaultsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createDefaultsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createStoresWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createStoresWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteStoresWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteStoresWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEditAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderExchangeAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateStoresWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateStoresWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+store", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createDefaultStoreStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createDefaultStoreStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createStoresStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createStoresStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteStoresStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteStoresStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "findOneOrAnyRegionStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findOneOrAnyRegionStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "findSalesChannelStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/findSalesChannelStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateStoresStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateStoresStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/store/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+store", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Store Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "store", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/store", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/store/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Store Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/store/IStoreModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/createStores", - "title": "createStores", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/deleteStores", - "title": "deleteStores", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/listAndCountStores", - "title": "listAndCountStores", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/listStores", - "title": "listStores", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/restoreStores", - "title": "restoreStores", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/retrieveStore", - "title": "retrieveStore", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/softDeleteStores", - "title": "softDeleteStores", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/updateStores", - "title": "updateStores", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/upsertStores", - "title": "upsertStores", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Store Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/store_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/models/Store", - "title": "Store", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/store/models/StoreCurrency", - "title": "StoreCurrency", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Tax Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/tax", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/tax/module-options", - "title": "Module Options", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Concepts", - "initialOpen": false, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/tax/tax-region", - "title": "Tax Region", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/tax/tax-rates-and-rules", - "title": "Tax Rates and Rules", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/tax/tax-calculation-with-provider", - "title": "Tax Calculation and Providers", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+tax", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the Tax Module in your customizations on the Medusa application server.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Get Variant Price with Taxes", - "path": "https://docs.medusajs.com/resources/commerce-modules/product/guides/price-with-taxes", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/provider", - "title": "Tax Provider Reference", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Storefront Guides", - "autogenerate_tags": "storefront+tax,-jsSdk", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to integrate the Tax Module's features into your storefront.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Example: Show Price with Taxes", - "path": "https://docs.medusajs.com/resources/storefront-development/products/price/examples/tax-price", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+tax", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage Tax features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Tax Regions", - "path": "https://docs.medusajs.com/user-guide/settings/tax-regions", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the Tax Module, such as data models, methods, and more. These are useful for your customizations.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/tax/workflows", - "title": "Workflows", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+tax", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addShippingMethodToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addShippingMethodToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "addToCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/addToCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createClaimShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createClaimShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createExchangeShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createExchangeShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderEditShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderEditShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createOrderWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createOrderWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createReturnShippingMethodWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createReturnShippingMethodWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createTaxRateRulesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createTaxRateRulesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createTaxRatesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createTaxRatesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createTaxRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createTaxRegionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteLineItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteLineItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteTaxRateRulesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteTaxRateRulesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteTaxRatesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteTaxRatesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteTaxRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteTaxRegionsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderClaimAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderClaimAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderEditAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderEditAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "orderExchangeAddNewItemWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/orderExchangeAddNewItemWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshCartItemsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshCartItemsWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "setTaxRateRulesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/setTaxRateRulesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "transferCartCustomerWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/transferCartCustomerWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateLineItemInCartWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateLineItemInCartWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateOrderTaxLinesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateOrderTaxLinesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateTaxLinesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateTaxLinesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateTaxRatesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateTaxRatesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateTaxRegionsWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateTaxRegionsWorkflow", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+tax", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createTaxRateRulesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createTaxRateRulesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createTaxRatesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createTaxRatesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createTaxRegionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createTaxRegionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteTaxRateRulesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteTaxRateRulesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteTaxRatesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteTaxRatesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteTaxRegionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteTaxRegionsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "getItemTaxLinesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/getItemTaxLinesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "listTaxRateRuleIdsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/listTaxRateRuleIdsStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateTaxRatesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateTaxRatesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateTaxRegionsStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateTaxRegionsStep", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/tax/js-sdk", - "title": "JS SDK", - "hideChildren": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+tax", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the Tax Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "taxRate", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/taxRate", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "taxRegion", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/taxRegion", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/tax/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "Tax Module's Main Service Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/tax/ITaxModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/createTaxRateRules", - "title": "createTaxRateRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/createTaxRates", - "title": "createTaxRates", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/createTaxRegions", - "title": "createTaxRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/deleteTaxRateRules", - "title": "deleteTaxRateRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/deleteTaxRates", - "title": "deleteTaxRates", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/deleteTaxRegions", - "title": "deleteTaxRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/getTaxLines", - "title": "getTaxLines", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/listAndCountTaxRates", - "title": "listAndCountTaxRates", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/listTaxRateRules", - "title": "listTaxRateRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/listTaxRates", - "title": "listTaxRates", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/listTaxRegions", - "title": "listTaxRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/restoreTaxRateRules", - "title": "restoreTaxRateRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/restoreTaxRates", - "title": "restoreTaxRates", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/restoreTaxRegions", - "title": "restoreTaxRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/retrieveTaxRate", - "title": "retrieveTaxRate", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/softDeleteTaxRateRules", - "title": "softDeleteTaxRateRules", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/softDeleteTaxRates", - "title": "softDeleteTaxRates", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/softDeleteTaxRegions", - "title": "softDeleteTaxRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/updateTaxRates", - "title": "updateTaxRates", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/updateTaxRegions", - "title": "updateTaxRegions", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/upsertTaxRates", - "title": "upsertTaxRates", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "Tax Module Data Models Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Data Models", - "autogenerate_path": "/references/tax_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/models/TaxProvider", - "title": "TaxProvider", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/models/TaxRate", - "title": "TaxRate", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/models/TaxRateRule", - "title": "TaxRateRule", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/tax/models/TaxRegion", - "title": "TaxRegion", - "description": "", - "children": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "User Module", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/user", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/user/module-options", - "title": "Module Options", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Server Guides", - "autogenerate_tags": "server+user", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to use the User Module in your customizations on the Medusa application server.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/user/user-creation-flows", - "title": "User Creation Flows", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin User Guides", - "autogenerate_tags": "userGuide+user", - "initialOpen": false, - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "description": "Learn how to utilize and manage User features in the Medusa Admin dashboard.", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Invites", - "path": "https://docs.medusajs.com/user-guide/settings/users/invites", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Profile", - "path": "https://docs.medusajs.com/user-guide/settings/profile", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "Manage Users", - "path": "https://docs.medusajs.com/user-guide/settings/users", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", + "path": "/storefront-development/customers/reset-password", "title": "Reset Password", - "path": "https://docs.medusajs.com/user-guide/reset-password", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/customers/retrieve", + "title": "Retrieve Customer", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/customers/context", + "title": "Customer React Context", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/customers/profile", + "title": "Edit Customer Profile", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/customers/addresses", + "title": "Manage Customer Addresses", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/storefront-development/customers/log-out", + "title": "Log-out Customer", "children": [] } ] + } + ] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "SDKs and Tools", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/create-medusa-app", + "title": "create-medusa-app", + "children": [] }, { "loaded": true, "isPathHref": true, - "type": "category", - "title": "References", - "initialOpen": false, - "description": "Find references for tools and resources related to the User Module, such as data models, methods, and more. These are useful for your customizations.", + "type": "sidebar", + "sidebar_id": "medusa-cli", + "title": "Medusa CLI", + "childSidebarTitle": "Medusa CLI Reference", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/user/workflows", - "title": "Workflows", - "hideChildren": true, + "path": "/medusa-cli", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Commands", + "autogenerate_path": "medusa-cli/commands", "children": [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Workflows", - "autogenerate_tags": "workflow+user", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "acceptInviteWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/acceptInviteWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createInvitesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createInvitesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createUserAccountWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createUserAccountWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createUsersWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/createUsersWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteInvitesWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteInvitesWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteUsersWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/deleteUsersWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshInviteTokensWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/refreshInviteTokensWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "removeUserAccountWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/removeUserAccountWorkflow", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateUsersWorkflow", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/updateUsersWorkflow", - "children": [] - } - ] + "type": "link", + "path": "/medusa-cli/commands/new", + "title": "new", + "description": "", + "children": [] }, { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Steps", - "autogenerate_tags": "step+user", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createInviteStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createInviteStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "createUsersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/createUsersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteInvitesStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteInvitesStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "deleteUsersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/deleteUsersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "refreshInviteTokensStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/refreshInviteTokensStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "updateUsersStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/updateUsersStep", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "validateTokenStep", - "path": "https://docs.medusajs.com/resources/references/medusa-workflows/steps/validateTokenStep", - "children": [] - } - ] + "type": "link", + "path": "/medusa-cli/commands/develop", + "title": "develop", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/start", + "title": "start", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/user", + "title": "user", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/build", + "title": "build", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/db", + "title": "db", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/plugin", + "title": "plugin", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/exec", + "title": "exec", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/start-cluster", + "title": "start-cluster", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-cli/commands/telemtry", + "title": "telemetry", + "description": "", + "children": [] } ] - }, + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "js-sdk", + "title": "JS SDK", + "childSidebarTitle": "JS SDK Reference", + "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/commerce-modules/user/js-sdk", - "title": "JS SDK", - "hideChildren": true, + "path": "/js-sdk", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Auth", + "autogenerate_path": "/references/js_sdk/auth/Auth/methods", + "initialOpen": true, "children": [ { "loaded": true, "isPathHref": true, - "type": "sub-category", - "title": "Admin", - "autogenerate_tags": "jsSdk+admin+user", - "description": "The following methods or properties are used to send requests to Admin API Routes related to the User Module.", - "autogenerate_as_ref": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "invite", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/invite", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "title": "user", - "path": "https://docs.medusajs.com/resources/references/js-sdk/admin/user", - "children": [] - } - ] + "type": "link", + "path": "/references/js-sdk/auth/callback", + "title": "callback", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/auth/login", + "title": "login", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/auth/logout", + "title": "logout", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/auth/refresh", + "title": "refresh", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/auth/register", + "title": "register", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/auth/resetPassword", + "title": "resetPassword", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/auth/updateProvider", + "title": "updateProvider", + "description": "", + "children": [] } ] }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/commerce-modules/user/events", - "title": "Events Reference", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/user/admin-widget-zones", - "title": "Admin Widget Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user", - "title": "Main Service Reference", - "isChildSidebar": true, - "childSidebarTitle": "User Module's Main Service Reference", + "type": "category", + "title": "Store", + "autogenerate_path": "/references/js_sdk/store/Store/properties", + "initialOpen": true, "children": [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/references/user/IUserModuleService/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/createInvites", - "title": "createInvites", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/createUsers", - "title": "createUsers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/deleteInvites", - "title": "deleteInvites", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/deleteUsers", - "title": "deleteUsers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/listAndCountInvites", - "title": "listAndCountInvites", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/listAndCountUsers", - "title": "listAndCountUsers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/listInvites", - "title": "listInvites", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/listUsers", - "title": "listUsers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/refreshInviteTokens", - "title": "refreshInviteTokens", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/restoreInvites", - "title": "restoreInvites", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/restoreUsers", - "title": "restoreUsers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/retrieveInvite", - "title": "retrieveInvite", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/retrieveUser", - "title": "retrieveUser", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/softDeleteInvites", - "title": "softDeleteInvites", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/softDeleteUsers", - "title": "softDeleteUsers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/updateInvites", - "title": "updateInvites", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/updateUsers", - "title": "updateUsers", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/validateInviteToken", - "title": "validateInviteToken", - "description": "", - "children": [] - } - ] + "type": "link", + "path": "/references/js-sdk/store/cart", + "title": "cart", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/store/category", + "title": "category", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/store/collection", + "title": "collection", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/store/customer", + "title": "customer", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/store/fulfillment", + "title": "fulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/store/order", + "title": "order", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/store/payment", + "title": "payment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/store/product", + "title": "product", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/store/region", + "title": "region", + "description": "", + "children": [] } ] }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/references/user/models", - "title": "Data Models Reference", - "isChildSidebar": true, - "childSidebarTitle": "User Module Data Models Reference", + "type": "category", + "title": "Admin", + "autogenerate_path": "/references/js_sdk/admin/Admin/properties", + "initialOpen": true, "children": [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Data Models", - "hasTitleStyling": true, - "autogenerate_path": "/references/user_models/variables", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/models/Invite", - "title": "Invite", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/user/models/User", - "title": "User", - "description": "", - "children": [] - } - ] + "type": "link", + "path": "/references/js-sdk/admin/apiKey", + "title": "apiKey", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/campaign", + "title": "campaign", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/claim", + "title": "claim", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/currency", + "title": "currency", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/customer", + "title": "customer", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/customerGroup", + "title": "customerGroup", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/draftOrder", + "title": "draftOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/exchange", + "title": "exchange", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/fulfillment", + "title": "fulfillment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/fulfillmentProvider", + "title": "fulfillmentProvider", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/fulfillmentSet", + "title": "fulfillmentSet", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/inventoryItem", + "title": "inventoryItem", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/invite", + "title": "invite", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/notification", + "title": "notification", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/order", + "title": "order", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/orderEdit", + "title": "orderEdit", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/payment", + "title": "payment", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/paymentCollection", + "title": "paymentCollection", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/priceList", + "title": "priceList", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/pricePreference", + "title": "pricePreference", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/product", + "title": "product", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/productCategory", + "title": "productCategory", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/productCollection", + "title": "productCollection", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/productTag", + "title": "productTag", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/productType", + "title": "productType", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/productVariant", + "title": "productVariant", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/promotion", + "title": "promotion", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/refundReason", + "title": "refundReason", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/region", + "title": "region", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/reservation", + "title": "reservation", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/return", + "title": "return", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/returnReason", + "title": "returnReason", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/salesChannel", + "title": "salesChannel", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/shippingOption", + "title": "shippingOption", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/shippingProfile", + "title": "shippingProfile", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/stockLocation", + "title": "stockLocation", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/store", + "title": "store", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/taxRate", + "title": "taxRate", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/taxRegion", + "title": "taxRegion", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/upload", + "title": "upload", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/user", + "title": "user", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/js-sdk/admin/workflowExecution", + "title": "workflowExecution", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "nextjs-starter", + "title": "Next.js Starter Storefront", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/nextjs-starter", + "title": "Overview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Payment", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/nextjs-starter/guides/customize-stripe", + "title": "Customize Stripe Integration", + "children": [] } ] } ] } ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules", - "title": "Architectural Modules", - "isChildSidebar": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Cache Modules", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/cache", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/cache/in-memory", - "title": "In-Memory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/cache/redis", - "title": "Redis", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Guides", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/cache/create", - "title": "Create Cache Module", - "children": [] - } - ] - } - ] }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Event Modules", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/event", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/event/local", - "title": "Local", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/event/redis", - "title": "Redis", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Guides", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/event/create", - "title": "Create Event Module", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "File Module Providers", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/file", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/file/local", - "title": "Local", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/file/s3", - "title": "AWS S3 (and Compatible APIs)", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Guides", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/file-provider-module", - "title": "Create File Provider", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Notification Module Providers", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/notification", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/notification/local", - "title": "Local", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/notification/sendgrid", - "title": "SendGrid", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "sub-category", - "title": "Guides", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/notification-provider-module", - "title": "Create Notification Provider", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations/guides/resend", - "title": "Integrate Resend", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/notification/send-notification", - "title": "Send Notification", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Workflow Engine Modules", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/workflow-engine", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/workflow-engine/in-memory", - "title": "In-Memory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/workflow-engine/redis", - "title": "Redis", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations", - "title": "Integrations", - "isChildSidebar": true, - "sort_sidebar": "alphabetize", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Auth", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/auth-providers/google", - "title": "Google", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/auth/auth-providers/github", - "title": "GitHub", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "CMS", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations/guides/sanity", - "title": "Sanity", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "File", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/file/s3", - "title": "AWS", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Fulfillment", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations/guides/shipstation", - "title": "ShipStation", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Notification", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/architectural-modules/notification/sendgrid", - "title": "SendGrid", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/integrations/guides/resend", - "title": "Resend", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Payment", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/commerce-modules/payment/payment-provider/stripe", - "title": "Stripe", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "ref", - "path": "/plugins", - "title": "Plugins", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Overview", - "path": "/plugins", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Guides", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Wishlist", - "path": "/plugins/guides/wishlist", - "description": "Learn how to build a wishlist plugin.", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development", - "title": "Storefront Development", - "isChildSidebar": true, - "children": [ { "loaded": true, "isPathHref": true, @@ -17106,2795 +18653,898 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/storefront-development/tips", - "title": "Tips", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/publishable-api-keys", - "title": "Publishable API Key", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Examples", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/guides/express-checkout", - "title": "Express Checkout Storefront", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Regions", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/regions", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/regions/list", - "title": "List Regions", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/regions/store-retrieve-region", - "title": "Store and Retrieve Regions", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/regions/context", - "title": "Region React Context", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Products", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/list", - "title": "List Products", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/retrieve", - "title": "Retrieve a Product", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/variants", - "title": "Select a Variant", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/price", - "title": "Retrieve Variant Prices", - "autogenerate_path": "storefront-development/products/price/examples", + "type": "sidebar", + "sidebar_id": "deployment-guides", + "title": "Deployment Guides", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/storefront-development/products/price/examples/show-price", - "title": "Example: Show Variant's Price", - "description": "", + "path": "/deployment", + "title": "Overview", "children": [] }, { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/price/examples/sale-price", - "title": "Example: Show Sale Price", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/price/examples/tax-price", - "title": "Example: Show Price with Taxes", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/inventory", - "title": "Retrieve Variant Inventory", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Product Categories", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/categories/list", - "title": "List Categories", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/categories/retrieve", - "title": "Retrieve a Category", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/categories/products", - "title": "Retrieve a Category's Products", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/categories/nested-categories", - "title": "Retrieve Nested Categories", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Product Collections", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/collections/list", - "title": "List Collections", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/collections/retrieve", - "title": "Retrieve a Collection", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/products/collections/products", - "title": "Retrieve a Collection's Products", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Carts", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/cart/create", - "title": "Create Cart", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/cart/retrieve", - "title": "Retrieve Cart", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/cart/context", - "title": "Cart React Context", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/cart/update", - "title": "Update Cart", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/cart/manage-items", - "title": "Manage Line Items", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Checkout", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/checkout", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/checkout/email", - "title": "1. Enter Email", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/checkout/address", - "title": "2. Set Address", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/checkout/shipping", - "title": "3. Choose Shipping Method", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/checkout/payment", - "title": "4. Choose Payment Provider", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/checkout/payment/stripe", - "title": "Example: Stripe", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/checkout/complete-cart", - "title": "5. Complete Cart", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Customers", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/register", - "title": "Register Customer", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/login", - "title": "Login Customer", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/third-party-login", - "title": "Third-Party (Social) Login", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/reset-password", - "title": "Reset Password", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/retrieve", - "title": "Retrieve Customer", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/context", - "title": "Customer React Context", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/profile", - "title": "Edit Customer Profile", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/addresses", - "title": "Manage Customer Addresses", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/storefront-development/customers/log-out", - "title": "Log-out Customer", - "children": [] - } - ] - } - ] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "SDKs and Tools", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/create-medusa-app", - "title": "create-medusa-app", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli", - "title": "Medusa CLI", - "isChildSidebar": true, - "childSidebarTitle": "Medusa CLI Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli", - "title": "Overview", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Commands", - "autogenerate_path": "medusa-cli/commands", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/new", - "title": "new", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/develop", - "title": "develop", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/start", - "title": "start", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/user", - "title": "user", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/build", - "title": "build", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/db", - "title": "db", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/plugin", - "title": "plugin", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/exec", - "title": "exec", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/start-cluster", - "title": "start-cluster", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-cli/commands/telemtry", - "title": "telemetry", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/js-sdk", - "title": "JS SDK", - "isChildSidebar": true, - "childSidebarTitle": "JS SDK Reference", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Auth", - "autogenerate_path": "/references/js_sdk/auth/Auth/methods", - "initialOpen": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/auth/callback", - "title": "callback", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/auth/login", - "title": "login", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/auth/logout", - "title": "logout", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/auth/refresh", - "title": "refresh", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/auth/register", - "title": "register", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/auth/resetPassword", - "title": "resetPassword", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/auth/updateProvider", - "title": "updateProvider", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Store", - "autogenerate_path": "/references/js_sdk/store/Store/properties", - "initialOpen": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/cart", - "title": "cart", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/category", - "title": "category", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/collection", - "title": "collection", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/customer", - "title": "customer", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/fulfillment", - "title": "fulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/order", - "title": "order", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/payment", - "title": "payment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/product", - "title": "product", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/store/region", - "title": "region", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin", - "autogenerate_path": "/references/js_sdk/admin/Admin/properties", - "initialOpen": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/apiKey", - "title": "apiKey", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/campaign", - "title": "campaign", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/claim", - "title": "claim", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/currency", - "title": "currency", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/customer", - "title": "customer", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/customerGroup", - "title": "customerGroup", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/draftOrder", - "title": "draftOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/exchange", - "title": "exchange", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/fulfillment", - "title": "fulfillment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/fulfillmentProvider", - "title": "fulfillmentProvider", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/fulfillmentSet", - "title": "fulfillmentSet", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/inventoryItem", - "title": "inventoryItem", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/invite", - "title": "invite", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/notification", - "title": "notification", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/order", - "title": "order", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/orderEdit", - "title": "orderEdit", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/payment", - "title": "payment", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/paymentCollection", - "title": "paymentCollection", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/priceList", - "title": "priceList", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/pricePreference", - "title": "pricePreference", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/product", - "title": "product", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/productCategory", - "title": "productCategory", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/productCollection", - "title": "productCollection", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/productTag", - "title": "productTag", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/productType", - "title": "productType", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/productVariant", - "title": "productVariant", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/promotion", - "title": "promotion", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/refundReason", - "title": "refundReason", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/region", - "title": "region", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/reservation", - "title": "reservation", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/return", - "title": "return", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/returnReason", - "title": "returnReason", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/salesChannel", - "title": "salesChannel", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/shippingOption", - "title": "shippingOption", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/shippingProfile", - "title": "shippingProfile", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/stockLocation", - "title": "stockLocation", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/store", - "title": "store", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/taxRate", - "title": "taxRate", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/taxRegion", - "title": "taxRegion", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/upload", - "title": "upload", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/user", - "title": "user", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/js-sdk/admin/workflowExecution", - "title": "workflowExecution", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/nextjs-starter", - "title": "Next.js Starter Storefront", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/nextjs-starter", - "title": "Overview", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Payment", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/nextjs-starter/guides/customize-stripe", - "title": "Customize Stripe Integration", - "children": [] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "General", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-config", - "title": "Medusa Configurations", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/deployment", - "title": "Deployment Guides", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Medusa Cloud", - "path": "https://medusajs.com/pricing", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Self-Hosting", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "https://docs.medusajs.com/learn/deployment/general", - "title": "General", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/deployment/medusa-application/railway", - "title": "Railway", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Next.js Starter", - "autogenerate_path": "/deployment/storefront", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/deployment/storefront/vercel", - "title": "Vercel", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting", - "title": "Troubleshooting Guides", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Installation", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/create-medusa-app-errors", - "title": "Create Medusa App Errors", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/errors-installing-cli", - "title": "Errors Installing CLI", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/general-errors", - "title": "General Errors", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Medusa Application", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/eaddrinuse", - "title": "EADDRINUSE Error", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/database-errors", - "title": "Database Errors", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/dist-imports", - "title": "Importing from /dist", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/workflow-errors", - "title": "Workflow Errors", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/test-errors", - "title": "Test Errors", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin Development", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/medusa-admin/no-widget-route", - "title": "Widget or Route not Showing", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Upgrade", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/errors-after-upgrading", - "title": "Errors After Upgrading", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Frontend", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/cors-errors", - "title": "CORS Errors", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Integrations", - "hasTitleStyling": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/troubleshooting/s3", - "title": "S3 Module Provider Errors", - "children": [] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Admin", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-widget-injection-zones", - "title": "Admin Widget Injection Zones", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components", - "title": "Admin Components", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Layouts", - "autogenerate_path": "/admin-components/layouts", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/layouts/single-column", - "title": "Single Column", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/layouts/two-column", - "title": "Two Column", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Components", - "autogenerate_path": "/admin-components/components", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/components/action-menu", - "title": "Action Menu", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/components/container", - "title": "Container", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/components/data-table", - "title": "Data Table", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/components/forms", - "title": "Forms", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/components/header", - "title": "Header", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/components/json-view-section", - "title": "JSON View", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/components/section-row", - "title": "Section Row", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/admin-components/components/table", - "title": "Table", - "description": "", - "children": [] - } - ] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Lists", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/medusa-container-resources", - "title": "Container Dependencies", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/events-reference", - "title": "Events List", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "References", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/workflows", - "title": "Workflows SDK", - "childSidebarTitle": "Workflows SDK Reference", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Functions", - "autogenerate_path": "/references/workflows/functions", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/workflows/createHook", - "title": "createHook", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/workflows/createStep", - "title": "createStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/workflows/createWorkflow", - "title": "createWorkflow", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/workflows/parallelize", - "title": "parallelize", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/workflows/transform", - "title": "transform", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model", - "title": "Data Model Language", - "childSidebarTitle": "Data Model Language Reference", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/define", - "title": "Define Method", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Property Types", - "autogenerate_path": "/references/dml/Property_Types/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/array", - "title": "array", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/bignumber", - "title": "bigNumber", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/boolean", - "title": "boolean", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/datetime", - "title": "dateTime", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/enum", - "title": "enum", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/float", - "title": "float", - "description": "", - "children": [] + "type": "separator" }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/data-model/property-types/id", - "title": "id", - "description": "", + "title": "Medusa Cloud", + "path": "https://medusajs.com/pricing", "children": [] }, { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/json", - "title": "json", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/number", - "title": "number", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-types/text", - "title": "text", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Relationship Methods", - "autogenerate_path": "/references/dml/Relationship_Methods/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/relationship-methods/belongsto", - "title": "belongsTo", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/relationship-methods/hasmany", - "title": "hasMany", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/relationship-methods/hasone", - "title": "hasOne", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/relationship-methods/manytomany", - "title": "manyToMany", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Model Methods", - "autogenerate_path": "/references/dml/Model_Methods/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/model-methods/cascades", - "title": "cascades", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/model-methods/indexes", - "title": "indexes", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Property Configuration Methods", - "autogenerate_path": "/references/dml/Property_Configuration_Methods/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-configuration/computed", - "title": "computed", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-configuration/default", - "title": "default", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-configuration/index", - "title": "index", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-configuration/nullable", - "title": "nullable", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/data-model/property-configuration/unique", - "title": "unique", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference", - "title": "Service Factory", - "isChildSidebar": true, - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Methods", - "autogenerate_path": "/service-factory-reference/methods", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/methods/create", - "title": "create", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/methods/delete", - "title": "delete", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/methods/list", - "title": "list", - "description": "", - "children": [] + "type": "separator" }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/methods/listAndCount", - "title": "listAndCount", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/methods/restore", - "title": "restore", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/methods/retrieve", - "title": "retrieve", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/methods/soft-delete", - "title": "softDelete", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/methods/update", - "title": "update", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Tips", - "autogenerate_path": "/service-factory-reference/tips", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/service-factory-reference/tips/filtering", - "title": "Filtering", - "description": "", - "children": [] - } - ] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps", - "title": "Helper Steps", - "isChildSidebar": true, - "autogenerate_path": "/references/helper_steps/functions", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps/createRemoteLinkStep", - "title": "createRemoteLinkStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps/dismissRemoteLinkStep", - "title": "dismissRemoteLinkStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps/emitEventStep", - "title": "emitEventStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps/removeRemoteLinkStep", - "title": "removeRemoteLinkStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps/updateRemoteLinksStep", - "title": "updateRemoteLinksStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps/useQueryGraphStep", - "title": "useQueryGraphStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps/useRemoteQueryStep", - "title": "useRemoteQueryStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/helper-steps/validatePresenceOfStep", - "title": "validatePresenceOfStep", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Core Workflows", - "path": "/medusa-workflows-reference", - "isChildSidebar": true, - "custom_autogenerate": "core-flows", - "children": [ - { - "type": "link", - "title": "Overview", - "path": "/medusa-workflows-reference", - "loaded": true, - "isPathHref": true - }, - { - "type": "separator" - }, - { - "type": "category", - "title": "Api Key", - "children": [ - { - "type": "sub-category", - "title": "Workflows", + "type": "category", + "title": "Self-Hosting", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/createApiKeysWorkflow", - "title": "createApiKeysWorkflow", - "description": "Create secret or publishable API keys.", + "path": "https://docs.medusajs.com/learn/deployment/general", + "title": "General", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/deleteApiKeysWorkflow", - "title": "deleteApiKeysWorkflow", - "description": "Delete secret or publishable API keys.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/linkSalesChannelsToApiKeyWorkflow", - "title": "linkSalesChannelsToApiKeyWorkflow", - "description": "Manage the sales channels of a publishable API key.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/revokeApiKeysWorkflow", - "title": "revokeApiKeysWorkflow", - "description": "Revoke secret or publishable API keys.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateApiKeysWorkflow", - "title": "updateApiKeysWorkflow", - "description": "Update secret or publishable API keys.", + "path": "/deployment/medusa-application/railway", + "title": "Railway", "children": [] } - ], - "loaded": true + ] }, { - "type": "sub-category", + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Next.js Starter", + "autogenerate_path": "/deployment/storefront", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/deployment/storefront/vercel", + "title": "Vercel", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "troubleshooting", + "title": "Troubleshooting", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Installation", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/create-medusa-app-errors", + "title": "Create Medusa App Errors", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/errors-installing-cli", + "title": "Errors Installing CLI", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/general-errors", + "title": "General Errors", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Medusa Application", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/eaddrinuse", + "title": "EADDRINUSE Error", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/database-errors", + "title": "Database Errors", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/dist-imports", + "title": "Importing from /dist", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/workflow-errors", + "title": "Workflow Errors", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/test-errors", + "title": "Test Errors", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin Development", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/medusa-admin/no-widget-route", + "title": "Widget or Route not Showing", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Upgrade", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/errors-after-upgrading", + "title": "Errors After Upgrading", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Frontend", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/cors-errors", + "title": "CORS Errors", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Integrations", + "hasTitleStyling": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/troubleshooting/s3", + "title": "S3 Module Provider Errors", + "children": [] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Admin", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-widget-injection-zones", + "title": "Admin Widget Injection Zones", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "admin-components", + "title": "Admin Components", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components", + "title": "Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Layouts", + "autogenerate_path": "/admin-components/layouts", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/layouts/single-column", + "title": "Single Column", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/layouts/two-column", + "title": "Two Column", + "description": "", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Components", + "autogenerate_path": "/admin-components/components", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/action-menu", + "title": "Action Menu", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/container", + "title": "Container", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/data-table", + "title": "Data Table", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/forms", + "title": "Forms", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/header", + "title": "Header", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/json-view-section", + "title": "JSON View", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/section-row", + "title": "Section Row", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/table", + "title": "Table", + "description": "", + "children": [] + } + ] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Lists", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/medusa-container-resources", + "title": "Container Dependencies", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/events-reference", + "title": "Events List", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "References", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "workflows-sdk-reference", + "title": "Workflows SDK", + "childSidebarTitle": "Workflows SDK Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/workflows", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Functions", + "autogenerate_path": "/references/workflows/functions", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/workflows/createHook", + "title": "createHook", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/workflows/createStep", + "title": "createStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/workflows/createWorkflow", + "title": "createWorkflow", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/workflows/parallelize", + "title": "parallelize", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/workflows/transform", + "title": "transform", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "dml-reference", + "title": "Data Model Language", + "childSidebarTitle": "Data Model Language Reference", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/define", + "title": "Define Method", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Property Types", + "autogenerate_path": "/references/dml/Property_Types/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/array", + "title": "array", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/bignumber", + "title": "bigNumber", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/boolean", + "title": "boolean", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/datetime", + "title": "dateTime", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/enum", + "title": "enum", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/float", + "title": "float", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/id", + "title": "id", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/json", + "title": "json", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/number", + "title": "number", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-types/text", + "title": "text", + "description": "", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Relationship Methods", + "autogenerate_path": "/references/dml/Relationship_Methods/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/relationship-methods/belongsto", + "title": "belongsTo", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/relationship-methods/hasmany", + "title": "hasMany", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/relationship-methods/hasone", + "title": "hasOne", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/relationship-methods/manytomany", + "title": "manyToMany", + "description": "", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Model Methods", + "autogenerate_path": "/references/dml/Model_Methods/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/model-methods/cascades", + "title": "cascades", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/model-methods/indexes", + "title": "indexes", + "description": "", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Property Configuration Methods", + "autogenerate_path": "/references/dml/Property_Configuration_Methods/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-configuration/computed", + "title": "computed", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-configuration/default", + "title": "default", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-configuration/index", + "title": "index", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-configuration/nullable", + "title": "nullable", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/data-model/property-configuration/unique", + "title": "unique", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "service-factory-reference", + "title": "Service Factory", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Methods", + "autogenerate_path": "/service-factory-reference/methods", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/methods/create", + "title": "create", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/methods/delete", + "title": "delete", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/methods/list", + "title": "list", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/methods/listAndCount", + "title": "listAndCount", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/methods/restore", + "title": "restore", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/methods/retrieve", + "title": "retrieve", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/methods/soft-delete", + "title": "softDelete", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/methods/update", + "title": "update", + "description": "", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Tips", + "autogenerate_path": "/service-factory-reference/tips", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/service-factory-reference/tips/filtering", + "title": "Filtering", + "description": "", + "children": [] + } + ] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "helper-steps-reference", + "title": "Helper Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/helper-steps", + "title": "Reference Overview", + "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", "title": "Steps", + "autogenerate_path": "/references/helper_steps/functions", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/steps/createApiKeysStep", - "title": "createApiKeysStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteApiKeysStep", - "title": "deleteApiKeysStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/linkSalesChannelsToApiKeyStep", - "title": "linkSalesChannelsToApiKeyStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/revokeApiKeysStep", - "title": "revokeApiKeysStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateApiKeysStep", - "title": "updateApiKeysStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateSalesChannelsExistStep", - "title": "validateSalesChannelsExistStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Auth", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/generateResetPasswordTokenWorkflow", - "title": "generateResetPasswordTokenWorkflow", - "description": "Generate a reset password token for a user or customer.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/setAuthAppMetadataStep", - "title": "setAuthAppMetadataStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Cart", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/addShippingMethodToCartWorkflow", - "title": "addShippingMethodToCartWorkflow", - "description": "Add a shipping method to a cart.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/addToCartWorkflow", - "title": "addToCartWorkflow", - "description": "Add a line item to a cart.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/completeCartWorkflow", - "title": "completeCartWorkflow", - "description": "Complete a cart and place an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmVariantInventoryWorkflow", - "title": "confirmVariantInventoryWorkflow", - "description": "Validate that a variant is in-stock before adding to the cart.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCartCreditLinesWorkflow", - "title": "createCartCreditLinesWorkflow", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCartWorkflow", - "title": "createCartWorkflow", - "description": "Create a cart specifying region, items, and more.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createPaymentCollectionForCartWorkflow", - "title": "createPaymentCollectionForCartWorkflow", - "description": "Create payment collection for cart.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteCartCreditLinesWorkflow", - "title": "deleteCartCreditLinesWorkflow", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/listShippingOptionsForCartWithPricingWorkflow", - "title": "listShippingOptionsForCartWithPricingWorkflow", - "description": "List a cart's shipping options with prices.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/listShippingOptionsForCartWorkflow", - "title": "listShippingOptionsForCartWorkflow", - "description": "List a cart's shipping options.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/refreshCartItemsWorkflow", - "title": "refreshCartItemsWorkflow", - "description": "Refresh a cart's details after an update.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/refreshCartShippingMethodsWorkflow", - "title": "refreshCartShippingMethodsWorkflow", - "description": "Refresh a cart's shipping methods after an update.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/refreshPaymentCollectionForCartWorkflow", - "title": "refreshPaymentCollectionForCartWorkflow", - "description": "Refresh a cart's payment collection details.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/transferCartCustomerWorkflow", - "title": "transferCartCustomerWorkflow", - "description": "Refresh a cart's payment collection details.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateCartPromotionsWorkflow", - "title": "updateCartPromotionsWorkflow", - "description": "Update a cart's applied promotions to add, replace, or remove them.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateCartWorkflow", - "title": "updateCartWorkflow", - "description": "Update a cart's details, such as region, address, and more.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateLineItemInCartWorkflow", - "title": "updateLineItemInCartWorkflow", - "description": "Update a cart's line item.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateTaxLinesWorkflow", - "title": "updateTaxLinesWorkflow", - "description": "Update a cart's tax lines.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/addShippingMethodToCartStep", - "title": "addShippingMethodToCartStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/confirmInventoryStep", - "title": "confirmInventoryStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createCartsStep", - "title": "createCartsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createLineItemAdjustmentsStep", - "title": "createLineItemAdjustmentsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createLineItemsStep", - "title": "createLineItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createPaymentCollectionsStep", - "title": "createPaymentCollectionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createShippingMethodAdjustmentsStep", - "title": "createShippingMethodAdjustmentsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/findOneOrAnyRegionStep", - "title": "findOneOrAnyRegionStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/findOrCreateCustomerStep", - "title": "findOrCreateCustomerStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/findSalesChannelStep", - "title": "findSalesChannelStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getActionsToComputeFromPromotionsStep", - "title": "getActionsToComputeFromPromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getLineItemActionsStep", - "title": "getLineItemActionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getPromotionCodesToApply", - "title": "getPromotionCodesToApply", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getVariantPriceSetsStep", - "title": "getVariantPriceSetsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getVariantsStep", - "title": "getVariantsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/prepareAdjustmentsFromPromotionActionsStep", - "title": "prepareAdjustmentsFromPromotionActionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/removeLineItemAdjustmentsStep", - "title": "removeLineItemAdjustmentsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/removeShippingMethodAdjustmentsStep", - "title": "removeShippingMethodAdjustmentsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/removeShippingMethodFromCartStep", - "title": "removeShippingMethodFromCartStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/reserveInventoryStep", - "title": "reserveInventoryStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/retrieveCartStep", - "title": "retrieveCartStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/setTaxLinesForItemsStep", - "title": "setTaxLinesForItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateCartPromotionsStep", - "title": "updateCartPromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateCartsStep", - "title": "updateCartsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateLineItemsStep", - "title": "updateLineItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateShippingMethodsStep", - "title": "updateShippingMethodsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateAndReturnShippingMethodsDataStep", - "title": "validateAndReturnShippingMethodsDataStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateCartPaymentsStep", - "title": "validateCartPaymentsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateCartShippingOptionsPriceStep", - "title": "validateCartShippingOptionsPriceStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateCartShippingOptionsStep", - "title": "validateCartShippingOptionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateCartStep", - "title": "validateCartStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateLineItemPricesStep", - "title": "validateLineItemPricesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateShippingStep", - "title": "validateShippingStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateVariantPricesStep", - "title": "validateVariantPricesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/validateExistingPaymentCollectionStep", - "title": "validateExistingPaymentCollectionStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Common", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchLinksWorkflow", - "title": "batchLinksWorkflow", - "description": "Manage links between two records of linked data models.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createLinksWorkflow", - "title": "createLinksWorkflow", - "description": "Create links between two records of linked data models.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/dismissLinksWorkflow", - "title": "dismissLinksWorkflow", - "description": "Dismiss links between two records of linked data models.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateLinksWorkflow", - "title": "updateLinksWorkflow", - "description": "Update links between two records of linked data models.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createRemoteLinkStep", + "path": "/references/helper-steps/createRemoteLinkStep", "title": "createRemoteLinkStep", "description": "", "children": [] @@ -19903,7 +19553,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/steps/dismissRemoteLinkStep", + "path": "/references/helper-steps/dismissRemoteLinkStep", "title": "dismissRemoteLinkStep", "description": "", "children": [] @@ -19912,7 +19562,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/steps/emitEventStep", + "path": "/references/helper-steps/emitEventStep", "title": "emitEventStep", "description": "", "children": [] @@ -19921,7 +19571,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/steps/removeRemoteLinkStep", + "path": "/references/helper-steps/removeRemoteLinkStep", "title": "removeRemoteLinkStep", "description": "", "children": [] @@ -19930,7 +19580,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/steps/updateRemoteLinksStep", + "path": "/references/helper-steps/updateRemoteLinksStep", "title": "updateRemoteLinksStep", "description": "", "children": [] @@ -19939,7 +19589,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/steps/useQueryGraphStep", + "path": "/references/helper-steps/useQueryGraphStep", "title": "useQueryGraphStep", "description": "", "children": [] @@ -19948,7 +19598,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/steps/useRemoteQueryStep", + "path": "/references/helper-steps/useRemoteQueryStep", "title": "useRemoteQueryStep", "description": "", "children": [] @@ -19957,5255 +19607,6164 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "link", - "path": "/references/medusa-workflows/steps/validatePresenceOfStep", + "path": "/references/helper-steps/validatePresenceOfStep", "title": "validatePresenceOfStep", "description": "", "children": [] } - ], - "loaded": true + ] } - ], - "loaded": true, - "initialOpen": false + ] }, - { - "type": "category", - "title": "Customer", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCustomerAccountWorkflow", - "title": "createCustomerAccountWorkflow", - "description": "Create or register a customer account.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCustomerAddressesWorkflow", - "title": "createCustomerAddressesWorkflow", - "description": "Create one or more customer addresses.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCustomersWorkflow", - "title": "createCustomersWorkflow", - "description": "Create one or more customers.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteCustomerAddressesWorkflow", - "title": "deleteCustomerAddressesWorkflow", - "description": "Delete one or more customer addresses.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteCustomersWorkflow", - "title": "deleteCustomersWorkflow", - "description": "Delete one or more customers.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeCustomerAccountWorkflow", - "title": "removeCustomerAccountWorkflow", - "description": "Delete a customer account and its auth identity association.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateCustomerAddressesWorkflow", - "title": "updateCustomerAddressesWorkflow", - "description": "Update one or more customer addresses.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateCustomersWorkflow", - "title": "updateCustomersWorkflow", - "description": "Update one or more customers.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createCustomerAddressesStep", - "title": "createCustomerAddressesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createCustomersStep", - "title": "createCustomersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteCustomerAddressesStep", - "title": "deleteCustomerAddressesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteCustomersStep", - "title": "deleteCustomersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/maybeUnsetDefaultBillingAddressesStep", - "title": "maybeUnsetDefaultBillingAddressesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/maybeUnsetDefaultShippingAddressesStep", - "title": "maybeUnsetDefaultShippingAddressesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateCustomerAddressesStep", - "title": "updateCustomerAddressesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateCustomersStep", - "title": "updateCustomersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateCustomerAccountCreation", - "title": "validateCustomerAccountCreation", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Customer Group", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCustomerGroupsWorkflow", - "title": "createCustomerGroupsWorkflow", - "description": "Create one or more customer groups.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteCustomerGroupsWorkflow", - "title": "deleteCustomerGroupsWorkflow", - "description": "Delete one or more customer groups.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/linkCustomerGroupsToCustomerWorkflow", - "title": "linkCustomerGroupsToCustomerWorkflow", - "description": "Manage groups of a customer.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/linkCustomersToCustomerGroupWorkflow", - "title": "linkCustomersToCustomerGroupWorkflow", - "description": "Manage the customers of a customer group.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateCustomerGroupsWorkflow", - "title": "updateCustomerGroupsWorkflow", - "description": "Update one or more customer groups.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createCustomerGroupsStep", - "title": "createCustomerGroupsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteCustomerGroupStep", - "title": "deleteCustomerGroupStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/linkCustomerGroupsToCustomerStep", - "title": "linkCustomerGroupsToCustomerStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/linkCustomersToCustomerGroupStep", - "title": "linkCustomersToCustomerGroupStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateCustomerGroupsStep", - "title": "updateCustomerGroupsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Defaults", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createDefaultsWorkflow", - "title": "createDefaultsWorkflow", - "description": "Create default data for a Medusa application.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createDefaultStoreStep", - "title": "createDefaultStoreStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "File", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteFilesWorkflow", - "title": "deleteFilesWorkflow", - "description": "Delete files from the database and storage.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/uploadFilesWorkflow", - "title": "uploadFilesWorkflow", - "description": "Upload files using the installed File Module Provider.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteFilesStep", - "title": "deleteFilesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/uploadFilesStep", - "title": "uploadFilesStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Fulfillment", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchShippingOptionRulesWorkflow", - "title": "batchShippingOptionRulesWorkflow", - "description": "Manage shipping option rules.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/calculateShippingOptionsPricesWorkflow", - "title": "calculateShippingOptionsPricesWorkflow", - "description": "Calculate shipping option prices in a cart.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelFulfillmentWorkflow", - "title": "cancelFulfillmentWorkflow", - "description": "Cancel a fulfillment.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createFulfillmentWorkflow", - "title": "createFulfillmentWorkflow", - "description": "Create a fulfillment.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createReturnFulfillmentWorkflow", - "title": "createReturnFulfillmentWorkflow", - "description": "Create a fulfillment for a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createServiceZonesWorkflow", - "title": "createServiceZonesWorkflow", - "description": "Create one or more service zones.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createShipmentWorkflow", - "title": "createShipmentWorkflow", - "description": "Create a shipment for a fulfillment.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createShippingOptionsWorkflow", - "title": "createShippingOptionsWorkflow", - "description": "Create shipping options.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createShippingProfilesWorkflow", - "title": "createShippingProfilesWorkflow", - "description": "Create one or more shipping profiles.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteFulfillmentSetsWorkflow", - "title": "deleteFulfillmentSetsWorkflow", - "description": "Delete one or more fulfillment sets.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteServiceZonesWorkflow", - "title": "deleteServiceZonesWorkflow", - "description": "Delete one or more service zones.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteShippingOptionsWorkflow", - "title": "deleteShippingOptionsWorkflow", - "description": "Delete one or more shipping options.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/markFulfillmentAsDeliveredWorkflow", - "title": "markFulfillmentAsDeliveredWorkflow", - "description": "Mark a fulfillment as delivered.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateFulfillmentWorkflow", - "title": "updateFulfillmentWorkflow", - "description": "Update a fulfillment.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateServiceZonesWorkflow", - "title": "updateServiceZonesWorkflow", - "description": "Update one or more service zones.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateShippingOptionsWorkflow", - "title": "updateShippingOptionsWorkflow", - "description": "Update one or more shipping options.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateShippingProfilesWorkflow", - "title": "updateShippingProfilesWorkflow", - "description": "Update one or more shipping profiles.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/buildPriceSet", - "title": "buildPriceSet", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/calculateShippingOptionsPricesStep", - "title": "calculateShippingOptionsPricesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/cancelFulfillmentStep", - "title": "cancelFulfillmentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createFulfillmentSets", - "title": "createFulfillmentSets", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createFulfillmentStep", - "title": "createFulfillmentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createReturnFulfillmentStep", - "title": "createReturnFulfillmentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createServiceZonesStep", - "title": "createServiceZonesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createShippingOptionRulesStep", - "title": "createShippingOptionRulesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createShippingOptionsPriceSetsStep", - "title": "createShippingOptionsPriceSetsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createShippingProfilesStep", - "title": "createShippingProfilesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteFulfillmentSetsStep", - "title": "deleteFulfillmentSetsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteServiceZonesStep", - "title": "deleteServiceZonesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteShippingOptionRulesStep", - "title": "deleteShippingOptionRulesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteShippingOptionsStep", - "title": "deleteShippingOptionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/setShippingOptionsPricesStep", - "title": "setShippingOptionsPricesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateFulfillmentStep", - "title": "updateFulfillmentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateServiceZonesStep", - "title": "updateServiceZonesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateShippingOptionRulesStep", - "title": "updateShippingOptionRulesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateShippingProfilesStep", - "title": "updateShippingProfilesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/upsertShippingOptionsStep", - "title": "upsertShippingOptionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateShipmentStep", - "title": "validateShipmentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateShippingOptionPricesStep", - "title": "validateShippingOptionPricesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/validateFulfillmentDeliverabilityStep", - "title": "validateFulfillmentDeliverabilityStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Inventory", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchInventoryItemLevelsWorkflow", - "title": "batchInventoryItemLevelsWorkflow", - "description": "Manage inventory levels in bulk.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/bulkCreateDeleteLevelsWorkflow", - "title": "bulkCreateDeleteLevelsWorkflow", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createInventoryItemsWorkflow", - "title": "createInventoryItemsWorkflow", - "description": "Create one or more inventory items.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createInventoryLevelsWorkflow", - "title": "createInventoryLevelsWorkflow", - "description": "Create one or more inventory levels.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteInventoryItemWorkflow", - "title": "deleteInventoryItemWorkflow", - "description": "Delete one or more inventory items.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteInventoryLevelsWorkflow", - "title": "deleteInventoryLevelsWorkflow", - "description": "Delete one or more inventory levels.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateInventoryItemsWorkflow", - "title": "updateInventoryItemsWorkflow", - "description": "Update one or more inventory items.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateInventoryLevelsWorkflow", - "title": "updateInventoryLevelsWorkflow", - "description": "Update one or more inventory levels.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/adjustInventoryLevelsStep", - "title": "adjustInventoryLevelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/attachInventoryItemToVariants", - "title": "attachInventoryItemToVariants", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createInventoryItemsStep", - "title": "createInventoryItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createInventoryLevelsStep", - "title": "createInventoryLevelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteInventoryItemStep", - "title": "deleteInventoryItemStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteInventoryLevelsStep", - "title": "deleteInventoryLevelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateInventoryItemsStep", - "title": "updateInventoryItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateInventoryLevelsStep", - "title": "updateInventoryLevelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateInventoryDeleteStep", - "title": "validateInventoryDeleteStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateInventoryItemsForCreate", - "title": "validateInventoryItemsForCreate", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateInventoryLocationsStep", - "title": "validateInventoryLocationsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/validateInventoryLevelsDelete", - "title": "validateInventoryLevelsDelete", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Invite", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/acceptInviteWorkflow", - "title": "acceptInviteWorkflow", - "description": "Accept invite and create user.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createInvitesWorkflow", - "title": "createInvitesWorkflow", - "description": "Create one or more user invites.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteInvitesWorkflow", - "title": "deleteInvitesWorkflow", - "description": "Delete one or more user invites.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/refreshInviteTokensWorkflow", - "title": "refreshInviteTokensWorkflow", - "description": "Refresh user invite tokens.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createInviteStep", - "title": "createInviteStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteInvitesStep", - "title": "deleteInvitesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/refreshInviteTokensStep", - "title": "refreshInviteTokensStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateTokenStep", - "title": "validateTokenStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Line Item", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteLineItemsWorkflow", - "title": "deleteLineItemsWorkflow", - "description": "Delete line items from a cart.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteLineItemsStep", - "title": "deleteLineItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/listLineItemsStep", - "title": "listLineItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateLineItemsStepWithSelector", - "title": "updateLineItemsStepWithSelector", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Notification", - "children": [ - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/notifyOnFailureStep", - "title": "notifyOnFailureStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/sendNotificationsStep", - "title": "sendNotificationsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Order", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/acceptOrderTransferWorkflow", - "title": "acceptOrderTransferWorkflow", - "description": "Accept an order transfer request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/addOrderLineItemsWorkflow", - "title": "addOrderLineItemsWorkflow", - "description": "Add line items to an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/archiveOrderWorkflow", - "title": "archiveOrderWorkflow", - "description": "Archive one or more orders.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginClaimOrderWorkflow", - "title": "beginClaimOrderWorkflow", - "description": "Create an order claim in requested state.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginExchangeOrderWorkflow", - "title": "beginExchangeOrderWorkflow", - "description": "Request an order exchange.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginOrderEditOrderWorkflow", - "title": "beginOrderEditOrderWorkflow", - "description": "Create an order edit request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginReceiveReturnWorkflow", - "title": "beginReceiveReturnWorkflow", - "description": "Request a return receival.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginReturnOrderWorkflow", - "title": "beginReturnOrderWorkflow", - "description": "Create a return for an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelBeginOrderClaimWorkflow", - "title": "cancelBeginOrderClaimWorkflow", - "description": "Cancel a requested order claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelBeginOrderEditWorkflow", - "title": "cancelBeginOrderEditWorkflow", - "description": "Cancel a requested order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelBeginOrderExchangeWorkflow", - "title": "cancelBeginOrderExchangeWorkflow", - "description": "Cancel a requested order exchange.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelOrderChangeWorkflow", - "title": "cancelOrderChangeWorkflow", - "description": "Cancel an order change.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelOrderClaimWorkflow", - "title": "cancelOrderClaimWorkflow", - "description": "Cancel a confirmed order claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelOrderExchangeWorkflow", - "title": "cancelOrderExchangeWorkflow", - "description": "Cancel an exchange for an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelOrderFulfillmentWorkflow", - "title": "cancelOrderFulfillmentWorkflow", - "description": "Cancel an order's fulfillment.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelOrderTransferRequestWorkflow", - "title": "cancelOrderTransferRequestWorkflow", - "description": "Cancel an order transfer request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelOrderWorkflow", - "title": "cancelOrderWorkflow", - "description": "Cancel an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelReturnReceiveWorkflow", - "title": "cancelReturnReceiveWorkflow", - "description": "Cancel a return receival.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelReturnRequestWorkflow", - "title": "cancelReturnRequestWorkflow", - "description": "Cancel a requested return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelReturnWorkflow", - "title": "cancelReturnWorkflow", - "description": "Cancel a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/completeOrderWorkflow", - "title": "completeOrderWorkflow", - "description": "Complete one or more orders.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmClaimRequestWorkflow", - "title": "confirmClaimRequestWorkflow", - "description": "Confirm a requested claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmExchangeRequestWorkflow", - "title": "confirmExchangeRequestWorkflow", - "description": "Confirm an exchange request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmOrderEditRequestWorkflow", - "title": "confirmOrderEditRequestWorkflow", - "description": "Confirm an order edit request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmReturnReceiveWorkflow", - "title": "confirmReturnReceiveWorkflow", - "description": "Confirm a return receival request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmReturnRequestWorkflow", - "title": "confirmReturnRequestWorkflow", - "description": "Confirm a return request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createAndCompleteReturnOrderWorkflow", - "title": "createAndCompleteReturnOrderWorkflow", - "description": "Create and complete a return for an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createClaimShippingMethodWorkflow", - "title": "createClaimShippingMethodWorkflow", - "description": "Create an inbound or outbound shipping method for a claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createExchangeShippingMethodWorkflow", - "title": "createExchangeShippingMethodWorkflow", - "description": "Create an inbound or outbound shipping method for an exchange.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrUpdateOrderPaymentCollectionWorkflow", - "title": "createOrUpdateOrderPaymentCollectionWorkflow", - "description": "Create or update payment collection for an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrderChangeActionsWorkflow", - "title": "createOrderChangeActionsWorkflow", - "description": "Create an order change action.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrderChangeWorkflow", - "title": "createOrderChangeWorkflow", - "description": "Create an order change.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrderEditShippingMethodWorkflow", - "title": "createOrderEditShippingMethodWorkflow", - "description": "Create a shipping method for an order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrderFulfillmentWorkflow", - "title": "createOrderFulfillmentWorkflow", - "description": "Creates a fulfillment for an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrderPaymentCollectionWorkflow", - "title": "createOrderPaymentCollectionWorkflow", - "description": "Create a payment collection for an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrderShipmentWorkflow", - "title": "createOrderShipmentWorkflow", - "description": "Creates a shipment for an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrderWorkflow", - "title": "createOrderWorkflow", - "description": "Create an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrdersWorkflow", - "title": "createOrdersWorkflow", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createReturnShippingMethodWorkflow", - "title": "createReturnShippingMethodWorkflow", - "description": "Create a shipping method for a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/declineOrderChangeWorkflow", - "title": "declineOrderChangeWorkflow", - "description": "Decline an order change.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/declineOrderTransferRequestWorkflow", - "title": "declineOrderTransferRequestWorkflow", - "description": "Decline a requested order transfer.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteOrderChangeActionsWorkflow", - "title": "deleteOrderChangeActionsWorkflow", - "description": "Delete one or more order change actions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteOrderChangeWorkflow", - "title": "deleteOrderChangeWorkflow", - "description": "Delete one or more order changes.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/dismissItemReturnRequestWorkflow", - "title": "dismissItemReturnRequestWorkflow", - "description": "Dismiss items from a return request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/getOrderDetailWorkflow", - "title": "getOrderDetailWorkflow", - "description": "Retrieve an order's details.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/getOrdersListWorkflow", - "title": "getOrdersListWorkflow", - "description": "Retrieve a list of orders.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow", - "title": "markOrderFulfillmentAsDeliveredWorkflow", - "description": "Mark a fulfillment in an order as delivered.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderClaimAddNewItemWorkflow", - "title": "orderClaimAddNewItemWorkflow", - "description": "Add outbound or new items to a claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderClaimItemWorkflow", - "title": "orderClaimItemWorkflow", - "description": "Add order items to a claim as claim items.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderClaimRequestItemReturnWorkflow", - "title": "orderClaimRequestItemReturnWorkflow", - "description": "Request one or more items to be returned as part of a claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderEditAddNewItemWorkflow", - "title": "orderEditAddNewItemWorkflow", - "description": "Add new items to an order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderEditUpdateItemQuantityWorkflow", - "title": "orderEditUpdateItemQuantityWorkflow", - "description": "Update the quantity of an existing order item in the order's edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderExchangeAddNewItemWorkflow", - "title": "orderExchangeAddNewItemWorkflow", - "description": "Add new or outbound items to an exchange.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderExchangeRequestItemReturnWorkflow", - "title": "orderExchangeRequestItemReturnWorkflow", - "description": "Add inbound items to be returned as part of the exchange.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/receiveAndCompleteReturnOrderWorkflow", - "title": "receiveAndCompleteReturnOrderWorkflow", - "description": "Receive and complete a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/receiveItemReturnRequestWorkflow", - "title": "receiveItemReturnRequestWorkflow", - "description": "Mark return items as received.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeAddItemClaimActionWorkflow", - "title": "removeAddItemClaimActionWorkflow", - "description": "Remove outbound (new) items from a claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeClaimShippingMethodWorkflow", - "title": "removeClaimShippingMethodWorkflow", - "description": "Remove an inbound or outbound shipping method from a claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeExchangeShippingMethodWorkflow", - "title": "removeExchangeShippingMethodWorkflow", - "description": "Remove an inbound or outbound shipping method from an exchange.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeItemClaimActionWorkflow", - "title": "removeItemClaimActionWorkflow", - "description": "Remove order items from a claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeItemExchangeActionWorkflow", - "title": "removeItemExchangeActionWorkflow", - "description": "Remove an outbound or new item from an exchange.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeItemOrderEditActionWorkflow", - "title": "removeItemOrderEditActionWorkflow", - "description": "Remove an item that was added to an order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeItemReceiveReturnActionWorkflow", - "title": "removeItemReceiveReturnActionWorkflow", - "description": "Remove an item from a return receival.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeItemReturnActionWorkflow", - "title": "removeItemReturnActionWorkflow", - "description": "Remove an item from a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeOrderEditShippingMethodWorkflow", - "title": "removeOrderEditShippingMethodWorkflow", - "description": "Remove a shipping method from an order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeReturnShippingMethodWorkflow", - "title": "removeReturnShippingMethodWorkflow", - "description": "Remove a shipping method from a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/requestItemReturnWorkflow", - "title": "requestItemReturnWorkflow", - "description": "Add items to a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/requestOrderEditRequestWorkflow", - "title": "requestOrderEditRequestWorkflow", - "description": "Request an order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/requestOrderTransferWorkflow", - "title": "requestOrderTransferWorkflow", - "description": "Request a transfer of an order to a customer.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateClaimAddItemWorkflow", - "title": "updateClaimAddItemWorkflow", - "description": "Update a claim's new or outbound item.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateClaimItemWorkflow", - "title": "updateClaimItemWorkflow", - "description": "Update a claim item, added to the claim from an order item.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateClaimShippingMethodWorkflow", - "title": "updateClaimShippingMethodWorkflow", - "description": "Update an inbound or outbound shipping method of a claim.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateExchangeAddItemWorkflow", - "title": "updateExchangeAddItemWorkflow", - "description": "Update an outbound or new item in an exchange.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateExchangeShippingMethodWorkflow", - "title": "updateExchangeShippingMethodWorkflow", - "description": "Update an exchange's inbound or outbound shipping method.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderChangeActionsWorkflow", - "title": "updateOrderChangeActionsWorkflow", - "description": "Update one or more order change actions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderChangesWorkflow", - "title": "updateOrderChangesWorkflow", - "description": "Update one or more order changes.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderEditAddItemWorkflow", - "title": "updateOrderEditAddItemWorkflow", - "description": "Update a new item in an order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderEditItemQuantityWorkflow", - "title": "updateOrderEditItemQuantityWorkflow", - "description": "Update an existing order item previously added to an order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderEditShippingMethodWorkflow", - "title": "updateOrderEditShippingMethodWorkflow", - "description": "Update a shipping method of an order edit.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderTaxLinesWorkflow", - "title": "updateOrderTaxLinesWorkflow", - "description": "Update the tax lines of items and shipping methods in an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderWorkflow", - "title": "updateOrderWorkflow", - "description": "Update an order's details.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateReceiveItemReturnRequestWorkflow", - "title": "updateReceiveItemReturnRequestWorkflow", - "description": "Update an item in a return receival request.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateRequestItemReturnWorkflow", - "title": "updateRequestItemReturnWorkflow", - "description": "Update a requested item in a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateReturnShippingMethodWorkflow", - "title": "updateReturnShippingMethodWorkflow", - "description": "Update the shipping method of a return.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateReturnWorkflow", - "title": "updateReturnWorkflow", - "description": "Update a return's details.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/addOrderTransactionStep", - "title": "addOrderTransactionStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/archiveOrdersStep", - "title": "archiveOrdersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/cancelOrderChangeStep", - "title": "cancelOrderChangeStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/cancelOrderClaimStep", - "title": "cancelOrderClaimStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/cancelOrderExchangeStep", - "title": "cancelOrderExchangeStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/cancelOrderFulfillmentStep", - "title": "cancelOrderFulfillmentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/cancelOrderReturnStep", - "title": "cancelOrderReturnStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/cancelOrdersStep", - "title": "cancelOrdersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/completeOrdersStep", - "title": "completeOrdersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createCompleteReturnStep", - "title": "createCompleteReturnStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createOrderChangeStep", - "title": "createOrderChangeStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createOrderClaimItemsFromActionsStep", - "title": "createOrderClaimItemsFromActionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createOrderClaimsStep", - "title": "createOrderClaimsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createOrderExchangeItemsFromActionsStep", - "title": "createOrderExchangeItemsFromActionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createOrderExchangesStep", - "title": "createOrderExchangesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createOrderLineItemsStep", - "title": "createOrderLineItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createOrdersStep", - "title": "createOrdersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createReturnsStep", - "title": "createReturnsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/declineOrderChangeStep", - "title": "declineOrderChangeStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteClaimsStep", - "title": "deleteClaimsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteExchangesStep", - "title": "deleteExchangesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteOrderChangeActionsStep", - "title": "deleteOrderChangeActionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteOrderChangesStep", - "title": "deleteOrderChangesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteOrderLineItems", - "title": "deleteOrderLineItems", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteOrderShippingMethods", - "title": "deleteOrderShippingMethods", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteReturnsStep", - "title": "deleteReturnsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/previewOrderChangeStep", - "title": "previewOrderChangeStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/registerOrderChangesStep", - "title": "registerOrderChangesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/registerOrderFulfillmentStep", - "title": "registerOrderFulfillmentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/registerOrderShipmentStep", - "title": "registerOrderShipmentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/setOrderTaxLinesForItemsStep", - "title": "setOrderTaxLinesForItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateOrderChangeActionsStep", - "title": "updateOrderChangeActionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateOrderChangesStep", - "title": "updateOrderChangesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateOrderShippingMethodsStep", - "title": "updateOrderShippingMethodsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateOrdersStep", - "title": "updateOrdersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateReturnItemsStep", - "title": "updateReturnItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateReturnsStep", - "title": "updateReturnsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/acceptOrderTransferValidationStep", - "title": "acceptOrderTransferValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginClaimOrderValidationStep", - "title": "beginClaimOrderValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginOrderEditValidationStep", - "title": "beginOrderEditValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginOrderExchangeValidationStep", - "title": "beginOrderExchangeValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginReceiveReturnValidationStep", - "title": "beginReceiveReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/beginReturnOrderValidationStep", - "title": "beginReturnOrderValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelBeginOrderClaimValidationStep", - "title": "cancelBeginOrderClaimValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelBeginOrderEditValidationStep", - "title": "cancelBeginOrderEditValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelBeginOrderExchangeValidationStep", - "title": "cancelBeginOrderExchangeValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelClaimValidateOrderStep", - "title": "cancelClaimValidateOrderStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelExchangeValidateOrder", - "title": "cancelExchangeValidateOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelOrderFulfillmentValidateOrder", - "title": "cancelOrderFulfillmentValidateOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelReceiveReturnValidationStep", - "title": "cancelReceiveReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelRequestReturnValidationStep", - "title": "cancelRequestReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelReturnValidateOrder", - "title": "cancelReturnValidateOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelTransferOrderRequestValidationStep", - "title": "cancelTransferOrderRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/cancelValidateOrder", - "title": "cancelValidateOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmClaimRequestValidationStep", - "title": "confirmClaimRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmExchangeRequestValidationStep", - "title": "confirmExchangeRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmOrderEditRequestValidationStep", - "title": "confirmOrderEditRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmReceiveReturnValidationStep", - "title": "confirmReceiveReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/confirmReturnRequestValidationStep", - "title": "confirmReturnRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createClaimShippingMethodValidationStep", - "title": "createClaimShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCompleteReturnValidationStep", - "title": "createCompleteReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createExchangeShippingMethodValidationStep", - "title": "createExchangeShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createFulfillmentValidateOrder", - "title": "createFulfillmentValidateOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createOrderEditShippingMethodValidationStep", - "title": "createOrderEditShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createReturnShippingMethodValidationStep", - "title": "createReturnShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createShipmentValidateOrder", - "title": "createShipmentValidateOrder", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/declineTransferOrderRequestValidationStep", - "title": "declineTransferOrderRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteOrderPaymentCollections", - "title": "deleteOrderPaymentCollections", - "description": "Delete a payment collection of an order.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/dismissItemReturnRequestValidationStep", - "title": "dismissItemReturnRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/exchangeAddNewItemValidationStep", - "title": "exchangeAddNewItemValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/exchangeRequestItemReturnValidationStep", - "title": "exchangeRequestItemReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/markPaymentCollectionAsPaid", - "title": "markPaymentCollectionAsPaid", - "description": "Mark a payment collection for an order as paid.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderClaimAddNewItemValidationStep", - "title": "orderClaimAddNewItemValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderClaimItemValidationStep", - "title": "orderClaimItemValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderClaimRequestItemReturnValidationStep", - "title": "orderClaimRequestItemReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderEditAddNewItemValidationStep", - "title": "orderEditAddNewItemValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderEditUpdateItemQuantityValidationStep", - "title": "orderEditUpdateItemQuantityValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/orderFulfillmentDeliverablilityValidationStep", - "title": "orderFulfillmentDeliverablilityValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/receiveCompleteReturnValidationStep", - "title": "receiveCompleteReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/receiveItemReturnRequestValidationStep", - "title": "receiveItemReturnRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeClaimAddItemActionValidationStep", - "title": "removeClaimAddItemActionValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeClaimItemActionValidationStep", - "title": "removeClaimItemActionValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeClaimShippingMethodValidationStep", - "title": "removeClaimShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeExchangeItemActionValidationStep", - "title": "removeExchangeItemActionValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeExchangeShippingMethodValidationStep", - "title": "removeExchangeShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeItemReceiveReturnActionValidationStep", - "title": "removeItemReceiveReturnActionValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeOrderEditItemActionValidationStep", - "title": "removeOrderEditItemActionValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeOrderEditShippingMethodValidationStep", - "title": "removeOrderEditShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeReturnItemActionValidationStep", - "title": "removeReturnItemActionValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeReturnShippingMethodValidationStep", - "title": "removeReturnShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/requestItemReturnValidationStep", - "title": "requestItemReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/requestOrderEditRequestValidationStep", - "title": "requestOrderEditRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/requestOrderTransferValidationStep", - "title": "requestOrderTransferValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/throwUnlessPaymentCollectionNotPaid", - "title": "throwUnlessPaymentCollectionNotPaid", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/throwUnlessStatusIsNotPaid", - "title": "throwUnlessStatusIsNotPaid", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateClaimAddItemValidationStep", - "title": "updateClaimAddItemValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateClaimItemValidationStep", - "title": "updateClaimItemValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateClaimShippingMethodValidationStep", - "title": "updateClaimShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateExchangeAddItemValidationStep", - "title": "updateExchangeAddItemValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateExchangeShippingMethodValidationStep", - "title": "updateExchangeShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderEditAddItemValidationStep", - "title": "updateOrderEditAddItemValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderEditItemQuantityValidationStep", - "title": "updateOrderEditItemQuantityValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderEditShippingMethodValidationStep", - "title": "updateOrderEditShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateOrderValidationStep", - "title": "updateOrderValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateReceiveItemReturnRequestValidationStep", - "title": "updateReceiveItemReturnRequestValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateRequestItemReturnValidationStep", - "title": "updateRequestItemReturnValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateReturnShippingMethodValidationStep", - "title": "updateReturnShippingMethodValidationStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateReturnValidationStep", - "title": "updateReturnValidationStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Payment", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/capturePaymentWorkflow", - "title": "capturePaymentWorkflow", - "description": "Capture a payment.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/processPaymentWorkflow", - "title": "processPaymentWorkflow", - "description": "Process a payment based on a webhook event.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/refundPaymentWorkflow", - "title": "refundPaymentWorkflow", - "description": "Refund a payment.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/refundPaymentsWorkflow", - "title": "refundPaymentsWorkflow", - "description": "Refund one or more payments.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/authorizePaymentSessionStep", - "title": "authorizePaymentSessionStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/cancelPaymentStep", - "title": "cancelPaymentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/capturePaymentStep", - "title": "capturePaymentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/refundPaymentStep", - "title": "refundPaymentStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/refundPaymentsStep", - "title": "refundPaymentsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/validatePaymentsRefundStep", - "title": "validatePaymentsRefundStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/validateRefundStep", - "title": "validateRefundStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Payment Collection", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createPaymentSessionsWorkflow", - "title": "createPaymentSessionsWorkflow", - "description": "Create payment sessions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createRefundReasonsWorkflow", - "title": "createRefundReasonsWorkflow", - "description": "Create refund reasons.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deletePaymentSessionsWorkflow", - "title": "deletePaymentSessionsWorkflow", - "description": "Delete payment sessions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteRefundReasonsWorkflow", - "title": "deleteRefundReasonsWorkflow", - "description": "Delete refund reasons.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateRefundReasonsWorkflow", - "title": "updateRefundReasonsWorkflow", - "description": "Update refund reasons.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createPaymentAccountHolderStep", - "title": "createPaymentAccountHolderStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createPaymentSessionStep", - "title": "createPaymentSessionStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createRefundReasonStep", - "title": "createRefundReasonStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deletePaymentSessionsStep", - "title": "deletePaymentSessionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteRefundReasonsStep", - "title": "deleteRefundReasonsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updatePaymentCollectionStep", - "title": "updatePaymentCollectionStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateRefundReasonsStep", - "title": "updateRefundReasonsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateDeletedPaymentSessionsStep", - "title": "validateDeletedPaymentSessionsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Price List", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchPriceListPricesWorkflow", - "title": "batchPriceListPricesWorkflow", - "description": "Manage a price list's prices.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createPriceListPricesWorkflow", - "title": "createPriceListPricesWorkflow", - "description": "Create prices in price lists.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createPriceListsWorkflow", - "title": "createPriceListsWorkflow", - "description": "Create one or more price lists.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deletePriceListsWorkflow", - "title": "deletePriceListsWorkflow", - "description": "Delete one or more price lists.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removePriceListPricesWorkflow", - "title": "removePriceListPricesWorkflow", - "description": "Remove prices in price lists.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updatePriceListPricesWorkflow", - "title": "updatePriceListPricesWorkflow", - "description": "Update price lists' prices.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updatePriceListsWorkflow", - "title": "updatePriceListsWorkflow", - "description": "Update one or more price lists.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createPriceListPricesStep", - "title": "createPriceListPricesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createPriceListsStep", - "title": "createPriceListsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deletePriceListsStep", - "title": "deletePriceListsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getExistingPriceListsPriceIdsStep", - "title": "getExistingPriceListsPriceIdsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/removePriceListPricesStep", - "title": "removePriceListPricesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updatePriceListPricesStep", - "title": "updatePriceListPricesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updatePriceListsStep", - "title": "updatePriceListsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validatePriceListsStep", - "title": "validatePriceListsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/validateVariantPriceLinksStep", - "title": "validateVariantPriceLinksStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Pricing", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createPricePreferencesWorkflow", - "title": "createPricePreferencesWorkflow", - "description": "Create one or more price preferences.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deletePricePreferencesWorkflow", - "title": "deletePricePreferencesWorkflow", - "description": "Delete one or more price preferences.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updatePricePreferencesWorkflow", - "title": "updatePricePreferencesWorkflow", - "description": "Update one or more price preferences.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createPricePreferencesStep", - "title": "createPricePreferencesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createPriceSetsStep", - "title": "createPriceSetsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deletePricePreferencesStep", - "title": "deletePricePreferencesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updatePricePreferencesAsArrayStep", - "title": "updatePricePreferencesAsArrayStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updatePricePreferencesStep", - "title": "updatePricePreferencesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updatePriceSetsStep", - "title": "updatePriceSetsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Product", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchLinkProductsToCategoryWorkflow", - "title": "batchLinkProductsToCategoryWorkflow", - "description": "Manage the links between a collection and products.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchLinkProductsToCollectionWorkflow", - "title": "batchLinkProductsToCollectionWorkflow", - "description": "Manage the links between a collection and products.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchProductVariantsWorkflow", - "title": "batchProductVariantsWorkflow", - "description": "Create, update, and delete product variants.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchProductsWorkflow", - "title": "batchProductsWorkflow", - "description": "Manage products in bulk.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCollectionsWorkflow", - "title": "createCollectionsWorkflow", - "description": "Create one or more product collections.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createProductOptionsWorkflow", - "title": "createProductOptionsWorkflow", - "description": "Create one or more product options.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createProductTagsWorkflow", - "title": "createProductTagsWorkflow", - "description": "Create one or more product tags.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createProductTypesWorkflow", - "title": "createProductTypesWorkflow", - "description": "Create one or more product types.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createProductVariantsWorkflow", - "title": "createProductVariantsWorkflow", - "description": "Create one or more product variants.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createProductsWorkflow", - "title": "createProductsWorkflow", - "description": "Create one or more products with options and variants.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteCollectionsWorkflow", - "title": "deleteCollectionsWorkflow", - "description": "Delete one or more product collection.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteProductOptionsWorkflow", - "title": "deleteProductOptionsWorkflow", - "description": "Delete one or more product option.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteProductTagsWorkflow", - "title": "deleteProductTagsWorkflow", - "description": "Delete one or more product tags.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteProductTypesWorkflow", - "title": "deleteProductTypesWorkflow", - "description": "Delete one or more product types.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteProductVariantsWorkflow", - "title": "deleteProductVariantsWorkflow", - "description": "Delete one or more product variants.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteProductsWorkflow", - "title": "deleteProductsWorkflow", - "description": "Delete one or more products.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/exportProductsWorkflow", - "title": "exportProductsWorkflow", - "description": "Export products with filtering capabilities.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/importProductsWorkflow", - "title": "importProductsWorkflow", - "description": "Import products from a CSV file.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateCollectionsWorkflow", - "title": "updateCollectionsWorkflow", - "description": "Update one or more product collections.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateProductOptionsWorkflow", - "title": "updateProductOptionsWorkflow", - "description": "Update one or more product options.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateProductTagsWorkflow", - "title": "updateProductTagsWorkflow", - "description": "Update one or more product tags.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateProductTypesWorkflow", - "title": "updateProductTypesWorkflow", - "description": "Update one or more product types.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateProductVariantsWorkflow", - "title": "updateProductVariantsWorkflow", - "description": "Update one or more product variants.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateProductsWorkflow", - "title": "updateProductsWorkflow", - "description": "Update one or more products with options and variants.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/upsertVariantPricesWorkflow", - "title": "upsertVariantPricesWorkflow", - "description": "Create, update, or remove variants' prices.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/batchLinkProductsToCategoryStep", - "title": "batchLinkProductsToCategoryStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/batchLinkProductsToCollectionStep", - "title": "batchLinkProductsToCollectionStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createCollectionsStep", - "title": "createCollectionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createProductOptionsStep", - "title": "createProductOptionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createProductTagsStep", - "title": "createProductTagsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createProductTypesStep", - "title": "createProductTypesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createProductVariantsStep", - "title": "createProductVariantsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createProductsStep", - "title": "createProductsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createVariantPricingLinkStep", - "title": "createVariantPricingLinkStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteCollectionsStep", - "title": "deleteCollectionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteProductOptionsStep", - "title": "deleteProductOptionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteProductTagsStep", - "title": "deleteProductTagsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteProductTypesStep", - "title": "deleteProductTypesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteProductVariantsStep", - "title": "deleteProductVariantsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteProductsStep", - "title": "deleteProductsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/generateProductCsvStep", - "title": "generateProductCsvStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getAllProductsStep", - "title": "getAllProductsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getProductsStep", - "title": "getProductsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getVariantAvailabilityStep", - "title": "getVariantAvailabilityStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/groupProductsForBatchStep", - "title": "groupProductsForBatchStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/parseProductCsvStep", - "title": "parseProductCsvStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateCollectionsStep", - "title": "updateCollectionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateProductOptionsStep", - "title": "updateProductOptionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateProductTagsStep", - "title": "updateProductTagsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateProductTypesStep", - "title": "updateProductTypesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateProductVariantsStep", - "title": "updateProductVariantsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateProductsStep", - "title": "updateProductsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/waitConfirmationProductImportStep", - "title": "waitConfirmationProductImportStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/validateProductInputStep", - "title": "validateProductInputStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Product Category", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createProductCategoriesWorkflow", - "title": "createProductCategoriesWorkflow", - "description": "Create product categories.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteProductCategoriesWorkflow", - "title": "deleteProductCategoriesWorkflow", - "description": "Delete product categories.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateProductCategoriesWorkflow", - "title": "updateProductCategoriesWorkflow", - "description": "Update product categories.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createProductCategoriesStep", - "title": "createProductCategoriesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteProductCategoriesStep", - "title": "deleteProductCategoriesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateProductCategoriesStep", - "title": "updateProductCategoriesStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Promotion", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow", - "title": "addOrRemoveCampaignPromotionsWorkflow", - "description": "Manage the promotions of a campaign.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/batchPromotionRulesWorkflow", - "title": "batchPromotionRulesWorkflow", - "description": "Manage the rules of a promotion.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createCampaignsWorkflow", - "title": "createCampaignsWorkflow", - "description": "Create one or more campaigns.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createPromotionRulesWorkflow", - "title": "createPromotionRulesWorkflow", - "description": "Create one or more promotion rules.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createPromotionsWorkflow", - "title": "createPromotionsWorkflow", - "description": "Create one or more promotions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteCampaignsWorkflow", - "title": "deleteCampaignsWorkflow", - "description": "Delete one or more campaigns.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deletePromotionRulesWorkflow", - "title": "deletePromotionRulesWorkflow", - "description": "Delete one or more promotion rules.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deletePromotionsWorkflow", - "title": "deletePromotionsWorkflow", - "description": "Delete one or more promotions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateCampaignsWorkflow", - "title": "updateCampaignsWorkflow", - "description": "Update one or more campaigns.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updatePromotionRulesWorkflow", - "title": "updatePromotionRulesWorkflow", - "description": "Update one or more promotion rules.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updatePromotionsStatusWorkflow", - "title": "updatePromotionsStatusWorkflow", - "description": "Update the status of one or more promotions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updatePromotionsWorkflow", - "title": "updatePromotionsWorkflow", - "description": "Update one or more promotions.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/addCampaignPromotionsStep", - "title": "addCampaignPromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/addRulesToPromotionsStep", - "title": "addRulesToPromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createCampaignsStep", - "title": "createCampaignsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createPromotionsStep", - "title": "createPromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteCampaignsStep", - "title": "deleteCampaignsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deletePromotionsStep", - "title": "deletePromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/removeCampaignPromotionsStep", - "title": "removeCampaignPromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/removeRulesFromPromotionsStep", - "title": "removeRulesFromPromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateCampaignsStep", - "title": "updateCampaignsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updatePromotionRulesStep", - "title": "updatePromotionRulesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updatePromotionsStep", - "title": "updatePromotionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updatePromotionsValidationStep", - "title": "updatePromotionsValidationStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Region", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createRegionsWorkflow", - "title": "createRegionsWorkflow", - "description": "Create one or more regions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteRegionsWorkflow", - "title": "deleteRegionsWorkflow", - "description": "Delete one or more regions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateRegionsWorkflow", - "title": "updateRegionsWorkflow", - "description": "Update regions.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createRegionsStep", - "title": "createRegionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteRegionsStep", - "title": "deleteRegionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/setRegionsPaymentProvidersStep", - "title": "setRegionsPaymentProvidersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateRegionsStep", - "title": "updateRegionsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Reservation", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createReservationsWorkflow", - "title": "createReservationsWorkflow", - "description": "Create one or more reservations.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteReservationsByLineItemsWorkflow", - "title": "deleteReservationsByLineItemsWorkflow", - "description": "Delete reservations by their associated line items.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteReservationsWorkflow", - "title": "deleteReservationsWorkflow", - "description": "Delete one or more reservations.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateReservationsWorkflow", - "title": "updateReservationsWorkflow", - "description": "Update one or more reservations.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createReservationsStep", - "title": "createReservationsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteReservationsByLineItemsStep", - "title": "deleteReservationsByLineItemsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteReservationsStep", - "title": "deleteReservationsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateReservationsStep", - "title": "updateReservationsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Return Reason", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createReturnReasonsWorkflow", - "title": "createReturnReasonsWorkflow", - "description": "Create return reasons.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteReturnReasonsWorkflow", - "title": "deleteReturnReasonsWorkflow", - "description": "Delete return reasons.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateReturnReasonsWorkflow", - "title": "updateReturnReasonsWorkflow", - "description": "Update return reasons.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createReturnReasonsStep", - "title": "createReturnReasonsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteReturnReasonStep", - "title": "deleteReturnReasonStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateReturnReasonsStep", - "title": "updateReturnReasonsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Sales Channel", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createSalesChannelsWorkflow", - "title": "createSalesChannelsWorkflow", - "description": "Create sales channels.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteSalesChannelsWorkflow", - "title": "deleteSalesChannelsWorkflow", - "description": "Delete sales channels.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/linkProductsToSalesChannelWorkflow", - "title": "linkProductsToSalesChannelWorkflow", - "description": "Manage the products available in a sales channel.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateSalesChannelsWorkflow", - "title": "updateSalesChannelsWorkflow", - "description": "Update sales channels.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/associateLocationsWithSalesChannelsStep", - "title": "associateLocationsWithSalesChannelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/associateProductsWithSalesChannelsStep", - "title": "associateProductsWithSalesChannelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/canDeleteSalesChannelsOrThrowStep", - "title": "canDeleteSalesChannelsOrThrowStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createDefaultSalesChannelStep", - "title": "createDefaultSalesChannelStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createSalesChannelsStep", - "title": "createSalesChannelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteSalesChannelsStep", - "title": "deleteSalesChannelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/detachLocationsFromSalesChannelsStep", - "title": "detachLocationsFromSalesChannelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/detachProductsFromSalesChannelsStep", - "title": "detachProductsFromSalesChannelsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateSalesChannelsStep", - "title": "updateSalesChannelsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Shipping Options", - "children": [ - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/listShippingOptionsForContextStep", - "title": "listShippingOptionsForContextStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Shipping Profile", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteShippingProfileWorkflow", - "title": "deleteShippingProfileWorkflow", - "description": "Delete shipping profiles.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteShippingProfilesStep", - "title": "deleteShippingProfilesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/validateStepShippingProfileDelete", - "title": "validateStepShippingProfileDelete", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Stock Location", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createLocationFulfillmentSetWorkflow", - "title": "createLocationFulfillmentSetWorkflow", - "description": "Add fulfillment set to a stock location.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createStockLocationsWorkflow", - "title": "createStockLocationsWorkflow", - "description": "Create one or more stock locations.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteStockLocationsWorkflow", - "title": "deleteStockLocationsWorkflow", - "description": "Delete one or more stock locations.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/linkSalesChannelsToStockLocationWorkflow", - "title": "linkSalesChannelsToStockLocationWorkflow", - "description": "Manage the sales channels of a stock location.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateStockLocationsWorkflow", - "title": "updateStockLocationsWorkflow", - "description": "Update stock locations.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createStockLocations", - "title": "createStockLocations", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteStockLocationsStep", - "title": "deleteStockLocationsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateStockLocationsStep", - "title": "updateStockLocationsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Store", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createStoresWorkflow", - "title": "createStoresWorkflow", - "description": "Create one or more stores.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteStoresWorkflow", - "title": "deleteStoresWorkflow", - "description": "Delete one or more stores.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateStoresWorkflow", - "title": "updateStoresWorkflow", - "description": "Update stores.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createStoresStep", - "title": "createStoresStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteStoresStep", - "title": "deleteStoresStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateStoresStep", - "title": "updateStoresStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "Tax", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createTaxRateRulesWorkflow", - "title": "createTaxRateRulesWorkflow", - "description": "Create one or more tax rules for rates.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createTaxRatesWorkflow", - "title": "createTaxRatesWorkflow", - "description": "Create one or more tax rates.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createTaxRegionsWorkflow", - "title": "createTaxRegionsWorkflow", - "description": "Create one or more tax regions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteTaxRateRulesWorkflow", - "title": "deleteTaxRateRulesWorkflow", - "description": "Delete one or more tax rate rules.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteTaxRatesWorkflow", - "title": "deleteTaxRatesWorkflow", - "description": "Delete one or more tax rates.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteTaxRegionsWorkflow", - "title": "deleteTaxRegionsWorkflow", - "description": "Delete one or more tax regions.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/setTaxRateRulesWorkflow", - "title": "setTaxRateRulesWorkflow", - "description": "Set the rules of tax rates.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateTaxRatesWorkflow", - "title": "updateTaxRatesWorkflow", - "description": "Update tax rates.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateTaxRegionsWorkflow", - "title": "updateTaxRegionsWorkflow", - "description": "Update one or more tax regions.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createTaxRateRulesStep", - "title": "createTaxRateRulesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createTaxRatesStep", - "title": "createTaxRatesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createTaxRegionsStep", - "title": "createTaxRegionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteTaxRateRulesStep", - "title": "deleteTaxRateRulesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteTaxRatesStep", - "title": "deleteTaxRatesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteTaxRegionsStep", - "title": "deleteTaxRegionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/getItemTaxLinesStep", - "title": "getItemTaxLinesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/listTaxRateIdsStep", - "title": "listTaxRateIdsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/listTaxRateRuleIdsStep", - "title": "listTaxRateRuleIdsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateTaxRatesStep", - "title": "updateTaxRatesStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateTaxRegionsStep", - "title": "updateTaxRegionsStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/maybeListTaxRateRuleIdsStep", - "title": "maybeListTaxRateRuleIdsStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - }, - { - "type": "category", - "title": "User", - "children": [ - { - "type": "sub-category", - "title": "Workflows", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createUserAccountWorkflow", - "title": "createUserAccountWorkflow", - "description": "Create a user account and attach an auth identity.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/createUsersWorkflow", - "title": "createUsersWorkflow", - "description": "Create one or more users.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/deleteUsersWorkflow", - "title": "deleteUsersWorkflow", - "description": "Delete one or more users.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/removeUserAccountWorkflow", - "title": "removeUserAccountWorkflow", - "description": "Delete a user and remove the association to its auth identity.", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/updateUsersWorkflow", - "title": "updateUsersWorkflow", - "description": "Update one or more users.", - "children": [] - } - ], - "loaded": true - }, - { - "type": "sub-category", - "title": "Steps", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/createUsersStep", - "title": "createUsersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/deleteUsersStep", - "title": "deleteUsersStep", - "description": "", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/references/medusa-workflows/steps/updateUsersStep", - "title": "updateUsersStep", - "description": "", - "children": [] - } - ], - "loaded": true - } - ], - "loaded": true, - "initialOpen": false - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Testing Framework", - "path": "/test-tools-reference", - "isChildSidebar": true, - "children": [ { "loaded": true, "isPathHref": true, - "type": "category", - "title": "Functions", + "type": "sidebar", + "sidebar_id": "core-flows", + "title": "Core Workflows", + "custom_autogenerate": "core-flows", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "title": "medusaIntegrationTestRunner", - "path": "/test-tools-reference/medusaIntegrationTestRunner", + "title": "Overview", + "path": "/medusa-workflows-reference", "children": [] }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Api Key", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createApiKeysWorkflow", + "title": "createApiKeysWorkflow", + "description": "Create secret or publishable API keys.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteApiKeysWorkflow", + "title": "deleteApiKeysWorkflow", + "description": "Delete secret or publishable API keys.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/linkSalesChannelsToApiKeyWorkflow", + "title": "linkSalesChannelsToApiKeyWorkflow", + "description": "Manage the sales channels of a publishable API key.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/revokeApiKeysWorkflow", + "title": "revokeApiKeysWorkflow", + "description": "Revoke secret or publishable API keys.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateApiKeysWorkflow", + "title": "updateApiKeysWorkflow", + "description": "Update secret or publishable API keys.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createApiKeysStep", + "title": "createApiKeysStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteApiKeysStep", + "title": "deleteApiKeysStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/linkSalesChannelsToApiKeyStep", + "title": "linkSalesChannelsToApiKeyStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/revokeApiKeysStep", + "title": "revokeApiKeysStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateApiKeysStep", + "title": "updateApiKeysStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateSalesChannelsExistStep", + "title": "validateSalesChannelsExistStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Auth", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/generateResetPasswordTokenWorkflow", + "title": "generateResetPasswordTokenWorkflow", + "description": "Generate a reset password token for a user or customer.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/setAuthAppMetadataStep", + "title": "setAuthAppMetadataStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Cart", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/addShippingMethodToCartWorkflow", + "title": "addShippingMethodToCartWorkflow", + "description": "Add a shipping method to a cart.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/addToCartWorkflow", + "title": "addToCartWorkflow", + "description": "Add a line item to a cart.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/completeCartWorkflow", + "title": "completeCartWorkflow", + "description": "Complete a cart and place an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmVariantInventoryWorkflow", + "title": "confirmVariantInventoryWorkflow", + "description": "Validate that a variant is in-stock before adding to the cart.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCartCreditLinesWorkflow", + "title": "createCartCreditLinesWorkflow", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCartWorkflow", + "title": "createCartWorkflow", + "description": "Create a cart specifying region, items, and more.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createPaymentCollectionForCartWorkflow", + "title": "createPaymentCollectionForCartWorkflow", + "description": "Create payment collection for cart.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteCartCreditLinesWorkflow", + "title": "deleteCartCreditLinesWorkflow", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/listShippingOptionsForCartWithPricingWorkflow", + "title": "listShippingOptionsForCartWithPricingWorkflow", + "description": "List a cart's shipping options with prices.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/listShippingOptionsForCartWorkflow", + "title": "listShippingOptionsForCartWorkflow", + "description": "List a cart's shipping options.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/refreshCartItemsWorkflow", + "title": "refreshCartItemsWorkflow", + "description": "Refresh a cart's details after an update.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/refreshCartShippingMethodsWorkflow", + "title": "refreshCartShippingMethodsWorkflow", + "description": "Refresh a cart's shipping methods after an update.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/refreshPaymentCollectionForCartWorkflow", + "title": "refreshPaymentCollectionForCartWorkflow", + "description": "Refresh a cart's payment collection details.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/transferCartCustomerWorkflow", + "title": "transferCartCustomerWorkflow", + "description": "Refresh a cart's payment collection details.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateCartPromotionsWorkflow", + "title": "updateCartPromotionsWorkflow", + "description": "Update a cart's applied promotions to add, replace, or remove them.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateCartWorkflow", + "title": "updateCartWorkflow", + "description": "Update a cart's details, such as region, address, and more.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateLineItemInCartWorkflow", + "title": "updateLineItemInCartWorkflow", + "description": "Update a cart's line item.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateTaxLinesWorkflow", + "title": "updateTaxLinesWorkflow", + "description": "Update a cart's tax lines.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/addShippingMethodToCartStep", + "title": "addShippingMethodToCartStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/confirmInventoryStep", + "title": "confirmInventoryStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createCartsStep", + "title": "createCartsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createLineItemAdjustmentsStep", + "title": "createLineItemAdjustmentsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createLineItemsStep", + "title": "createLineItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createPaymentCollectionsStep", + "title": "createPaymentCollectionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createShippingMethodAdjustmentsStep", + "title": "createShippingMethodAdjustmentsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/findOneOrAnyRegionStep", + "title": "findOneOrAnyRegionStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/findOrCreateCustomerStep", + "title": "findOrCreateCustomerStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/findSalesChannelStep", + "title": "findSalesChannelStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getActionsToComputeFromPromotionsStep", + "title": "getActionsToComputeFromPromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getLineItemActionsStep", + "title": "getLineItemActionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getPromotionCodesToApply", + "title": "getPromotionCodesToApply", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getVariantPriceSetsStep", + "title": "getVariantPriceSetsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getVariantsStep", + "title": "getVariantsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/prepareAdjustmentsFromPromotionActionsStep", + "title": "prepareAdjustmentsFromPromotionActionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/removeLineItemAdjustmentsStep", + "title": "removeLineItemAdjustmentsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/removeShippingMethodAdjustmentsStep", + "title": "removeShippingMethodAdjustmentsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/removeShippingMethodFromCartStep", + "title": "removeShippingMethodFromCartStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/reserveInventoryStep", + "title": "reserveInventoryStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/retrieveCartStep", + "title": "retrieveCartStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/setTaxLinesForItemsStep", + "title": "setTaxLinesForItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateCartPromotionsStep", + "title": "updateCartPromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateCartsStep", + "title": "updateCartsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateLineItemsStep", + "title": "updateLineItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateShippingMethodsStep", + "title": "updateShippingMethodsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateAndReturnShippingMethodsDataStep", + "title": "validateAndReturnShippingMethodsDataStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateCartPaymentsStep", + "title": "validateCartPaymentsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateCartShippingOptionsPriceStep", + "title": "validateCartShippingOptionsPriceStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateCartShippingOptionsStep", + "title": "validateCartShippingOptionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateCartStep", + "title": "validateCartStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateLineItemPricesStep", + "title": "validateLineItemPricesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateShippingStep", + "title": "validateShippingStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateVariantPricesStep", + "title": "validateVariantPricesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/validateExistingPaymentCollectionStep", + "title": "validateExistingPaymentCollectionStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Common", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchLinksWorkflow", + "title": "batchLinksWorkflow", + "description": "Manage links between two records of linked data models.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createLinksWorkflow", + "title": "createLinksWorkflow", + "description": "Create links between two records of linked data models.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/dismissLinksWorkflow", + "title": "dismissLinksWorkflow", + "description": "Dismiss links between two records of linked data models.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateLinksWorkflow", + "title": "updateLinksWorkflow", + "description": "Update links between two records of linked data models.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createRemoteLinkStep", + "title": "createRemoteLinkStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/dismissRemoteLinkStep", + "title": "dismissRemoteLinkStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/emitEventStep", + "title": "emitEventStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/removeRemoteLinkStep", + "title": "removeRemoteLinkStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateRemoteLinksStep", + "title": "updateRemoteLinksStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/useQueryGraphStep", + "title": "useQueryGraphStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/useRemoteQueryStep", + "title": "useRemoteQueryStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validatePresenceOfStep", + "title": "validatePresenceOfStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Customer", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCustomerAccountWorkflow", + "title": "createCustomerAccountWorkflow", + "description": "Create or register a customer account.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCustomerAddressesWorkflow", + "title": "createCustomerAddressesWorkflow", + "description": "Create one or more customer addresses.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCustomersWorkflow", + "title": "createCustomersWorkflow", + "description": "Create one or more customers.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteCustomerAddressesWorkflow", + "title": "deleteCustomerAddressesWorkflow", + "description": "Delete one or more customer addresses.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteCustomersWorkflow", + "title": "deleteCustomersWorkflow", + "description": "Delete one or more customers.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeCustomerAccountWorkflow", + "title": "removeCustomerAccountWorkflow", + "description": "Delete a customer account and its auth identity association.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateCustomerAddressesWorkflow", + "title": "updateCustomerAddressesWorkflow", + "description": "Update one or more customer addresses.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateCustomersWorkflow", + "title": "updateCustomersWorkflow", + "description": "Update one or more customers.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createCustomerAddressesStep", + "title": "createCustomerAddressesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createCustomersStep", + "title": "createCustomersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteCustomerAddressesStep", + "title": "deleteCustomerAddressesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteCustomersStep", + "title": "deleteCustomersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/maybeUnsetDefaultBillingAddressesStep", + "title": "maybeUnsetDefaultBillingAddressesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/maybeUnsetDefaultShippingAddressesStep", + "title": "maybeUnsetDefaultShippingAddressesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateCustomerAddressesStep", + "title": "updateCustomerAddressesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateCustomersStep", + "title": "updateCustomersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateCustomerAccountCreation", + "title": "validateCustomerAccountCreation", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Customer Group", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCustomerGroupsWorkflow", + "title": "createCustomerGroupsWorkflow", + "description": "Create one or more customer groups.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteCustomerGroupsWorkflow", + "title": "deleteCustomerGroupsWorkflow", + "description": "Delete one or more customer groups.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/linkCustomerGroupsToCustomerWorkflow", + "title": "linkCustomerGroupsToCustomerWorkflow", + "description": "Manage groups of a customer.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/linkCustomersToCustomerGroupWorkflow", + "title": "linkCustomersToCustomerGroupWorkflow", + "description": "Manage the customers of a customer group.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateCustomerGroupsWorkflow", + "title": "updateCustomerGroupsWorkflow", + "description": "Update one or more customer groups.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createCustomerGroupsStep", + "title": "createCustomerGroupsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteCustomerGroupStep", + "title": "deleteCustomerGroupStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/linkCustomerGroupsToCustomerStep", + "title": "linkCustomerGroupsToCustomerStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/linkCustomersToCustomerGroupStep", + "title": "linkCustomersToCustomerGroupStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateCustomerGroupsStep", + "title": "updateCustomerGroupsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Defaults", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createDefaultsWorkflow", + "title": "createDefaultsWorkflow", + "description": "Create default data for a Medusa application.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createDefaultStoreStep", + "title": "createDefaultStoreStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "File", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteFilesWorkflow", + "title": "deleteFilesWorkflow", + "description": "Delete files from the database and storage.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/uploadFilesWorkflow", + "title": "uploadFilesWorkflow", + "description": "Upload files using the installed File Module Provider.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteFilesStep", + "title": "deleteFilesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/uploadFilesStep", + "title": "uploadFilesStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Fulfillment", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchShippingOptionRulesWorkflow", + "title": "batchShippingOptionRulesWorkflow", + "description": "Manage shipping option rules.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/calculateShippingOptionsPricesWorkflow", + "title": "calculateShippingOptionsPricesWorkflow", + "description": "Calculate shipping option prices in a cart.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelFulfillmentWorkflow", + "title": "cancelFulfillmentWorkflow", + "description": "Cancel a fulfillment.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createFulfillmentWorkflow", + "title": "createFulfillmentWorkflow", + "description": "Create a fulfillment.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createReturnFulfillmentWorkflow", + "title": "createReturnFulfillmentWorkflow", + "description": "Create a fulfillment for a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createServiceZonesWorkflow", + "title": "createServiceZonesWorkflow", + "description": "Create one or more service zones.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createShipmentWorkflow", + "title": "createShipmentWorkflow", + "description": "Create a shipment for a fulfillment.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createShippingOptionsWorkflow", + "title": "createShippingOptionsWorkflow", + "description": "Create shipping options.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createShippingProfilesWorkflow", + "title": "createShippingProfilesWorkflow", + "description": "Create one or more shipping profiles.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteFulfillmentSetsWorkflow", + "title": "deleteFulfillmentSetsWorkflow", + "description": "Delete one or more fulfillment sets.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteServiceZonesWorkflow", + "title": "deleteServiceZonesWorkflow", + "description": "Delete one or more service zones.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteShippingOptionsWorkflow", + "title": "deleteShippingOptionsWorkflow", + "description": "Delete one or more shipping options.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/markFulfillmentAsDeliveredWorkflow", + "title": "markFulfillmentAsDeliveredWorkflow", + "description": "Mark a fulfillment as delivered.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateFulfillmentWorkflow", + "title": "updateFulfillmentWorkflow", + "description": "Update a fulfillment.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateServiceZonesWorkflow", + "title": "updateServiceZonesWorkflow", + "description": "Update one or more service zones.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateShippingOptionsWorkflow", + "title": "updateShippingOptionsWorkflow", + "description": "Update one or more shipping options.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateShippingProfilesWorkflow", + "title": "updateShippingProfilesWorkflow", + "description": "Update one or more shipping profiles.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/buildPriceSet", + "title": "buildPriceSet", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/calculateShippingOptionsPricesStep", + "title": "calculateShippingOptionsPricesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/cancelFulfillmentStep", + "title": "cancelFulfillmentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createFulfillmentSets", + "title": "createFulfillmentSets", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createFulfillmentStep", + "title": "createFulfillmentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createReturnFulfillmentStep", + "title": "createReturnFulfillmentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createServiceZonesStep", + "title": "createServiceZonesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createShippingOptionRulesStep", + "title": "createShippingOptionRulesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createShippingOptionsPriceSetsStep", + "title": "createShippingOptionsPriceSetsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createShippingProfilesStep", + "title": "createShippingProfilesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteFulfillmentSetsStep", + "title": "deleteFulfillmentSetsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteServiceZonesStep", + "title": "deleteServiceZonesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteShippingOptionRulesStep", + "title": "deleteShippingOptionRulesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteShippingOptionsStep", + "title": "deleteShippingOptionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/setShippingOptionsPricesStep", + "title": "setShippingOptionsPricesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateFulfillmentStep", + "title": "updateFulfillmentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateServiceZonesStep", + "title": "updateServiceZonesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateShippingOptionRulesStep", + "title": "updateShippingOptionRulesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateShippingProfilesStep", + "title": "updateShippingProfilesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/upsertShippingOptionsStep", + "title": "upsertShippingOptionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateShipmentStep", + "title": "validateShipmentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateShippingOptionPricesStep", + "title": "validateShippingOptionPricesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/validateFulfillmentDeliverabilityStep", + "title": "validateFulfillmentDeliverabilityStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Inventory", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchInventoryItemLevelsWorkflow", + "title": "batchInventoryItemLevelsWorkflow", + "description": "Manage inventory levels in bulk.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/bulkCreateDeleteLevelsWorkflow", + "title": "bulkCreateDeleteLevelsWorkflow", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createInventoryItemsWorkflow", + "title": "createInventoryItemsWorkflow", + "description": "Create one or more inventory items.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createInventoryLevelsWorkflow", + "title": "createInventoryLevelsWorkflow", + "description": "Create one or more inventory levels.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteInventoryItemWorkflow", + "title": "deleteInventoryItemWorkflow", + "description": "Delete one or more inventory items.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteInventoryLevelsWorkflow", + "title": "deleteInventoryLevelsWorkflow", + "description": "Delete one or more inventory levels.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateInventoryItemsWorkflow", + "title": "updateInventoryItemsWorkflow", + "description": "Update one or more inventory items.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateInventoryLevelsWorkflow", + "title": "updateInventoryLevelsWorkflow", + "description": "Update one or more inventory levels.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/adjustInventoryLevelsStep", + "title": "adjustInventoryLevelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/attachInventoryItemToVariants", + "title": "attachInventoryItemToVariants", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createInventoryItemsStep", + "title": "createInventoryItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createInventoryLevelsStep", + "title": "createInventoryLevelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteInventoryItemStep", + "title": "deleteInventoryItemStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteInventoryLevelsStep", + "title": "deleteInventoryLevelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateInventoryItemsStep", + "title": "updateInventoryItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateInventoryLevelsStep", + "title": "updateInventoryLevelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateInventoryDeleteStep", + "title": "validateInventoryDeleteStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateInventoryItemsForCreate", + "title": "validateInventoryItemsForCreate", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateInventoryLocationsStep", + "title": "validateInventoryLocationsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/validateInventoryLevelsDelete", + "title": "validateInventoryLevelsDelete", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Invite", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/acceptInviteWorkflow", + "title": "acceptInviteWorkflow", + "description": "Accept invite and create user.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createInvitesWorkflow", + "title": "createInvitesWorkflow", + "description": "Create one or more user invites.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteInvitesWorkflow", + "title": "deleteInvitesWorkflow", + "description": "Delete one or more user invites.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/refreshInviteTokensWorkflow", + "title": "refreshInviteTokensWorkflow", + "description": "Refresh user invite tokens.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createInviteStep", + "title": "createInviteStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteInvitesStep", + "title": "deleteInvitesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/refreshInviteTokensStep", + "title": "refreshInviteTokensStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateTokenStep", + "title": "validateTokenStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Line Item", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteLineItemsWorkflow", + "title": "deleteLineItemsWorkflow", + "description": "Delete line items from a cart.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteLineItemsStep", + "title": "deleteLineItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/listLineItemsStep", + "title": "listLineItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateLineItemsStepWithSelector", + "title": "updateLineItemsStepWithSelector", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Notification", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/notifyOnFailureStep", + "title": "notifyOnFailureStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/sendNotificationsStep", + "title": "sendNotificationsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Order", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/acceptOrderTransferWorkflow", + "title": "acceptOrderTransferWorkflow", + "description": "Accept an order transfer request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/addOrderLineItemsWorkflow", + "title": "addOrderLineItemsWorkflow", + "description": "Add line items to an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/archiveOrderWorkflow", + "title": "archiveOrderWorkflow", + "description": "Archive one or more orders.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginClaimOrderWorkflow", + "title": "beginClaimOrderWorkflow", + "description": "Create an order claim in requested state.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginExchangeOrderWorkflow", + "title": "beginExchangeOrderWorkflow", + "description": "Request an order exchange.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginOrderEditOrderWorkflow", + "title": "beginOrderEditOrderWorkflow", + "description": "Create an order edit request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginReceiveReturnWorkflow", + "title": "beginReceiveReturnWorkflow", + "description": "Request a return receival.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginReturnOrderWorkflow", + "title": "beginReturnOrderWorkflow", + "description": "Create a return for an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelBeginOrderClaimWorkflow", + "title": "cancelBeginOrderClaimWorkflow", + "description": "Cancel a requested order claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelBeginOrderEditWorkflow", + "title": "cancelBeginOrderEditWorkflow", + "description": "Cancel a requested order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelBeginOrderExchangeWorkflow", + "title": "cancelBeginOrderExchangeWorkflow", + "description": "Cancel a requested order exchange.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelOrderChangeWorkflow", + "title": "cancelOrderChangeWorkflow", + "description": "Cancel an order change.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelOrderClaimWorkflow", + "title": "cancelOrderClaimWorkflow", + "description": "Cancel a confirmed order claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelOrderExchangeWorkflow", + "title": "cancelOrderExchangeWorkflow", + "description": "Cancel an exchange for an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelOrderFulfillmentWorkflow", + "title": "cancelOrderFulfillmentWorkflow", + "description": "Cancel an order's fulfillment.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelOrderTransferRequestWorkflow", + "title": "cancelOrderTransferRequestWorkflow", + "description": "Cancel an order transfer request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelOrderWorkflow", + "title": "cancelOrderWorkflow", + "description": "Cancel an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelReturnReceiveWorkflow", + "title": "cancelReturnReceiveWorkflow", + "description": "Cancel a return receival.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelReturnRequestWorkflow", + "title": "cancelReturnRequestWorkflow", + "description": "Cancel a requested return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelReturnWorkflow", + "title": "cancelReturnWorkflow", + "description": "Cancel a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/completeOrderWorkflow", + "title": "completeOrderWorkflow", + "description": "Complete one or more orders.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmClaimRequestWorkflow", + "title": "confirmClaimRequestWorkflow", + "description": "Confirm a requested claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmExchangeRequestWorkflow", + "title": "confirmExchangeRequestWorkflow", + "description": "Confirm an exchange request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmOrderEditRequestWorkflow", + "title": "confirmOrderEditRequestWorkflow", + "description": "Confirm an order edit request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmReturnReceiveWorkflow", + "title": "confirmReturnReceiveWorkflow", + "description": "Confirm a return receival request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmReturnRequestWorkflow", + "title": "confirmReturnRequestWorkflow", + "description": "Confirm a return request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createAndCompleteReturnOrderWorkflow", + "title": "createAndCompleteReturnOrderWorkflow", + "description": "Create and complete a return for an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createClaimShippingMethodWorkflow", + "title": "createClaimShippingMethodWorkflow", + "description": "Create an inbound or outbound shipping method for a claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createExchangeShippingMethodWorkflow", + "title": "createExchangeShippingMethodWorkflow", + "description": "Create an inbound or outbound shipping method for an exchange.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrUpdateOrderPaymentCollectionWorkflow", + "title": "createOrUpdateOrderPaymentCollectionWorkflow", + "description": "Create or update payment collection for an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrderChangeActionsWorkflow", + "title": "createOrderChangeActionsWorkflow", + "description": "Create an order change action.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrderChangeWorkflow", + "title": "createOrderChangeWorkflow", + "description": "Create an order change.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrderEditShippingMethodWorkflow", + "title": "createOrderEditShippingMethodWorkflow", + "description": "Create a shipping method for an order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrderFulfillmentWorkflow", + "title": "createOrderFulfillmentWorkflow", + "description": "Creates a fulfillment for an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrderPaymentCollectionWorkflow", + "title": "createOrderPaymentCollectionWorkflow", + "description": "Create a payment collection for an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrderShipmentWorkflow", + "title": "createOrderShipmentWorkflow", + "description": "Creates a shipment for an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrderWorkflow", + "title": "createOrderWorkflow", + "description": "Create an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrdersWorkflow", + "title": "createOrdersWorkflow", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createReturnShippingMethodWorkflow", + "title": "createReturnShippingMethodWorkflow", + "description": "Create a shipping method for a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/declineOrderChangeWorkflow", + "title": "declineOrderChangeWorkflow", + "description": "Decline an order change.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/declineOrderTransferRequestWorkflow", + "title": "declineOrderTransferRequestWorkflow", + "description": "Decline a requested order transfer.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteOrderChangeActionsWorkflow", + "title": "deleteOrderChangeActionsWorkflow", + "description": "Delete one or more order change actions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteOrderChangeWorkflow", + "title": "deleteOrderChangeWorkflow", + "description": "Delete one or more order changes.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/dismissItemReturnRequestWorkflow", + "title": "dismissItemReturnRequestWorkflow", + "description": "Dismiss items from a return request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/getOrderDetailWorkflow", + "title": "getOrderDetailWorkflow", + "description": "Retrieve an order's details.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/getOrdersListWorkflow", + "title": "getOrdersListWorkflow", + "description": "Retrieve a list of orders.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow", + "title": "markOrderFulfillmentAsDeliveredWorkflow", + "description": "Mark a fulfillment in an order as delivered.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderClaimAddNewItemWorkflow", + "title": "orderClaimAddNewItemWorkflow", + "description": "Add outbound or new items to a claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderClaimItemWorkflow", + "title": "orderClaimItemWorkflow", + "description": "Add order items to a claim as claim items.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderClaimRequestItemReturnWorkflow", + "title": "orderClaimRequestItemReturnWorkflow", + "description": "Request one or more items to be returned as part of a claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderEditAddNewItemWorkflow", + "title": "orderEditAddNewItemWorkflow", + "description": "Add new items to an order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderEditUpdateItemQuantityWorkflow", + "title": "orderEditUpdateItemQuantityWorkflow", + "description": "Update the quantity of an existing order item in the order's edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderExchangeAddNewItemWorkflow", + "title": "orderExchangeAddNewItemWorkflow", + "description": "Add new or outbound items to an exchange.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderExchangeRequestItemReturnWorkflow", + "title": "orderExchangeRequestItemReturnWorkflow", + "description": "Add inbound items to be returned as part of the exchange.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/receiveAndCompleteReturnOrderWorkflow", + "title": "receiveAndCompleteReturnOrderWorkflow", + "description": "Receive and complete a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/receiveItemReturnRequestWorkflow", + "title": "receiveItemReturnRequestWorkflow", + "description": "Mark return items as received.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeAddItemClaimActionWorkflow", + "title": "removeAddItemClaimActionWorkflow", + "description": "Remove outbound (new) items from a claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeClaimShippingMethodWorkflow", + "title": "removeClaimShippingMethodWorkflow", + "description": "Remove an inbound or outbound shipping method from a claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeExchangeShippingMethodWorkflow", + "title": "removeExchangeShippingMethodWorkflow", + "description": "Remove an inbound or outbound shipping method from an exchange.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeItemClaimActionWorkflow", + "title": "removeItemClaimActionWorkflow", + "description": "Remove order items from a claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeItemExchangeActionWorkflow", + "title": "removeItemExchangeActionWorkflow", + "description": "Remove an outbound or new item from an exchange.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeItemOrderEditActionWorkflow", + "title": "removeItemOrderEditActionWorkflow", + "description": "Remove an item that was added to an order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeItemReceiveReturnActionWorkflow", + "title": "removeItemReceiveReturnActionWorkflow", + "description": "Remove an item from a return receival.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeItemReturnActionWorkflow", + "title": "removeItemReturnActionWorkflow", + "description": "Remove an item from a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeOrderEditShippingMethodWorkflow", + "title": "removeOrderEditShippingMethodWorkflow", + "description": "Remove a shipping method from an order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeReturnShippingMethodWorkflow", + "title": "removeReturnShippingMethodWorkflow", + "description": "Remove a shipping method from a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/requestItemReturnWorkflow", + "title": "requestItemReturnWorkflow", + "description": "Add items to a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/requestOrderEditRequestWorkflow", + "title": "requestOrderEditRequestWorkflow", + "description": "Request an order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/requestOrderTransferWorkflow", + "title": "requestOrderTransferWorkflow", + "description": "Request a transfer of an order to a customer.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateClaimAddItemWorkflow", + "title": "updateClaimAddItemWorkflow", + "description": "Update a claim's new or outbound item.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateClaimItemWorkflow", + "title": "updateClaimItemWorkflow", + "description": "Update a claim item, added to the claim from an order item.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateClaimShippingMethodWorkflow", + "title": "updateClaimShippingMethodWorkflow", + "description": "Update an inbound or outbound shipping method of a claim.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateExchangeAddItemWorkflow", + "title": "updateExchangeAddItemWorkflow", + "description": "Update an outbound or new item in an exchange.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateExchangeShippingMethodWorkflow", + "title": "updateExchangeShippingMethodWorkflow", + "description": "Update an exchange's inbound or outbound shipping method.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderChangeActionsWorkflow", + "title": "updateOrderChangeActionsWorkflow", + "description": "Update one or more order change actions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderChangesWorkflow", + "title": "updateOrderChangesWorkflow", + "description": "Update one or more order changes.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderEditAddItemWorkflow", + "title": "updateOrderEditAddItemWorkflow", + "description": "Update a new item in an order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderEditItemQuantityWorkflow", + "title": "updateOrderEditItemQuantityWorkflow", + "description": "Update an existing order item previously added to an order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderEditShippingMethodWorkflow", + "title": "updateOrderEditShippingMethodWorkflow", + "description": "Update a shipping method of an order edit.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderTaxLinesWorkflow", + "title": "updateOrderTaxLinesWorkflow", + "description": "Update the tax lines of items and shipping methods in an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderWorkflow", + "title": "updateOrderWorkflow", + "description": "Update an order's details.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateReceiveItemReturnRequestWorkflow", + "title": "updateReceiveItemReturnRequestWorkflow", + "description": "Update an item in a return receival request.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateRequestItemReturnWorkflow", + "title": "updateRequestItemReturnWorkflow", + "description": "Update a requested item in a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateReturnShippingMethodWorkflow", + "title": "updateReturnShippingMethodWorkflow", + "description": "Update the shipping method of a return.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateReturnWorkflow", + "title": "updateReturnWorkflow", + "description": "Update a return's details.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/addOrderTransactionStep", + "title": "addOrderTransactionStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/archiveOrdersStep", + "title": "archiveOrdersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/cancelOrderChangeStep", + "title": "cancelOrderChangeStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/cancelOrderClaimStep", + "title": "cancelOrderClaimStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/cancelOrderExchangeStep", + "title": "cancelOrderExchangeStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/cancelOrderFulfillmentStep", + "title": "cancelOrderFulfillmentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/cancelOrderReturnStep", + "title": "cancelOrderReturnStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/cancelOrdersStep", + "title": "cancelOrdersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/completeOrdersStep", + "title": "completeOrdersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createCompleteReturnStep", + "title": "createCompleteReturnStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createOrderChangeStep", + "title": "createOrderChangeStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createOrderClaimItemsFromActionsStep", + "title": "createOrderClaimItemsFromActionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createOrderClaimsStep", + "title": "createOrderClaimsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createOrderExchangeItemsFromActionsStep", + "title": "createOrderExchangeItemsFromActionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createOrderExchangesStep", + "title": "createOrderExchangesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createOrderLineItemsStep", + "title": "createOrderLineItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createOrdersStep", + "title": "createOrdersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createReturnsStep", + "title": "createReturnsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/declineOrderChangeStep", + "title": "declineOrderChangeStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteClaimsStep", + "title": "deleteClaimsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteExchangesStep", + "title": "deleteExchangesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteOrderChangeActionsStep", + "title": "deleteOrderChangeActionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteOrderChangesStep", + "title": "deleteOrderChangesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteOrderLineItems", + "title": "deleteOrderLineItems", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteOrderShippingMethods", + "title": "deleteOrderShippingMethods", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteReturnsStep", + "title": "deleteReturnsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/previewOrderChangeStep", + "title": "previewOrderChangeStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/registerOrderChangesStep", + "title": "registerOrderChangesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/registerOrderFulfillmentStep", + "title": "registerOrderFulfillmentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/registerOrderShipmentStep", + "title": "registerOrderShipmentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/setOrderTaxLinesForItemsStep", + "title": "setOrderTaxLinesForItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateOrderChangeActionsStep", + "title": "updateOrderChangeActionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateOrderChangesStep", + "title": "updateOrderChangesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateOrderShippingMethodsStep", + "title": "updateOrderShippingMethodsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateOrdersStep", + "title": "updateOrdersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateReturnItemsStep", + "title": "updateReturnItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateReturnsStep", + "title": "updateReturnsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/acceptOrderTransferValidationStep", + "title": "acceptOrderTransferValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginClaimOrderValidationStep", + "title": "beginClaimOrderValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginOrderEditValidationStep", + "title": "beginOrderEditValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginOrderExchangeValidationStep", + "title": "beginOrderExchangeValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginReceiveReturnValidationStep", + "title": "beginReceiveReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/beginReturnOrderValidationStep", + "title": "beginReturnOrderValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelBeginOrderClaimValidationStep", + "title": "cancelBeginOrderClaimValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelBeginOrderEditValidationStep", + "title": "cancelBeginOrderEditValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelBeginOrderExchangeValidationStep", + "title": "cancelBeginOrderExchangeValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelClaimValidateOrderStep", + "title": "cancelClaimValidateOrderStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelExchangeValidateOrder", + "title": "cancelExchangeValidateOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelOrderFulfillmentValidateOrder", + "title": "cancelOrderFulfillmentValidateOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelReceiveReturnValidationStep", + "title": "cancelReceiveReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelRequestReturnValidationStep", + "title": "cancelRequestReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelReturnValidateOrder", + "title": "cancelReturnValidateOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelTransferOrderRequestValidationStep", + "title": "cancelTransferOrderRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/cancelValidateOrder", + "title": "cancelValidateOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmClaimRequestValidationStep", + "title": "confirmClaimRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmExchangeRequestValidationStep", + "title": "confirmExchangeRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmOrderEditRequestValidationStep", + "title": "confirmOrderEditRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmReceiveReturnValidationStep", + "title": "confirmReceiveReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/confirmReturnRequestValidationStep", + "title": "confirmReturnRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createClaimShippingMethodValidationStep", + "title": "createClaimShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCompleteReturnValidationStep", + "title": "createCompleteReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createExchangeShippingMethodValidationStep", + "title": "createExchangeShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createFulfillmentValidateOrder", + "title": "createFulfillmentValidateOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createOrderEditShippingMethodValidationStep", + "title": "createOrderEditShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createReturnShippingMethodValidationStep", + "title": "createReturnShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createShipmentValidateOrder", + "title": "createShipmentValidateOrder", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/declineTransferOrderRequestValidationStep", + "title": "declineTransferOrderRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteOrderPaymentCollections", + "title": "deleteOrderPaymentCollections", + "description": "Delete a payment collection of an order.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/dismissItemReturnRequestValidationStep", + "title": "dismissItemReturnRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/exchangeAddNewItemValidationStep", + "title": "exchangeAddNewItemValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/exchangeRequestItemReturnValidationStep", + "title": "exchangeRequestItemReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/markPaymentCollectionAsPaid", + "title": "markPaymentCollectionAsPaid", + "description": "Mark a payment collection for an order as paid.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderClaimAddNewItemValidationStep", + "title": "orderClaimAddNewItemValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderClaimItemValidationStep", + "title": "orderClaimItemValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderClaimRequestItemReturnValidationStep", + "title": "orderClaimRequestItemReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderEditAddNewItemValidationStep", + "title": "orderEditAddNewItemValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderEditUpdateItemQuantityValidationStep", + "title": "orderEditUpdateItemQuantityValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/orderFulfillmentDeliverablilityValidationStep", + "title": "orderFulfillmentDeliverablilityValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/receiveCompleteReturnValidationStep", + "title": "receiveCompleteReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/receiveItemReturnRequestValidationStep", + "title": "receiveItemReturnRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeClaimAddItemActionValidationStep", + "title": "removeClaimAddItemActionValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeClaimItemActionValidationStep", + "title": "removeClaimItemActionValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeClaimShippingMethodValidationStep", + "title": "removeClaimShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeExchangeItemActionValidationStep", + "title": "removeExchangeItemActionValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeExchangeShippingMethodValidationStep", + "title": "removeExchangeShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeItemReceiveReturnActionValidationStep", + "title": "removeItemReceiveReturnActionValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeOrderEditItemActionValidationStep", + "title": "removeOrderEditItemActionValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeOrderEditShippingMethodValidationStep", + "title": "removeOrderEditShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeReturnItemActionValidationStep", + "title": "removeReturnItemActionValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeReturnShippingMethodValidationStep", + "title": "removeReturnShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/requestItemReturnValidationStep", + "title": "requestItemReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/requestOrderEditRequestValidationStep", + "title": "requestOrderEditRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/requestOrderTransferValidationStep", + "title": "requestOrderTransferValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/throwUnlessPaymentCollectionNotPaid", + "title": "throwUnlessPaymentCollectionNotPaid", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/throwUnlessStatusIsNotPaid", + "title": "throwUnlessStatusIsNotPaid", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateClaimAddItemValidationStep", + "title": "updateClaimAddItemValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateClaimItemValidationStep", + "title": "updateClaimItemValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateClaimShippingMethodValidationStep", + "title": "updateClaimShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateExchangeAddItemValidationStep", + "title": "updateExchangeAddItemValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateExchangeShippingMethodValidationStep", + "title": "updateExchangeShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderEditAddItemValidationStep", + "title": "updateOrderEditAddItemValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderEditItemQuantityValidationStep", + "title": "updateOrderEditItemQuantityValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderEditShippingMethodValidationStep", + "title": "updateOrderEditShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateOrderValidationStep", + "title": "updateOrderValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateReceiveItemReturnRequestValidationStep", + "title": "updateReceiveItemReturnRequestValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateRequestItemReturnValidationStep", + "title": "updateRequestItemReturnValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateReturnShippingMethodValidationStep", + "title": "updateReturnShippingMethodValidationStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateReturnValidationStep", + "title": "updateReturnValidationStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Payment", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/capturePaymentWorkflow", + "title": "capturePaymentWorkflow", + "description": "Capture a payment.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/processPaymentWorkflow", + "title": "processPaymentWorkflow", + "description": "Process a payment based on a webhook event.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/refundPaymentWorkflow", + "title": "refundPaymentWorkflow", + "description": "Refund a payment.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/refundPaymentsWorkflow", + "title": "refundPaymentsWorkflow", + "description": "Refund one or more payments.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/authorizePaymentSessionStep", + "title": "authorizePaymentSessionStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/cancelPaymentStep", + "title": "cancelPaymentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/capturePaymentStep", + "title": "capturePaymentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/refundPaymentStep", + "title": "refundPaymentStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/refundPaymentsStep", + "title": "refundPaymentsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/validatePaymentsRefundStep", + "title": "validatePaymentsRefundStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/validateRefundStep", + "title": "validateRefundStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Payment Collection", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createPaymentSessionsWorkflow", + "title": "createPaymentSessionsWorkflow", + "description": "Create payment sessions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createRefundReasonsWorkflow", + "title": "createRefundReasonsWorkflow", + "description": "Create refund reasons.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deletePaymentSessionsWorkflow", + "title": "deletePaymentSessionsWorkflow", + "description": "Delete payment sessions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteRefundReasonsWorkflow", + "title": "deleteRefundReasonsWorkflow", + "description": "Delete refund reasons.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateRefundReasonsWorkflow", + "title": "updateRefundReasonsWorkflow", + "description": "Update refund reasons.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createPaymentAccountHolderStep", + "title": "createPaymentAccountHolderStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createPaymentSessionStep", + "title": "createPaymentSessionStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createRefundReasonStep", + "title": "createRefundReasonStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deletePaymentSessionsStep", + "title": "deletePaymentSessionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteRefundReasonsStep", + "title": "deleteRefundReasonsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updatePaymentCollectionStep", + "title": "updatePaymentCollectionStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateRefundReasonsStep", + "title": "updateRefundReasonsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateDeletedPaymentSessionsStep", + "title": "validateDeletedPaymentSessionsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Price List", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchPriceListPricesWorkflow", + "title": "batchPriceListPricesWorkflow", + "description": "Manage a price list's prices.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createPriceListPricesWorkflow", + "title": "createPriceListPricesWorkflow", + "description": "Create prices in price lists.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createPriceListsWorkflow", + "title": "createPriceListsWorkflow", + "description": "Create one or more price lists.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deletePriceListsWorkflow", + "title": "deletePriceListsWorkflow", + "description": "Delete one or more price lists.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removePriceListPricesWorkflow", + "title": "removePriceListPricesWorkflow", + "description": "Remove prices in price lists.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updatePriceListPricesWorkflow", + "title": "updatePriceListPricesWorkflow", + "description": "Update price lists' prices.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updatePriceListsWorkflow", + "title": "updatePriceListsWorkflow", + "description": "Update one or more price lists.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createPriceListPricesStep", + "title": "createPriceListPricesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createPriceListsStep", + "title": "createPriceListsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deletePriceListsStep", + "title": "deletePriceListsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getExistingPriceListsPriceIdsStep", + "title": "getExistingPriceListsPriceIdsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/removePriceListPricesStep", + "title": "removePriceListPricesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updatePriceListPricesStep", + "title": "updatePriceListPricesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updatePriceListsStep", + "title": "updatePriceListsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validatePriceListsStep", + "title": "validatePriceListsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/validateVariantPriceLinksStep", + "title": "validateVariantPriceLinksStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Pricing", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createPricePreferencesWorkflow", + "title": "createPricePreferencesWorkflow", + "description": "Create one or more price preferences.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deletePricePreferencesWorkflow", + "title": "deletePricePreferencesWorkflow", + "description": "Delete one or more price preferences.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updatePricePreferencesWorkflow", + "title": "updatePricePreferencesWorkflow", + "description": "Update one or more price preferences.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createPricePreferencesStep", + "title": "createPricePreferencesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createPriceSetsStep", + "title": "createPriceSetsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deletePricePreferencesStep", + "title": "deletePricePreferencesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updatePricePreferencesAsArrayStep", + "title": "updatePricePreferencesAsArrayStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updatePricePreferencesStep", + "title": "updatePricePreferencesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updatePriceSetsStep", + "title": "updatePriceSetsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Product", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchLinkProductsToCategoryWorkflow", + "title": "batchLinkProductsToCategoryWorkflow", + "description": "Manage the links between a collection and products.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchLinkProductsToCollectionWorkflow", + "title": "batchLinkProductsToCollectionWorkflow", + "description": "Manage the links between a collection and products.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchProductVariantsWorkflow", + "title": "batchProductVariantsWorkflow", + "description": "Create, update, and delete product variants.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchProductsWorkflow", + "title": "batchProductsWorkflow", + "description": "Manage products in bulk.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCollectionsWorkflow", + "title": "createCollectionsWorkflow", + "description": "Create one or more product collections.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createProductOptionsWorkflow", + "title": "createProductOptionsWorkflow", + "description": "Create one or more product options.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createProductTagsWorkflow", + "title": "createProductTagsWorkflow", + "description": "Create one or more product tags.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createProductTypesWorkflow", + "title": "createProductTypesWorkflow", + "description": "Create one or more product types.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createProductVariantsWorkflow", + "title": "createProductVariantsWorkflow", + "description": "Create one or more product variants.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createProductsWorkflow", + "title": "createProductsWorkflow", + "description": "Create one or more products with options and variants.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteCollectionsWorkflow", + "title": "deleteCollectionsWorkflow", + "description": "Delete one or more product collection.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteProductOptionsWorkflow", + "title": "deleteProductOptionsWorkflow", + "description": "Delete one or more product option.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteProductTagsWorkflow", + "title": "deleteProductTagsWorkflow", + "description": "Delete one or more product tags.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteProductTypesWorkflow", + "title": "deleteProductTypesWorkflow", + "description": "Delete one or more product types.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteProductVariantsWorkflow", + "title": "deleteProductVariantsWorkflow", + "description": "Delete one or more product variants.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteProductsWorkflow", + "title": "deleteProductsWorkflow", + "description": "Delete one or more products.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/exportProductsWorkflow", + "title": "exportProductsWorkflow", + "description": "Export products with filtering capabilities.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/importProductsWorkflow", + "title": "importProductsWorkflow", + "description": "Import products from a CSV file.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateCollectionsWorkflow", + "title": "updateCollectionsWorkflow", + "description": "Update one or more product collections.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateProductOptionsWorkflow", + "title": "updateProductOptionsWorkflow", + "description": "Update one or more product options.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateProductTagsWorkflow", + "title": "updateProductTagsWorkflow", + "description": "Update one or more product tags.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateProductTypesWorkflow", + "title": "updateProductTypesWorkflow", + "description": "Update one or more product types.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateProductVariantsWorkflow", + "title": "updateProductVariantsWorkflow", + "description": "Update one or more product variants.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateProductsWorkflow", + "title": "updateProductsWorkflow", + "description": "Update one or more products with options and variants.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/upsertVariantPricesWorkflow", + "title": "upsertVariantPricesWorkflow", + "description": "Create, update, or remove variants' prices.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/batchLinkProductsToCategoryStep", + "title": "batchLinkProductsToCategoryStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/batchLinkProductsToCollectionStep", + "title": "batchLinkProductsToCollectionStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createCollectionsStep", + "title": "createCollectionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createProductOptionsStep", + "title": "createProductOptionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createProductTagsStep", + "title": "createProductTagsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createProductTypesStep", + "title": "createProductTypesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createProductVariantsStep", + "title": "createProductVariantsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createProductsStep", + "title": "createProductsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createVariantPricingLinkStep", + "title": "createVariantPricingLinkStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteCollectionsStep", + "title": "deleteCollectionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteProductOptionsStep", + "title": "deleteProductOptionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteProductTagsStep", + "title": "deleteProductTagsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteProductTypesStep", + "title": "deleteProductTypesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteProductVariantsStep", + "title": "deleteProductVariantsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteProductsStep", + "title": "deleteProductsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/generateProductCsvStep", + "title": "generateProductCsvStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getAllProductsStep", + "title": "getAllProductsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getProductsStep", + "title": "getProductsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getVariantAvailabilityStep", + "title": "getVariantAvailabilityStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/groupProductsForBatchStep", + "title": "groupProductsForBatchStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/parseProductCsvStep", + "title": "parseProductCsvStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateCollectionsStep", + "title": "updateCollectionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateProductOptionsStep", + "title": "updateProductOptionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateProductTagsStep", + "title": "updateProductTagsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateProductTypesStep", + "title": "updateProductTypesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateProductVariantsStep", + "title": "updateProductVariantsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateProductsStep", + "title": "updateProductsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/waitConfirmationProductImportStep", + "title": "waitConfirmationProductImportStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/validateProductInputStep", + "title": "validateProductInputStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Product Category", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createProductCategoriesWorkflow", + "title": "createProductCategoriesWorkflow", + "description": "Create product categories.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteProductCategoriesWorkflow", + "title": "deleteProductCategoriesWorkflow", + "description": "Delete product categories.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateProductCategoriesWorkflow", + "title": "updateProductCategoriesWorkflow", + "description": "Update product categories.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createProductCategoriesStep", + "title": "createProductCategoriesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteProductCategoriesStep", + "title": "deleteProductCategoriesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateProductCategoriesStep", + "title": "updateProductCategoriesStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Promotion", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow", + "title": "addOrRemoveCampaignPromotionsWorkflow", + "description": "Manage the promotions of a campaign.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/batchPromotionRulesWorkflow", + "title": "batchPromotionRulesWorkflow", + "description": "Manage the rules of a promotion.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createCampaignsWorkflow", + "title": "createCampaignsWorkflow", + "description": "Create one or more campaigns.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createPromotionRulesWorkflow", + "title": "createPromotionRulesWorkflow", + "description": "Create one or more promotion rules.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createPromotionsWorkflow", + "title": "createPromotionsWorkflow", + "description": "Create one or more promotions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteCampaignsWorkflow", + "title": "deleteCampaignsWorkflow", + "description": "Delete one or more campaigns.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deletePromotionRulesWorkflow", + "title": "deletePromotionRulesWorkflow", + "description": "Delete one or more promotion rules.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deletePromotionsWorkflow", + "title": "deletePromotionsWorkflow", + "description": "Delete one or more promotions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateCampaignsWorkflow", + "title": "updateCampaignsWorkflow", + "description": "Update one or more campaigns.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updatePromotionRulesWorkflow", + "title": "updatePromotionRulesWorkflow", + "description": "Update one or more promotion rules.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updatePromotionsStatusWorkflow", + "title": "updatePromotionsStatusWorkflow", + "description": "Update the status of one or more promotions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updatePromotionsWorkflow", + "title": "updatePromotionsWorkflow", + "description": "Update one or more promotions.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/addCampaignPromotionsStep", + "title": "addCampaignPromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/addRulesToPromotionsStep", + "title": "addRulesToPromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createCampaignsStep", + "title": "createCampaignsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createPromotionsStep", + "title": "createPromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteCampaignsStep", + "title": "deleteCampaignsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deletePromotionsStep", + "title": "deletePromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/removeCampaignPromotionsStep", + "title": "removeCampaignPromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/removeRulesFromPromotionsStep", + "title": "removeRulesFromPromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateCampaignsStep", + "title": "updateCampaignsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updatePromotionRulesStep", + "title": "updatePromotionRulesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updatePromotionsStep", + "title": "updatePromotionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updatePromotionsValidationStep", + "title": "updatePromotionsValidationStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Region", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createRegionsWorkflow", + "title": "createRegionsWorkflow", + "description": "Create one or more regions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteRegionsWorkflow", + "title": "deleteRegionsWorkflow", + "description": "Delete one or more regions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateRegionsWorkflow", + "title": "updateRegionsWorkflow", + "description": "Update regions.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createRegionsStep", + "title": "createRegionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteRegionsStep", + "title": "deleteRegionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/setRegionsPaymentProvidersStep", + "title": "setRegionsPaymentProvidersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateRegionsStep", + "title": "updateRegionsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Reservation", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createReservationsWorkflow", + "title": "createReservationsWorkflow", + "description": "Create one or more reservations.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteReservationsByLineItemsWorkflow", + "title": "deleteReservationsByLineItemsWorkflow", + "description": "Delete reservations by their associated line items.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteReservationsWorkflow", + "title": "deleteReservationsWorkflow", + "description": "Delete one or more reservations.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateReservationsWorkflow", + "title": "updateReservationsWorkflow", + "description": "Update one or more reservations.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createReservationsStep", + "title": "createReservationsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteReservationsByLineItemsStep", + "title": "deleteReservationsByLineItemsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteReservationsStep", + "title": "deleteReservationsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateReservationsStep", + "title": "updateReservationsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Return Reason", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createReturnReasonsWorkflow", + "title": "createReturnReasonsWorkflow", + "description": "Create return reasons.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteReturnReasonsWorkflow", + "title": "deleteReturnReasonsWorkflow", + "description": "Delete return reasons.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateReturnReasonsWorkflow", + "title": "updateReturnReasonsWorkflow", + "description": "Update return reasons.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createReturnReasonsStep", + "title": "createReturnReasonsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteReturnReasonStep", + "title": "deleteReturnReasonStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateReturnReasonsStep", + "title": "updateReturnReasonsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Sales Channel", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createSalesChannelsWorkflow", + "title": "createSalesChannelsWorkflow", + "description": "Create sales channels.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteSalesChannelsWorkflow", + "title": "deleteSalesChannelsWorkflow", + "description": "Delete sales channels.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/linkProductsToSalesChannelWorkflow", + "title": "linkProductsToSalesChannelWorkflow", + "description": "Manage the products available in a sales channel.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateSalesChannelsWorkflow", + "title": "updateSalesChannelsWorkflow", + "description": "Update sales channels.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/associateLocationsWithSalesChannelsStep", + "title": "associateLocationsWithSalesChannelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/associateProductsWithSalesChannelsStep", + "title": "associateProductsWithSalesChannelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/canDeleteSalesChannelsOrThrowStep", + "title": "canDeleteSalesChannelsOrThrowStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createDefaultSalesChannelStep", + "title": "createDefaultSalesChannelStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createSalesChannelsStep", + "title": "createSalesChannelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteSalesChannelsStep", + "title": "deleteSalesChannelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/detachLocationsFromSalesChannelsStep", + "title": "detachLocationsFromSalesChannelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/detachProductsFromSalesChannelsStep", + "title": "detachProductsFromSalesChannelsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateSalesChannelsStep", + "title": "updateSalesChannelsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Shipping Options", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/listShippingOptionsForContextStep", + "title": "listShippingOptionsForContextStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Shipping Profile", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteShippingProfileWorkflow", + "title": "deleteShippingProfileWorkflow", + "description": "Delete shipping profiles.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteShippingProfilesStep", + "title": "deleteShippingProfilesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/validateStepShippingProfileDelete", + "title": "validateStepShippingProfileDelete", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Stock Location", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createLocationFulfillmentSetWorkflow", + "title": "createLocationFulfillmentSetWorkflow", + "description": "Add fulfillment set to a stock location.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createStockLocationsWorkflow", + "title": "createStockLocationsWorkflow", + "description": "Create one or more stock locations.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteStockLocationsWorkflow", + "title": "deleteStockLocationsWorkflow", + "description": "Delete one or more stock locations.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/linkSalesChannelsToStockLocationWorkflow", + "title": "linkSalesChannelsToStockLocationWorkflow", + "description": "Manage the sales channels of a stock location.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateStockLocationsWorkflow", + "title": "updateStockLocationsWorkflow", + "description": "Update stock locations.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createStockLocations", + "title": "createStockLocations", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteStockLocationsStep", + "title": "deleteStockLocationsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateStockLocationsStep", + "title": "updateStockLocationsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Store", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createStoresWorkflow", + "title": "createStoresWorkflow", + "description": "Create one or more stores.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteStoresWorkflow", + "title": "deleteStoresWorkflow", + "description": "Delete one or more stores.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateStoresWorkflow", + "title": "updateStoresWorkflow", + "description": "Update stores.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createStoresStep", + "title": "createStoresStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteStoresStep", + "title": "deleteStoresStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateStoresStep", + "title": "updateStoresStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Tax", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createTaxRateRulesWorkflow", + "title": "createTaxRateRulesWorkflow", + "description": "Create one or more tax rules for rates.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createTaxRatesWorkflow", + "title": "createTaxRatesWorkflow", + "description": "Create one or more tax rates.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createTaxRegionsWorkflow", + "title": "createTaxRegionsWorkflow", + "description": "Create one or more tax regions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteTaxRateRulesWorkflow", + "title": "deleteTaxRateRulesWorkflow", + "description": "Delete one or more tax rate rules.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteTaxRatesWorkflow", + "title": "deleteTaxRatesWorkflow", + "description": "Delete one or more tax rates.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteTaxRegionsWorkflow", + "title": "deleteTaxRegionsWorkflow", + "description": "Delete one or more tax regions.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/setTaxRateRulesWorkflow", + "title": "setTaxRateRulesWorkflow", + "description": "Set the rules of tax rates.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateTaxRatesWorkflow", + "title": "updateTaxRatesWorkflow", + "description": "Update tax rates.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateTaxRegionsWorkflow", + "title": "updateTaxRegionsWorkflow", + "description": "Update one or more tax regions.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createTaxRateRulesStep", + "title": "createTaxRateRulesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createTaxRatesStep", + "title": "createTaxRatesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createTaxRegionsStep", + "title": "createTaxRegionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteTaxRateRulesStep", + "title": "deleteTaxRateRulesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteTaxRatesStep", + "title": "deleteTaxRatesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteTaxRegionsStep", + "title": "deleteTaxRegionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/getItemTaxLinesStep", + "title": "getItemTaxLinesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/listTaxRateIdsStep", + "title": "listTaxRateIdsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/listTaxRateRuleIdsStep", + "title": "listTaxRateRuleIdsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateTaxRatesStep", + "title": "updateTaxRatesStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateTaxRegionsStep", + "title": "updateTaxRegionsStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/maybeListTaxRateRuleIdsStep", + "title": "maybeListTaxRateRuleIdsStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "User", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Workflows", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createUserAccountWorkflow", + "title": "createUserAccountWorkflow", + "description": "Create a user account and attach an auth identity.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/createUsersWorkflow", + "title": "createUsersWorkflow", + "description": "Create one or more users.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/deleteUsersWorkflow", + "title": "deleteUsersWorkflow", + "description": "Delete one or more users.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/removeUserAccountWorkflow", + "title": "removeUserAccountWorkflow", + "description": "Delete a user and remove the association to its auth identity.", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/updateUsersWorkflow", + "title": "updateUsersWorkflow", + "description": "Update one or more users.", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sub-category", + "title": "Steps", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/createUsersStep", + "title": "createUsersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/deleteUsersStep", + "title": "deleteUsersStep", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/references/medusa-workflows/steps/updateUsersStep", + "title": "updateUsersStep", + "description": "", + "children": [] + } + ] + } + ], + "initialOpen": false + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "sidebar", + "sidebar_id": "test-tools-reference", + "title": "Testing Framework", + "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "title": "moduleIntegrationTestRunner", - "path": "/test-tools-reference/moduleIntegrationTestRunner", + "path": "/test-tools-reference", + "title": "Reference Overview", "children": [] + }, + { + "type": "separator" + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Functions", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "medusaIntegrationTestRunner", + "path": "/test-tools-reference/medusaIntegrationTestRunner", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "moduleIntegrationTestRunner", + "path": "/test-tools-reference/moduleIntegrationTestRunner", + "children": [] + } + ] } ] } diff --git a/www/apps/resources/providers/sidebar.tsx b/www/apps/resources/providers/sidebar.tsx index c70f148845..4a7ac455da 100644 --- a/www/apps/resources/providers/sidebar.tsx +++ b/www/apps/resources/providers/sidebar.tsx @@ -14,13 +14,8 @@ const SidebarProvider = ({ children }: SidebarProviderProps) => { return ( {children} diff --git a/www/apps/resources/scripts/prepare.mjs b/www/apps/resources/scripts/prepare.mjs index a9ec814a87..9991bd634a 100644 --- a/www/apps/resources/scripts/prepare.mjs +++ b/www/apps/resources/scripts/prepare.mjs @@ -5,9 +5,9 @@ import { sidebar } from "../sidebar.mjs" async function main() { await generateSidebar(sidebar) - await generateSlugChanges() - await generateFilesMap() - await generateEditedDates() + // await generateSlugChanges() + // await generateFilesMap() + // await generateEditedDates() } void main() diff --git a/www/apps/resources/sidebar.mjs b/www/apps/resources/sidebar.mjs index 93feb190a2..78a4213420 100644 --- a/www/apps/resources/sidebar.mjs +++ b/www/apps/resources/sidebar.mjs @@ -24,195 +24,171 @@ import { storefrontGuidesSidebar } from "./sidebars/storefront.mjs" import { taxSidebar } from "./sidebars/tax.mjs" import { troubleshootingSidebar } from "./sidebars/troubleshooting.mjs" import { userSidebar } from "./sidebars/user.mjs" -import { sidebarAttachHrefCommonOptions } from "./utils/sidebar-attach-common-options.mjs" import { examplesSidebar } from "./sidebars/examples.mjs" -/** @type {import('types').RawSidebarItem[]} */ -export const sidebar = sidebarAttachHrefCommonOptions([ +/** @type {import("types").Sidebar.RawSidebar[]} */ +export const sidebar = [ { - type: "link", - path: "/", - title: "Overview", - }, - ...examplesSidebar, - { - type: "link", - path: "/recipes", - title: "Recipes", - isChildSidebar: true, - children: recipesSidebar, - }, - { - type: "separator", - }, - { - type: "link", - path: "/commerce-modules", - title: "Commerce Modules", - hideChildren: true, - sort_sidebar: "alphabetize", - children: [ - ...apiKeySidebar, - ...authSidebar, - ...cartSidebar, - ...currencySidebar, - ...customerSidebar, - ...fulfillmentSidebar, - ...inventorySidebar, - ...orderSidebar, - ...paymentSidebar, - ...pricingSidebar, - ...productSidebar, - ...promotionSidebar, - ...regionSidebar, - ...salesChannelSidebar, - ...stockLocationSidebar, - ...storeSidebar, - ...taxSidebar, - ...userSidebar, - ], - }, - { - type: "link", - path: "/architectural-modules", - title: "Architectural Modules", - isChildSidebar: true, - sort_sidebar: "alphabetize", - children: architecturalModulesSidebar, - }, - { - type: "link", - path: "/integrations", - title: "Integrations", - isChildSidebar: true, - sort_sidebar: "alphabetize", - children: integrationsSidebar, - }, - { - type: "ref", - path: "/plugins", - title: "Plugins", - isChildSidebar: true, - children: pluginsSidebar, - }, - { - type: "link", - path: "/storefront-development", - title: "Storefront Development", - isChildSidebar: true, - children: storefrontGuidesSidebar, - }, - { - type: "separator", - }, - { - type: "category", - title: "SDKs and Tools", - children: sdkToolsSidebar, - }, - { - type: "category", - title: "General", - children: [ + sidebar_id: "resources", + title: "Development Resources", + items: [ { type: "link", - path: "/references/medusa-config", - title: "Medusa Configurations", + path: "/", + title: "Overview", + }, + ...examplesSidebar, + ...recipesSidebar, + { + type: "separator", }, { type: "link", - path: "/deployment", - title: "Deployment Guides", - isChildSidebar: true, + path: "/commerce-modules", + title: "Commerce Modules", + hideChildren: true, + sort_sidebar: "alphabetize", + children: [ + ...apiKeySidebar, + ...authSidebar, + ...cartSidebar, + ...currencySidebar, + ...customerSidebar, + ...fulfillmentSidebar, + ...inventorySidebar, + ...orderSidebar, + ...paymentSidebar, + ...pricingSidebar, + ...productSidebar, + ...promotionSidebar, + ...regionSidebar, + ...salesChannelSidebar, + ...stockLocationSidebar, + ...storeSidebar, + ...taxSidebar, + ...userSidebar, + ], + }, + ...architecturalModulesSidebar, + ...integrationsSidebar, + ...pluginsSidebar, + ...storefrontGuidesSidebar, + { + type: "separator", + }, + { + type: "category", + title: "SDKs and Tools", + children: sdkToolsSidebar, + }, + { + type: "category", + title: "General", children: [ { - type: "link", - title: "Medusa Cloud", - path: "https://medusajs.com/pricing", - }, - { - type: "separator", - }, - { - type: "category", - title: "Self-Hosting", + type: "sidebar", + sidebar_id: "deployment-guides", + title: "Deployment Guides", children: [ { type: "link", - path: "https://docs.medusajs.com/learn/deployment/general", - title: "General", + path: "/deployment", + title: "Overview", + }, + { + type: "separator", }, { type: "link", - path: "/deployment/medusa-application/railway", - title: "Railway", + title: "Medusa Cloud", + path: "https://medusajs.com/pricing", + }, + { + type: "separator", + }, + { + type: "category", + title: "Self-Hosting", + children: [ + { + type: "link", + path: "https://docs.medusajs.com/learn/deployment/general", + title: "General", + }, + { + type: "link", + path: "/deployment/medusa-application/railway", + title: "Railway", + }, + ], + }, + { + type: "category", + title: "Next.js Starter", + autogenerate_path: "/deployment/storefront", }, ], }, - { - type: "category", - title: "Next.js Starter", - autogenerate_path: "/deployment/storefront", - }, + ...troubleshootingSidebar, ], }, { - type: "link", - path: "/troubleshooting", - title: "Troubleshooting Guides", - isChildSidebar: true, - children: troubleshootingSidebar, - }, - ], - }, - { - type: "category", - title: "Admin", - children: [ - { - type: "link", - path: "/admin-widget-injection-zones", - title: "Admin Widget Injection Zones", - }, - { - type: "link", - path: "/admin-components", - title: "Admin Components", - isChildSidebar: true, + type: "category", + title: "Admin", children: [ { - type: "category", - title: "Layouts", - autogenerate_path: "/admin-components/layouts", + type: "link", + path: "/admin-widget-injection-zones", + title: "Admin Widget Injection Zones", }, { - type: "category", - title: "Components", - autogenerate_path: "/admin-components/components", + type: "sidebar", + sidebar_id: "admin-components", + title: "Admin Components", + children: [ + { + type: "link", + path: "/admin-components", + title: "Overview", + }, + { + type: "separator", + }, + { + type: "category", + title: "Layouts", + autogenerate_path: "/admin-components/layouts", + }, + { + type: "category", + title: "Components", + autogenerate_path: "/admin-components/components", + }, + ], }, ], }, - ], - }, - { - type: "category", - title: "Lists", - children: [ { - type: "link", - path: "/medusa-container-resources", - title: "Container Dependencies", + type: "category", + title: "Lists", + children: [ + { + type: "link", + path: "/medusa-container-resources", + title: "Container Dependencies", + }, + { + type: "link", + path: "/events-reference", + title: "Events List", + }, + ], }, { - type: "link", - path: "/events-reference", - title: "Events List", + type: "category", + title: "References", + children: referencesSidebar, }, ], }, - { - type: "category", - title: "References", - children: referencesSidebar, - }, -]) +] diff --git a/www/apps/resources/sidebars/api-key.mjs b/www/apps/resources/sidebars/api-key.mjs index abc8be0386..854a2f4a24 100644 --- a/www/apps/resources/sidebars/api-key.mjs +++ b/www/apps/resources/sidebars/api-key.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const apiKeySidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "api-key", title: "API Key Module", - isChildSidebar: true, children: [ { type: "link", @@ -131,12 +131,19 @@ export const apiKeySidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/api-key", + type: "sidebar", + sidebar_id: "api-key-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "API Key Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/api-key", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -147,12 +154,19 @@ export const apiKeySidebar = [ ], }, { - type: "link", - path: "/references/api-key/models", + type: "sidebar", + sidebar_id: "api-key-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "API Key Module Data Models Reference", children: [ + { + type: "link", + path: "/references/api-key/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/architectural-modules.mjs b/www/apps/resources/sidebars/architectural-modules.mjs index b1c5b8d24f..4c6146738e 100644 --- a/www/apps/resources/sidebars/architectural-modules.mjs +++ b/www/apps/resources/sidebars/architectural-modules.mjs @@ -1,161 +1,176 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const architecturalModulesSidebar = [ { - type: "category", - title: "Cache Modules", + type: "sidebar", + sidebar_id: "architectural-modules", + title: "Architectural Modules", children: [ { type: "link", - path: "/architectural-modules/cache", + path: "/architectural-modules", title: "Overview", }, { - type: "link", - path: "/architectural-modules/cache/in-memory", - title: "In-Memory", + type: "separator", }, { - type: "link", - path: "/architectural-modules/cache/redis", - title: "Redis", - }, - { - type: "sub-category", - title: "Guides", + type: "category", + title: "Cache Modules", children: [ { type: "link", - path: "/architectural-modules/cache/create", - title: "Create Cache Module", + path: "/architectural-modules/cache", + title: "Overview", + }, + { + type: "link", + path: "/architectural-modules/cache/in-memory", + title: "In-Memory", + }, + { + type: "link", + path: "/architectural-modules/cache/redis", + title: "Redis", + }, + { + type: "sub-category", + title: "Guides", + children: [ + { + type: "link", + path: "/architectural-modules/cache/create", + title: "Create Cache Module", + }, + ], }, ], }, - ], - }, - { - type: "category", - title: "Event Modules", - children: [ { - type: "link", - path: "/architectural-modules/event", - title: "Overview", - }, - { - type: "link", - path: "/architectural-modules/event/local", - title: "Local", - }, - { - type: "link", - path: "/architectural-modules/event/redis", - title: "Redis", - }, - { - type: "sub-category", - title: "Guides", + type: "category", + title: "Event Modules", children: [ { type: "link", - path: "/architectural-modules/event/create", - title: "Create Event Module", + path: "/architectural-modules/event", + title: "Overview", + }, + { + type: "link", + path: "/architectural-modules/event/local", + title: "Local", + }, + { + type: "link", + path: "/architectural-modules/event/redis", + title: "Redis", + }, + { + type: "sub-category", + title: "Guides", + children: [ + { + type: "link", + path: "/architectural-modules/event/create", + title: "Create Event Module", + }, + ], }, ], }, - ], - }, - { - type: "category", - title: "File Module Providers", - children: [ { - type: "link", - path: "/architectural-modules/file", - title: "Overview", - }, - { - type: "link", - path: "/architectural-modules/file/local", - title: "Local", - }, - { - type: "link", - path: "/architectural-modules/file/s3", - title: "AWS S3 (and Compatible APIs)", - }, - { - type: "sub-category", - title: "Guides", + type: "category", + title: "File Module Providers", children: [ { type: "link", - path: "/references/file-provider-module", - title: "Create File Provider", + path: "/architectural-modules/file", + title: "Overview", + }, + { + type: "link", + path: "/architectural-modules/file/local", + title: "Local", + }, + { + type: "link", + path: "/architectural-modules/file/s3", + title: "AWS S3 (and Compatible APIs)", + }, + { + type: "sub-category", + title: "Guides", + children: [ + { + type: "link", + path: "/references/file-provider-module", + title: "Create File Provider", + }, + ], }, ], }, - ], - }, - { - type: "category", - title: "Notification Module Providers", - children: [ { - type: "link", - path: "/architectural-modules/notification", - title: "Overview", - }, - { - type: "link", - path: "/architectural-modules/notification/local", - title: "Local", - }, - { - type: "link", - path: "/architectural-modules/notification/sendgrid", - title: "SendGrid", - }, - { - type: "sub-category", - title: "Guides", + type: "category", + title: "Notification Module Providers", children: [ { type: "link", - path: "/references/notification-provider-module", - title: "Create Notification Provider", + path: "/architectural-modules/notification", + title: "Overview", }, { type: "link", - path: "/integrations/guides/resend", - title: "Integrate Resend", + path: "/architectural-modules/notification/local", + title: "Local", }, { type: "link", - path: "/architectural-modules/notification/send-notification", - title: "Send Notification", + path: "/architectural-modules/notification/sendgrid", + title: "SendGrid", + }, + { + type: "sub-category", + title: "Guides", + children: [ + { + type: "link", + path: "/references/notification-provider-module", + title: "Create Notification Provider", + }, + { + type: "link", + path: "/integrations/guides/resend", + title: "Integrate Resend", + }, + { + type: "link", + path: "/architectural-modules/notification/send-notification", + title: "Send Notification", + }, + ], }, ], }, - ], - }, - { - type: "category", - title: "Workflow Engine Modules", - children: [ { - type: "link", - path: "/architectural-modules/workflow-engine", - title: "Overview", - }, - { - type: "link", - path: "/architectural-modules/workflow-engine/in-memory", - title: "In-Memory", - }, - { - type: "link", - path: "/architectural-modules/workflow-engine/redis", - title: "Redis", + type: "category", + title: "Workflow Engine Modules", + children: [ + { + type: "link", + path: "/architectural-modules/workflow-engine", + title: "Overview", + }, + { + type: "link", + path: "/architectural-modules/workflow-engine/in-memory", + title: "In-Memory", + }, + { + type: "link", + path: "/architectural-modules/workflow-engine/redis", + title: "Redis", + }, + ], }, ], }, diff --git a/www/apps/resources/sidebars/auth.mjs b/www/apps/resources/sidebars/auth.mjs index 8678af588e..49199ca8dd 100644 --- a/www/apps/resources/sidebars/auth.mjs +++ b/www/apps/resources/sidebars/auth.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const authSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "auth", title: "Auth Module", - isChildSidebar: true, children: [ { type: "link", @@ -173,12 +173,19 @@ export const authSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/auth", + type: "sidebar", + sidebar_id: "auth-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Auth Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/auth", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -188,12 +195,19 @@ export const authSidebar = [ ], }, { - type: "link", - path: "/references/auth/models", + type: "sidebar", + sidebar_id: "auth-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Auth Module Data Models Reference", children: [ + { + type: "link", + path: "/references/auth/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/cart.mjs b/www/apps/resources/sidebars/cart.mjs index 6be8242be6..9de8840198 100644 --- a/www/apps/resources/sidebars/cart.mjs +++ b/www/apps/resources/sidebars/cart.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const cartSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "cart", title: "Cart Module", - isChildSidebar: true, children: [ { type: "link", @@ -148,12 +148,19 @@ export const cartSidebar = [ title: "Events Reference", }, { - type: "link", - path: "/references/cart", + type: "sidebar", + sidebar_id: "cart-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Cart Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/cart", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -163,12 +170,19 @@ export const cartSidebar = [ ], }, { - type: "link", - path: "/references/cart/models", + type: "sidebar", + sidebar_id: "cart-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Cart Module Data Models Reference", children: [ + { + type: "link", + path: "/references/cart/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/currency.mjs b/www/apps/resources/sidebars/currency.mjs index 9a1bf6a39f..856d70ac18 100644 --- a/www/apps/resources/sidebars/currency.mjs +++ b/www/apps/resources/sidebars/currency.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const currencySidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "currency", title: "Currency Module", - isChildSidebar: true, children: [ { type: "link", @@ -99,12 +99,19 @@ export const currencySidebar = [ ], }, { - type: "link", - path: "/references/currency", + type: "sidebar", + sidebar_id: "currency-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Currency Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/currency", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -114,12 +121,19 @@ export const currencySidebar = [ ], }, { - type: "link", - path: "/references/currency/models", + type: "sidebar", + sidebar_id: "currency-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Currency Module Data Models Reference", children: [ + { + type: "link", + path: "/references/currency/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/customer.mjs b/www/apps/resources/sidebars/customer.mjs index 184a9716c5..2f295580ff 100644 --- a/www/apps/resources/sidebars/customer.mjs +++ b/www/apps/resources/sidebars/customer.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const customerSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "customer", title: "Customer Module", - isChildSidebar: true, children: [ { type: "link", @@ -143,12 +143,19 @@ export const customerSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/customer", + type: "sidebar", + sidebar_id: "customer-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Customer Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/customer", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -158,12 +165,19 @@ export const customerSidebar = [ ], }, { - type: "link", - path: "/references/customer/models", + type: "sidebar", + sidebar_id: "customer-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Customer Module Data Models Reference", children: [ + { + type: "link", + path: "/references/customer/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/examples.mjs b/www/apps/resources/sidebars/examples.mjs index 70ffcdb314..e146ec063f 100644 --- a/www/apps/resources/sidebars/examples.mjs +++ b/www/apps/resources/sidebars/examples.mjs @@ -1,13 +1,12 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const examplesSidebar = [ { - type: "link", - path: "/examples", + type: "sidebar", + sidebar_id: "examples", title: "Examples", - isChildSidebar: true, children: [ { - type: "ref", + type: "link", path: "/examples", title: "Example Snippets", }, @@ -32,13 +31,6 @@ export const examplesSidebar = [ autogenerate_tags: "example+server", autogenerate_as_ref: true, sort_sidebar: "alphabetize", - children: [ - { - type: "link", - title: "Custom Item Price", - path: "/examples/guides/custom-item-price", - }, - ], }, { type: "category", diff --git a/www/apps/resources/sidebars/fulfillment.mjs b/www/apps/resources/sidebars/fulfillment.mjs index dc6df38f4d..0584c3797c 100644 --- a/www/apps/resources/sidebars/fulfillment.mjs +++ b/www/apps/resources/sidebars/fulfillment.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const fulfillmentSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "fulfillment", title: "Fulfillment Module", - isChildSidebar: true, children: [ { type: "link", @@ -170,12 +170,19 @@ export const fulfillmentSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/fulfillment", + type: "sidebar", + sidebar_id: "fulfillment-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Fulfillment Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/fulfillment", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -185,12 +192,19 @@ export const fulfillmentSidebar = [ ], }, { - type: "link", - path: "/references/fulfillment/models", + type: "sidebar", + sidebar_id: "fulfillment-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Fulfillment Module Data Models Reference", children: [ + { + type: "link", + path: "/references/fulfillment/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/integrations.mjs b/www/apps/resources/sidebars/integrations.mjs index d40267fe85..c22ed1f7cb 100644 --- a/www/apps/resources/sidebars/integrations.mjs +++ b/www/apps/resources/sidebars/integrations.mjs @@ -1,78 +1,93 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const integrationsSidebar = [ { - type: "category", - title: "Auth", + type: "sidebar", + sidebar_id: "integrations", + title: "Integrations", children: [ { type: "link", - path: "/commerce-modules/auth/auth-providers/google", - title: "Google", + path: "/integrations", + title: "Overview", }, { - type: "link", - path: "/commerce-modules/auth/auth-providers/github", - title: "GitHub", - }, - ], - }, - { - type: "category", - title: "CMS", - children: [ - { - type: "link", - path: "/integrations/guides/sanity", - title: "Sanity", - }, - ], - }, - { - type: "category", - title: "File", - children: [ - { - type: "link", - path: "/architectural-modules/file/s3", - title: "AWS", - }, - ], - }, - { - type: "category", - title: "Fulfillment", - children: [ - { - type: "link", - path: "/integrations/guides/shipstation", - title: "ShipStation", - }, - ], - }, - { - type: "category", - title: "Notification", - children: [ - { - type: "link", - path: "/architectural-modules/notification/sendgrid", - title: "SendGrid", + type: "separator", }, { - type: "link", - path: "/integrations/guides/resend", - title: "Resend", + type: "category", + title: "Auth", + children: [ + { + type: "link", + path: "/commerce-modules/auth/auth-providers/google", + title: "Google", + }, + { + type: "link", + path: "/commerce-modules/auth/auth-providers/github", + title: "GitHub", + }, + ], }, - ], - }, - { - type: "category", - title: "Payment", - children: [ { - type: "link", - path: "/commerce-modules/payment/payment-provider/stripe", - title: "Stripe", + type: "category", + title: "CMS", + children: [ + { + type: "link", + path: "/integrations/guides/sanity", + title: "Sanity", + }, + ], + }, + { + type: "category", + title: "File", + children: [ + { + type: "link", + path: "/architectural-modules/file/s3", + title: "AWS", + }, + ], + }, + { + type: "category", + title: "Fulfillment", + children: [ + { + type: "link", + path: "/integrations/guides/shipstation", + title: "ShipStation", + }, + ], + }, + { + type: "category", + title: "Notification", + children: [ + { + type: "link", + path: "/architectural-modules/notification/sendgrid", + title: "SendGrid", + }, + { + type: "link", + path: "/integrations/guides/resend", + title: "Resend", + }, + ], + }, + { + type: "category", + title: "Payment", + children: [ + { + type: "link", + path: "/commerce-modules/payment/payment-provider/stripe", + title: "Stripe", + }, + ], }, ], }, diff --git a/www/apps/resources/sidebars/inventory.mjs b/www/apps/resources/sidebars/inventory.mjs index f67d46e17d..f7b1d6d8d1 100644 --- a/www/apps/resources/sidebars/inventory.mjs +++ b/www/apps/resources/sidebars/inventory.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const inventorySidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "inventory", title: "Inventory Module", - isChildSidebar: true, children: [ { type: "link", @@ -143,12 +143,19 @@ export const inventorySidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/inventory-next", + type: "sidebar", + sidebar_id: "inventory-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Inventory Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/inventory-next", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -158,12 +165,19 @@ export const inventorySidebar = [ ], }, { - type: "link", - path: "/references/inventory-next/models", + type: "sidebar", + sidebar_id: "inventory-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Inventory Module Data Models Reference", children: [ + { + type: "link", + path: "/references/inventory-next/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/order-module.mjs b/www/apps/resources/sidebars/order-module.mjs index ce78d8330b..46cb792dcd 100644 --- a/www/apps/resources/sidebars/order-module.mjs +++ b/www/apps/resources/sidebars/order-module.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const orderSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "order", title: "Order Module", - isChildSidebar: true, children: [ { type: "link", @@ -181,12 +181,19 @@ export const orderSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/order", + type: "sidebar", + sidebar_id: "order-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Order Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/order", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -196,12 +203,19 @@ export const orderSidebar = [ ], }, { - type: "link", - path: "/references/order/models", + type: "sidebar", + sidebar_id: "order-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Order Module Data Models Reference", children: [ + { + type: "link", + path: "/references/order/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/payment.mjs b/www/apps/resources/sidebars/payment.mjs index c07204e3f7..8383df75dd 100644 --- a/www/apps/resources/sidebars/payment.mjs +++ b/www/apps/resources/sidebars/payment.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const paymentSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "payment", title: "Payment Module", - isChildSidebar: true, children: [ { type: "link", @@ -185,12 +185,19 @@ export const paymentSidebar = [ title: "Events Reference", }, { - type: "link", - path: "/references/payment", + type: "sidebar", + sidebar_id: "payment-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Payment Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/payment", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -200,12 +207,19 @@ export const paymentSidebar = [ ], }, { - type: "link", - path: "/references/payment/models", + type: "sidebar", + sidebar_id: "payment-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Payment Module Data Models Reference", children: [ + { + type: "link", + path: "/references/payment/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/plugins.mjs b/www/apps/resources/sidebars/plugins.mjs index 890c6426f1..ee352b96bb 100644 --- a/www/apps/resources/sidebars/plugins.mjs +++ b/www/apps/resources/sidebars/plugins.mjs @@ -1,19 +1,26 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const pluginsSidebar = [ { - type: "link", - title: "Overview", - path: "/plugins", - }, - { - type: "category", - title: "Guides", + type: "sidebar", + sidebar_id: "plugins", + title: "Plugins", children: [ { type: "link", - title: "Wishlist", - path: "/plugins/guides/wishlist", - description: "Learn how to build a wishlist plugin.", + title: "Overview", + path: "/plugins", + }, + { + type: "category", + title: "Guides", + children: [ + { + type: "link", + title: "Wishlist", + path: "/plugins/guides/wishlist", + description: "Learn how to build a wishlist plugin.", + }, + ], }, ], }, diff --git a/www/apps/resources/sidebars/pricing.mjs b/www/apps/resources/sidebars/pricing.mjs index b883fa53bc..1e32b8916f 100644 --- a/www/apps/resources/sidebars/pricing.mjs +++ b/www/apps/resources/sidebars/pricing.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const pricingSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "pricing", title: "Pricing Module", - isChildSidebar: true, children: [ { type: "link", @@ -146,12 +146,19 @@ export const pricingSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/pricing", + type: "sidebar", + sidebar_id: "pricing-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Pricing Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/pricing", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -161,12 +168,19 @@ export const pricingSidebar = [ ], }, { - type: "link", - path: "/references/pricing/models", + type: "sidebar", + sidebar_id: "pricing-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Pricing Module Data Models Reference", children: [ + { + type: "link", + path: "/references/pricing/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/product.mjs b/www/apps/resources/sidebars/product.mjs index c4e0c29f29..dfe642d5e2 100644 --- a/www/apps/resources/sidebars/product.mjs +++ b/www/apps/resources/sidebars/product.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const productSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "product", title: "Product Module", - isChildSidebar: true, children: [ { type: "link", @@ -160,12 +160,19 @@ export const productSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/product", + type: "sidebar", + sidebar_id: "product-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Product Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/product", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -175,12 +182,19 @@ export const productSidebar = [ ], }, { - type: "link", - path: "/references/product/models", + type: "sidebar", + sidebar_id: "product-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Product Module Data Models Reference", children: [ + { + type: "link", + path: "/references/product/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/promotion.mjs b/www/apps/resources/sidebars/promotion.mjs index 1e441cd07c..1208c55fec 100644 --- a/www/apps/resources/sidebars/promotion.mjs +++ b/www/apps/resources/sidebars/promotion.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const promotionSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "promotion", title: "Promotion Module", - isChildSidebar: true, children: [ { type: "link", @@ -153,12 +153,19 @@ export const promotionSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/promotion", + type: "sidebar", + sidebar_id: "promotion-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Promotion Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/promotion", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -169,12 +176,19 @@ export const promotionSidebar = [ ], }, { - type: "link", - path: "/references/promotion/models", + type: "sidebar", + sidebar_id: "promotion-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Promotion Module Data Models Reference", children: [ + { + type: "link", + path: "/references/promotion/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/recipes.mjs b/www/apps/resources/sidebars/recipes.mjs index db648a430b..35dc3d1ac9 100644 --- a/www/apps/resources/sidebars/recipes.mjs +++ b/www/apps/resources/sidebars/recipes.mjs @@ -1,103 +1,118 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const recipesSidebar = [ { - type: "link", - path: "/recipes/marketplace", - title: "Marketplace", + type: "sidebar", + sidebar_id: "recipes", + title: "Recipes", children: [ { type: "link", - path: "/recipes/marketplace/examples/vendors", - title: "Example: Vendors", + path: "/recipes", + title: "Overview", + }, + { + type: "separator", }, { type: "link", - path: "/recipes/marketplace/examples/restaurant-delivery", - title: "Example: Restaurant-Delivery", + path: "/recipes/marketplace", + title: "Marketplace", + children: [ + { + type: "link", + path: "/recipes/marketplace/examples/vendors", + title: "Example: Vendors", + }, + { + type: "link", + path: "/recipes/marketplace/examples/restaurant-delivery", + title: "Example: Restaurant-Delivery", + }, + ], }, - ], - }, - { - type: "link", - path: "/recipes/subscriptions", - title: "Subscriptions", - children: [ { type: "link", - path: "/recipes/subscriptions/examples/standard", - title: "Example", + path: "/recipes/subscriptions", + title: "Subscriptions", + children: [ + { + type: "link", + path: "/recipes/subscriptions/examples/standard", + title: "Example", + }, + ], }, - ], - }, - { - type: "link", - path: "/recipes/digital-products", - title: "Digital Products", - children: [ { type: "link", - path: "/recipes/digital-products/examples/standard", - title: "Example", + path: "/recipes/digital-products", + title: "Digital Products", + children: [ + { + type: "link", + path: "/recipes/digital-products/examples/standard", + title: "Example", + }, + ], }, - ], - }, - { - type: "link", - path: "/recipes/erp", - title: "Integrate ERP", - children: [ { type: "link", - path: "/recipes/erp/odoo", - title: "Example: Odoo Integration", + path: "/recipes/erp", + title: "Integrate ERP", + children: [ + { + type: "link", + path: "/recipes/erp/odoo", + title: "Example: Odoo Integration", + }, + ], }, - ], - }, - { - type: "link", - path: "/recipes/b2b", - title: "B2B", - }, - { - type: "link", - path: "/recipes/commerce-automation", - title: "Commerce Automation", - children: [ { type: "link", - path: "/recipes/commerce-automation/restock-notification", - title: "Example: Restock Notifications", + path: "/recipes/b2b", + title: "B2B", + }, + { + type: "link", + path: "/recipes/commerce-automation", + title: "Commerce Automation", + children: [ + { + type: "link", + path: "/recipes/commerce-automation/restock-notification", + title: "Example: Restock Notifications", + }, + ], + }, + { + type: "link", + path: "/recipes/ecommerce", + title: "Ecommerce", + }, + { + type: "link", + path: "/recipes/multi-region-store", + title: "Multi-Region Store", + }, + { + type: "link", + path: "/recipes/omnichannel", + title: "Omnichannel Store", + }, + { + type: "link", + path: "/recipes/oms", + title: "OMS", + }, + { + type: "link", + path: "/recipes/personalized-products", + title: "Personalized Products", + }, + { + type: "link", + path: "/recipes/pos", + title: "POS", }, ], }, - { - type: "link", - path: "/recipes/ecommerce", - title: "Ecommerce", - }, - { - type: "link", - path: "/recipes/multi-region-store", - title: "Multi-Region Store", - }, - { - type: "link", - path: "/recipes/omnichannel", - title: "Omnichannel Store", - }, - { - type: "link", - path: "/recipes/oms", - title: "OMS", - }, - { - type: "link", - path: "/recipes/personalized-products", - title: "Personalized Products", - }, - { - type: "link", - path: "/recipes/pos", - title: "POS", - }, ] diff --git a/www/apps/resources/sidebars/references.mjs b/www/apps/resources/sidebars/references.mjs index e1dfcb4a13..83c2ffdec9 100644 --- a/www/apps/resources/sidebars/references.mjs +++ b/www/apps/resources/sidebars/references.mjs @@ -1,12 +1,19 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const referencesSidebar = [ { - type: "link", - path: "/references/workflows", + type: "sidebar", + sidebar_id: "workflows-sdk-reference", title: "Workflows SDK", childSidebarTitle: "Workflows SDK Reference", - isChildSidebar: true, children: [ + { + type: "link", + path: "/references/workflows", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Functions", @@ -15,12 +22,19 @@ export const referencesSidebar = [ ], }, { - type: "link", - path: "/references/data-model", + type: "sidebar", + sidebar_id: "dml-reference", title: "Data Model Language", childSidebarTitle: "Data Model Language Reference", - isChildSidebar: true, children: [ + { + type: "link", + path: "/references/data-model", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "link", path: "/references/data-model/define", @@ -53,11 +67,18 @@ export const referencesSidebar = [ ], }, { - type: "link", - path: "/service-factory-reference", + type: "sidebar", + sidebar_id: "service-factory-reference", title: "Service Factory", - isChildSidebar: true, children: [ + { + type: "link", + path: "/service-factory-reference", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -71,25 +92,44 @@ export const referencesSidebar = [ ], }, { - type: "link", - path: "/references/helper-steps", + type: "sidebar", + sidebar_id: "helper-steps-reference", title: "Helper Steps", - isChildSidebar: true, - autogenerate_path: "/references/helper_steps/functions", + children: [ + { + type: "link", + path: "/references/helper-steps", + title: "Reference Overview", + }, + { + type: "separator", + }, + { + type: "category", + title: "Steps", + autogenerate_path: "/references/helper_steps/functions", + }, + ], }, { - type: "link", + type: "sidebar", + sidebar_id: "core-flows", title: "Core Workflows", - path: "/medusa-workflows-reference", - isChildSidebar: true, custom_autogenerate: "core-flows", }, { - type: "link", + type: "sidebar", + sidebar_id: "test-tools-reference", title: "Testing Framework", - path: "/test-tools-reference", - isChildSidebar: true, children: [ + { + type: "link", + path: "/test-tools-reference", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Functions", diff --git a/www/apps/resources/sidebars/region.mjs b/www/apps/resources/sidebars/region.mjs index 963dec4964..4c2631d383 100644 --- a/www/apps/resources/sidebars/region.mjs +++ b/www/apps/resources/sidebars/region.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const regionSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "region", title: "Region Module", - isChildSidebar: true, children: [ { type: "link", @@ -131,12 +131,19 @@ export const regionSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/region", + type: "sidebar", + sidebar_id: "region-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Region Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/region", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -146,12 +153,19 @@ export const regionSidebar = [ ], }, { - type: "link", - path: "/references/region/models", + type: "sidebar", + sidebar_id: "region-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Region Module Data Models Reference", children: [ + { + type: "link", + path: "/references/region/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/sales-channel.mjs b/www/apps/resources/sidebars/sales-channel.mjs index 73f9112960..95dcf5e7e1 100644 --- a/www/apps/resources/sidebars/sales-channel.mjs +++ b/www/apps/resources/sidebars/sales-channel.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const salesChannelSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "sales-channel", title: "Sales Channel Module", - isChildSidebar: true, children: [ { type: "link", @@ -138,12 +138,16 @@ export const salesChannelSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/sales-channel", + type: "sidebar", + sidebar_id: "sales-channel-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Sales Channel Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/sales-channel", + title: "Reference Overview", + }, { type: "category", title: "Methods", @@ -153,12 +157,19 @@ export const salesChannelSidebar = [ ], }, { - type: "link", - path: "/references/sales-channel/models", + type: "sidebar", + sidebar_id: "sales-channel-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Sales Channel Module Data Models Reference", children: [ + { + type: "link", + path: "/references/sales-channel/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/sdk-tools.mjs b/www/apps/resources/sidebars/sdk-tools.mjs index 9ffb631601..2b5904c8c8 100644 --- a/www/apps/resources/sidebars/sdk-tools.mjs +++ b/www/apps/resources/sidebars/sdk-tools.mjs @@ -1,4 +1,4 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const sdkToolsSidebar = [ { type: "link", @@ -6,10 +6,9 @@ export const sdkToolsSidebar = [ title: "create-medusa-app", }, { - type: "link", - path: "/medusa-cli", + type: "sidebar", + sidebar_id: "medusa-cli", title: "Medusa CLI", - isChildSidebar: true, childSidebarTitle: "Medusa CLI Reference", children: [ { @@ -28,12 +27,19 @@ export const sdkToolsSidebar = [ ], }, { - type: "link", - path: "/js-sdk", + type: "sidebar", + sidebar_id: "js-sdk", title: "JS SDK", - isChildSidebar: true, childSidebarTitle: "JS SDK Reference", children: [ + { + type: "link", + path: "/js-sdk", + title: "Overview", + }, + { + type: "separator", + }, { type: "category", title: "Auth", @@ -55,10 +61,9 @@ export const sdkToolsSidebar = [ ], }, { - type: "link", - path: "/nextjs-starter", + type: "sidebar", + sidebar_id: "nextjs-starter", title: "Next.js Starter Storefront", - isChildSidebar: true, children: [ { type: "link", diff --git a/www/apps/resources/sidebars/stock-location.mjs b/www/apps/resources/sidebars/stock-location.mjs index fc9075fda2..99e9aa9a13 100644 --- a/www/apps/resources/sidebars/stock-location.mjs +++ b/www/apps/resources/sidebars/stock-location.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const stockLocationSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "stock-location", title: "Stock Location Module", - isChildSidebar: true, children: [ { type: "link", @@ -133,12 +133,19 @@ export const stockLocationSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/stock-location-next", + type: "sidebar", + sidebar_id: "stock-location-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Stock Location Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/stock-location-next", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -148,12 +155,19 @@ export const stockLocationSidebar = [ ], }, { - type: "link", - path: "/references/stock-location-next/models", + type: "sidebar", + sidebar_id: "stock-location-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Stock Location Module Data Models Reference", children: [ + { + type: "link", + path: "/references/stock-location-next/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/store.mjs b/www/apps/resources/sidebars/store.mjs index b2f4a5909f..b415092b2e 100644 --- a/www/apps/resources/sidebars/store.mjs +++ b/www/apps/resources/sidebars/store.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const storeSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "store", title: "Store Module", - isChildSidebar: true, children: [ { type: "link", @@ -126,12 +126,19 @@ export const storeSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/store", + type: "sidebar", + sidebar_id: "store-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Store Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/store", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -141,12 +148,19 @@ export const storeSidebar = [ ], }, { - type: "link", - path: "/references/store/models", + type: "sidebar", + sidebar_id: "store-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Store Module Data Models Reference", children: [ + { + type: "link", + path: "/references/store/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/storefront.mjs b/www/apps/resources/sidebars/storefront.mjs index ba57f25eca..e4f32f2ae2 100644 --- a/www/apps/resources/sidebars/storefront.mjs +++ b/www/apps/resources/sidebars/storefront.mjs @@ -1,259 +1,274 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const storefrontGuidesSidebar = [ { - type: "category", - title: "General", + type: "sidebar", + sidebar_id: "storefront-development", + title: "Storefront Development", children: [ { type: "link", - path: "/storefront-development/tips", - title: "Tips", - }, - { - type: "link", - path: "/storefront-development/publishable-api-keys", - title: "Publishable API Key", - }, - ], - }, - { - type: "category", - title: "Examples", - children: [ - { - type: "link", - path: "/storefront-development/guides/express-checkout", - title: "Express Checkout Storefront", - }, - ], - }, - { - type: "category", - title: "Regions", - children: [ - { - type: "link", - path: "/storefront-development/regions", + path: "/storefront-development", title: "Overview", }, { - type: "link", - path: "/storefront-development/regions/list", - title: "List Regions", + type: "separator", }, { - type: "link", - path: "/storefront-development/regions/store-retrieve-region", - title: "Store and Retrieve Regions", - }, - { - type: "link", - path: "/storefront-development/regions/context", - title: "Region React Context", - }, - ], - }, - { - type: "category", - title: "Products", - children: [ - { - type: "link", - path: "/storefront-development/products/list", - title: "List Products", - }, - { - type: "link", - path: "/storefront-development/products/retrieve", - title: "Retrieve a Product", - }, - { - type: "link", - path: "/storefront-development/products/variants", - title: "Select a Variant", - }, - { - type: "link", - path: "/storefront-development/products/price", - title: "Retrieve Variant Prices", - autogenerate_path: "storefront-development/products/price/examples", - }, - { - type: "link", - path: "/storefront-development/products/inventory", - title: "Retrieve Variant Inventory", - }, - ], - }, - { - type: "category", - title: "Product Categories", - children: [ - { - type: "link", - path: "/storefront-development/products/categories/list", - title: "List Categories", - }, - { - type: "link", - path: "/storefront-development/products/categories/retrieve", - title: "Retrieve a Category", - }, - { - type: "link", - path: "/storefront-development/products/categories/products", - title: "Retrieve a Category's Products", - }, - { - type: "link", - path: "/storefront-development/products/categories/nested-categories", - title: "Retrieve Nested Categories", - }, - ], - }, - { - type: "category", - title: "Product Collections", - children: [ - { - type: "link", - path: "/storefront-development/products/collections/list", - title: "List Collections", - }, - { - type: "link", - path: "/storefront-development/products/collections/retrieve", - title: "Retrieve a Collection", - }, - { - type: "link", - path: "/storefront-development/products/collections/products", - title: "Retrieve a Collection's Products", - }, - ], - }, - { - type: "category", - title: "Carts", - children: [ - { - type: "link", - path: "/storefront-development/cart/create", - title: "Create Cart", - }, - { - type: "link", - path: "/storefront-development/cart/retrieve", - title: "Retrieve Cart", - }, - { - type: "link", - path: "/storefront-development/cart/context", - title: "Cart React Context", - }, - { - type: "link", - path: "/storefront-development/cart/update", - title: "Update Cart", - }, - { - type: "link", - path: "/storefront-development/cart/manage-items", - title: "Manage Line Items", - }, - ], - }, - { - type: "category", - title: "Checkout", - children: [ - { - type: "link", - path: "/storefront-development/checkout", - title: "Overview", - }, - { - type: "link", - path: "/storefront-development/checkout/email", - title: "1. Enter Email", - }, - { - type: "link", - path: "/storefront-development/checkout/address", - title: "2. Set Address", - }, - { - type: "link", - path: "/storefront-development/checkout/shipping", - title: "3. Choose Shipping Method", - }, - { - type: "link", - path: "/storefront-development/checkout/payment", - title: "4. Choose Payment Provider", + type: "category", + title: "General", children: [ { type: "link", - path: "/storefront-development/checkout/payment/stripe", - title: "Example: Stripe", + path: "/storefront-development/tips", + title: "Tips", + }, + { + type: "link", + path: "/storefront-development/publishable-api-keys", + title: "Publishable API Key", }, ], }, { - type: "link", - path: "/storefront-development/checkout/complete-cart", - title: "5. Complete Cart", - }, - ], - }, - { - type: "category", - title: "Customers", - children: [ - { - type: "link", - path: "/storefront-development/customers/register", - title: "Register Customer", + type: "category", + title: "Examples", + children: [ + { + type: "link", + path: "/storefront-development/guides/express-checkout", + title: "Express Checkout Storefront", + }, + ], }, { - type: "link", - path: "/storefront-development/customers/login", - title: "Login Customer", + type: "category", + title: "Regions", + children: [ + { + type: "link", + path: "/storefront-development/regions", + title: "Overview", + }, + { + type: "link", + path: "/storefront-development/regions/list", + title: "List Regions", + }, + { + type: "link", + path: "/storefront-development/regions/store-retrieve-region", + title: "Store and Retrieve Regions", + }, + { + type: "link", + path: "/storefront-development/regions/context", + title: "Region React Context", + }, + ], }, { - type: "link", - path: "/storefront-development/customers/third-party-login", - title: "Third-Party (Social) Login", + type: "category", + title: "Products", + children: [ + { + type: "link", + path: "/storefront-development/products/list", + title: "List Products", + }, + { + type: "link", + path: "/storefront-development/products/retrieve", + title: "Retrieve a Product", + }, + { + type: "link", + path: "/storefront-development/products/variants", + title: "Select a Variant", + }, + { + type: "link", + path: "/storefront-development/products/price", + title: "Retrieve Variant Prices", + autogenerate_path: "storefront-development/products/price/examples", + }, + { + type: "link", + path: "/storefront-development/products/inventory", + title: "Retrieve Variant Inventory", + }, + ], }, { - type: "link", - path: "/storefront-development/customers/reset-password", - title: "Reset Password", + type: "category", + title: "Product Categories", + children: [ + { + type: "link", + path: "/storefront-development/products/categories/list", + title: "List Categories", + }, + { + type: "link", + path: "/storefront-development/products/categories/retrieve", + title: "Retrieve a Category", + }, + { + type: "link", + path: "/storefront-development/products/categories/products", + title: "Retrieve a Category's Products", + }, + { + type: "link", + path: "/storefront-development/products/categories/nested-categories", + title: "Retrieve Nested Categories", + }, + ], }, { - type: "link", - path: "/storefront-development/customers/retrieve", - title: "Retrieve Customer", + type: "category", + title: "Product Collections", + children: [ + { + type: "link", + path: "/storefront-development/products/collections/list", + title: "List Collections", + }, + { + type: "link", + path: "/storefront-development/products/collections/retrieve", + title: "Retrieve a Collection", + }, + { + type: "link", + path: "/storefront-development/products/collections/products", + title: "Retrieve a Collection's Products", + }, + ], }, { - type: "link", - path: "/storefront-development/customers/context", - title: "Customer React Context", + type: "category", + title: "Carts", + children: [ + { + type: "link", + path: "/storefront-development/cart/create", + title: "Create Cart", + }, + { + type: "link", + path: "/storefront-development/cart/retrieve", + title: "Retrieve Cart", + }, + { + type: "link", + path: "/storefront-development/cart/context", + title: "Cart React Context", + }, + { + type: "link", + path: "/storefront-development/cart/update", + title: "Update Cart", + }, + { + type: "link", + path: "/storefront-development/cart/manage-items", + title: "Manage Line Items", + }, + ], }, { - type: "link", - path: "/storefront-development/customers/profile", - title: "Edit Customer Profile", + type: "category", + title: "Checkout", + children: [ + { + type: "link", + path: "/storefront-development/checkout", + title: "Overview", + }, + { + type: "link", + path: "/storefront-development/checkout/email", + title: "1. Enter Email", + }, + { + type: "link", + path: "/storefront-development/checkout/address", + title: "2. Set Address", + }, + { + type: "link", + path: "/storefront-development/checkout/shipping", + title: "3. Choose Shipping Method", + }, + { + type: "link", + path: "/storefront-development/checkout/payment", + title: "4. Choose Payment Provider", + children: [ + { + type: "link", + path: "/storefront-development/checkout/payment/stripe", + title: "Example: Stripe", + }, + ], + }, + { + type: "link", + path: "/storefront-development/checkout/complete-cart", + title: "5. Complete Cart", + }, + ], }, { - type: "link", - path: "/storefront-development/customers/addresses", - title: "Manage Customer Addresses", - }, - { - type: "link", - path: "/storefront-development/customers/log-out", - title: "Log-out Customer", + type: "category", + title: "Customers", + children: [ + { + type: "link", + path: "/storefront-development/customers/register", + title: "Register Customer", + }, + { + type: "link", + path: "/storefront-development/customers/login", + title: "Login Customer", + }, + { + type: "link", + path: "/storefront-development/customers/third-party-login", + title: "Third-Party (Social) Login", + }, + { + type: "link", + path: "/storefront-development/customers/reset-password", + title: "Reset Password", + }, + { + type: "link", + path: "/storefront-development/customers/retrieve", + title: "Retrieve Customer", + }, + { + type: "link", + path: "/storefront-development/customers/context", + title: "Customer React Context", + }, + { + type: "link", + path: "/storefront-development/customers/profile", + title: "Edit Customer Profile", + }, + { + type: "link", + path: "/storefront-development/customers/addresses", + title: "Manage Customer Addresses", + }, + { + type: "link", + path: "/storefront-development/customers/log-out", + title: "Log-out Customer", + }, + ], }, ], }, diff --git a/www/apps/resources/sidebars/tax.mjs b/www/apps/resources/sidebars/tax.mjs index 8c05cb7d88..8240395eba 100644 --- a/www/apps/resources/sidebars/tax.mjs +++ b/www/apps/resources/sidebars/tax.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const taxSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "tax", title: "Tax Module", - isChildSidebar: true, children: [ { type: "link", @@ -148,12 +148,19 @@ export const taxSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/tax", + type: "sidebar", + sidebar_id: "tax-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "Tax Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/tax", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -162,12 +169,19 @@ export const taxSidebar = [ ], }, { - type: "link", - path: "/references/tax/models", + type: "sidebar", + sidebar_id: "tax-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "Tax Module Data Models Reference", children: [ + { + type: "link", + path: "/references/tax/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/sidebars/troubleshooting.mjs b/www/apps/resources/sidebars/troubleshooting.mjs index b3d7a75540..2707ae4818 100644 --- a/www/apps/resources/sidebars/troubleshooting.mjs +++ b/www/apps/resources/sidebars/troubleshooting.mjs @@ -1,99 +1,114 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const troubleshootingSidebar = [ { - type: "category", - title: "Installation", + type: "sidebar", + sidebar_id: "troubleshooting", + title: "Troubleshooting", children: [ { type: "link", - path: "/troubleshooting/create-medusa-app-errors", - title: "Create Medusa App Errors", + path: "/troubleshooting", + title: "Overview", }, { - type: "link", - path: "/troubleshooting/errors-installing-cli", - title: "Errors Installing CLI", + type: "separator", }, { - type: "link", - path: "/troubleshooting/general-errors", - title: "General Errors", - }, - ], - }, - { - type: "category", - title: "Medusa Application", - children: [ - { - type: "link", - path: "/troubleshooting/eaddrinuse", - title: "EADDRINUSE Error", + type: "category", + title: "Installation", + children: [ + { + type: "link", + path: "/troubleshooting/create-medusa-app-errors", + title: "Create Medusa App Errors", + }, + { + type: "link", + path: "/troubleshooting/errors-installing-cli", + title: "Errors Installing CLI", + }, + { + type: "link", + path: "/troubleshooting/general-errors", + title: "General Errors", + }, + ], }, { - type: "link", - path: "/troubleshooting/database-errors", - title: "Database Errors", + type: "category", + title: "Medusa Application", + children: [ + { + type: "link", + path: "/troubleshooting/eaddrinuse", + title: "EADDRINUSE Error", + }, + { + type: "link", + path: "/troubleshooting/database-errors", + title: "Database Errors", + }, + { + type: "link", + path: "/troubleshooting/dist-imports", + title: "Importing from /dist", + }, + { + type: "link", + path: "/troubleshooting/workflow-errors", + title: "Workflow Errors", + }, + { + type: "link", + path: "/troubleshooting/test-errors", + title: "Test Errors", + }, + ], }, { - type: "link", - path: "/troubleshooting/dist-imports", - title: "Importing from /dist", + type: "category", + title: "Admin Development", + children: [ + { + type: "link", + path: "/troubleshooting/medusa-admin/no-widget-route", + title: "Widget or Route not Showing", + }, + ], }, { - type: "link", - path: "/troubleshooting/workflow-errors", - title: "Workflow Errors", + type: "category", + title: "Upgrade", + children: [ + { + type: "link", + path: "/troubleshooting/errors-after-upgrading", + title: "Errors After Upgrading", + }, + ], }, { - type: "link", - path: "/troubleshooting/test-errors", - title: "Test Errors", + type: "category", + title: "Frontend", + children: [ + { + type: "link", + path: "/troubleshooting/cors-errors", + title: "CORS Errors", + }, + ], }, - ], - }, - { - type: "category", - title: "Admin Development", - children: [ { - type: "link", - path: "/troubleshooting/medusa-admin/no-widget-route", - title: "Widget or Route not Showing", - }, - ], - }, - { - type: "category", - title: "Upgrade", - children: [ - { - type: "link", - path: "/troubleshooting/errors-after-upgrading", - title: "Errors After Upgrading", - }, - ], - }, - { - type: "category", - title: "Frontend", - children: [ - { - type: "link", - path: "/troubleshooting/cors-errors", - title: "CORS Errors", - }, - ], - }, - { - type: "category", - title: "Integrations", - hasTitleStyling: true, - children: [ - { - type: "link", - path: "/troubleshooting/s3", - title: "S3 Module Provider Errors", + type: "category", + title: "Integrations", + hasTitleStyling: true, + children: [ + { + type: "link", + path: "/troubleshooting/s3", + title: "S3 Module Provider Errors", + }, + ], }, ], }, diff --git a/www/apps/resources/sidebars/user.mjs b/www/apps/resources/sidebars/user.mjs index ab7ca43096..71c5a1177b 100644 --- a/www/apps/resources/sidebars/user.mjs +++ b/www/apps/resources/sidebars/user.mjs @@ -1,9 +1,9 @@ -/** @type {import('types').RawSidebarItem[]} */ +/** @type {import('types').Sidebar.SidebarItem[]} */ export const userSidebar = [ { - type: "category", + type: "sidebar", + sidebar_id: "user", title: "User Module", - isChildSidebar: true, children: [ { type: "link", @@ -131,12 +131,19 @@ export const userSidebar = [ title: "Admin Widget Zones", }, { - type: "link", - path: "/references/user", + type: "sidebar", + sidebar_id: "user-service-reference", title: "Main Service Reference", - isChildSidebar: true, childSidebarTitle: "User Module's Main Service Reference", children: [ + { + type: "link", + path: "/references/user", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Methods", @@ -146,12 +153,19 @@ export const userSidebar = [ ], }, { - type: "link", - path: "/references/user/models", + type: "sidebar", + sidebar_id: "user-models-reference", title: "Data Models Reference", - isChildSidebar: true, childSidebarTitle: "User Module Data Models Reference", children: [ + { + type: "link", + path: "/references/user/models", + title: "Reference Overview", + }, + { + type: "separator", + }, { type: "category", title: "Data Models", diff --git a/www/apps/resources/types/index.d.ts b/www/apps/resources/types/index.d.ts deleted file mode 100644 index 16000e4f06..0000000000 --- a/www/apps/resources/types/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { SidebarItemType as UiSidebarItemType } from "docs-ui" - -export declare type SidebarItemType = UiSidebarItemType & { - autogenerate_path?: string - children?: SidebarItemType[] -} diff --git a/www/apps/resources/utils/sidebar-attach-common-options.mjs b/www/apps/resources/utils/sidebar-attach-common-options.mjs deleted file mode 100644 index 4ec44f7dd8..0000000000 --- a/www/apps/resources/utils/sidebar-attach-common-options.mjs +++ /dev/null @@ -1,24 +0,0 @@ -/** @type {Partial} */ -const commonOptions = { - loaded: true, - isPathHref: true, -} - -/** - * - * @param {import("types").RawSidebarItem[]} sidebar - * @returns {import("types").RawSidebarItem[]} - */ -export function sidebarAttachHrefCommonOptions(sidebar) { - return sidebar.map((item) => { - if (item.type === "separator") { - return item - } - - return { - ...commonOptions, - ...item, - children: sidebarAttachHrefCommonOptions(item.children || []), - } - }) -} diff --git a/www/apps/ui/src/app/assets/sitemap.ts b/www/apps/ui/src/app/assets/sitemap.ts index 2145d92d8d..dbd1677ac0 100644 --- a/www/apps/ui/src/app/assets/sitemap.ts +++ b/www/apps/ui/src/app/assets/sitemap.ts @@ -1,8 +1,8 @@ import { MetadataRoute } from "next" -import { docsConfig } from "@/config/docs" +import { sidebars } from "@/config/sidebar" import { absoluteUrl } from "@/lib/absolute-url" -import { SidebarItem } from "types" +import { Sidebar } from "types" export default function sitemap(): MetadataRoute.Sitemap { const now = new Date() @@ -12,7 +12,7 @@ export default function sitemap(): MetadataRoute.Sitemap { lastModified?: string | Date }> = [] - function pushItems(newItems: SidebarItem[]) { + function pushItems(newItems: Sidebar.SidebarItem[]) { newItems.forEach((item) => { if (item.type !== "link") { return @@ -29,7 +29,7 @@ export default function sitemap(): MetadataRoute.Sitemap { }) } - pushItems(docsConfig.sidebar.default) + sidebars.forEach((sidebar) => pushItems(sidebar.items)) return items } diff --git a/www/apps/ui/src/app/layout.tsx b/www/apps/ui/src/app/layout.tsx index fc2d519e18..7ae82b31f7 100644 --- a/www/apps/ui/src/app/layout.tsx +++ b/www/apps/ui/src/app/layout.tsx @@ -60,14 +60,7 @@ export default function RootLayout({ htmlClassName={clsx(inter.variable, robotoMono.variable)} gaId={process.env.NEXT_PUBLIC_GA_ID} > - - {children} - + {children} ) } diff --git a/www/apps/ui/src/config/colors.ts b/www/apps/ui/src/config/colors.ts index 87acddcdd0..9908b636cb 100644 --- a/www/apps/ui/src/config/colors.ts +++ b/www/apps/ui/src/config/colors.ts @@ -1,226 +1,182 @@ export const colors = { dark: { - "--fg-on-color": "rgba(255, 255, 255, 1)", - "--border-danger": "rgba(190, 18, 60, 1)", - "--border-interactive": "rgba(96, 165, 250, 1)", - "--fg-interactive-hover": "rgba(59, 130, 246, 1)", - "--fg-error": "rgba(251, 113, 133, 1)", - "--bg-interactive": "rgba(96, 165, 250, 1)", - "--border-error": "rgba(244, 63, 94, 1)", - "--button-danger": "rgba(159, 18, 57, 1)", - "--button-danger-gradient-from": "rgba(255, 255, 255, 1)", - "--button-danger-gradient-to": "rgba(255, 255, 255, 0)", - "--fg-interactive": "rgba(96, 165, 250, 1)", - "--tag-red-border": "rgba(136, 19, 55, 1)", - "--tag-red-bg": "rgba(76, 5, 25, 1)", - "--tag-blue-text": "rgba(96, 165, 250, 1)", - "--tag-orange-text": "rgba(251, 191, 36, 1)", - "--tag-green-text": "rgba(52, 211, 153, 1)", - "--tag-orange-border": "rgba(120, 53, 15, 1)", - "--tag-green-border": "rgba(6, 78, 59, 1)", - "--tag-red-text": "rgba(251, 113, 133, 1)", - "--tag-green-bg-hover": "rgba(6, 78, 59, 1)", - "--tag-purple-bg-hover": "rgba(76, 29, 149, 1)", - "--tag-red-bg-hover": "rgba(136, 19, 55, 1)", - "--border-transparent": "rgba(255, 255, 255, 0)", - "--tag-orange-icon": "rgba(245, 158, 11, 1)", - "--tag-purple-bg": "rgba(46, 16, 100, 1)", - "--tag-blue-bg": "rgba(23, 37, 84, 1)", - "--tag-green-bg": "rgba(2, 44, 34, 1)", - "--tag-blue-border": "rgba(30, 58, 138, 1)", - "--tag-purple-border": "rgba(76, 29, 149, 1)", - "--tag-blue-bg-hover": "rgba(30, 42, 138, 1)", - "--tag-orange-bg": "rgba(69, 26, 3, 1)", - "--tag-orange-bg-hover": "rgba(120, 53, 15, 1)", - "--tag-blue-icon": "rgba(59, 130, 246, 1)", - "--tag-red-icon": "rgba(244, 63, 94, 1)", - "--tag-purple-icon": "rgba(139, 92, 246, 1)", - "--tag-purple-text": "rgba(167, 139, 250, 1)", - "--tag-green-icon": "rgba(16, 185, 129, 1)", "--button-danger-pressed": "rgba(225, 29, 72, 1)", - "--button-danger-pressed-gradient-from": "rgba(255, 255, 255, 1)", - "--button-danger-pressed-gradient-to": "rgba(255, 255, 255, 0)", - "--button-danger-hover": "rgba(190, 18, 60, 1)", - "--button-danger-hover-gradient-from": "rgba(255, 255, 255, 1)", - "--button-danger-hover-gradient-to": "rgba(255, 255, 255, 0)", - "--button-transparent": "rgba(0, 0, 0, 0.01)", - "--code-bg-base": "rgba(9, 9, 11, 1)", - "--button-neutral": "rgba(39, 39, 42, 1)", - "--button-neutral-gradient-from": "rgba(255, 255, 255, 1)", - "--button-neutral-gradient-to": "rgba(255, 255, 255, 0)", - "--button-transparent-hover": "rgba(39, 39, 42, 1)", - "--code-fg-subtle": "rgba(161, 161, 170, 1)", - "--tag-neutral-bg-hover": "rgba(63, 63, 70, 1)", - "--contrast-border-base": "rgba(82, 82, 91, 1)", - "--button-neutral-pressed": "rgba(82, 82, 91, 1)", - "--button-neutral-pressed-gradient-from": "rgba(255, 255, 255, 1)", - "--button-neutral-pressed-gradient-to": "rgba(255, 255, 255, 0)", - "--tag-neutral-bg": "rgba(39, 39, 42, 1)", + "--bg-base-pressed": "rgba(63, 63, 70, 1)", + "--bg-component-hover": "rgba(255, 255, 255, 0.1)", + "--border-interactive": "rgba(96, 165, 250, 1)", + "--button-neutral": "rgba(255, 255, 255, 0.04)", + "--tag-orange-border": "rgba(124, 45, 18, 1)", + "--tag-blue-text": "rgba(147, 197, 253, 1)", "--bg-highlight": "rgba(23, 37, 84, 1)", - "--border-base": "rgba(255, 255, 255, 0.1)", - "--code-fg-base": "rgba(250, 250, 250, 1)", "--tag-neutral-icon": "rgba(113, 113, 122, 1)", "--bg-switch-off-hover": "rgba(82, 82, 91, 1)", - "--bg-base": "rgba(24, 24, 27, 1)", + "--fg-on-color": "rgba(255, 255, 255, 1)", "--button-inverted-pressed": "rgba(161, 161, 170, 1)", - "--button-inverted-pressed-gradient-from": "rgba(255, 255, 255, 1)", - "--button-inverted-pressed-gradient-to": "rgba(255, 255, 255, 0)", - "--button-neutral-hover": "rgba(63, 63, 70, 1)", - "--button-neutral-hover-gradient-from": "rgba(255, 255, 255, 1)", - "--button-neutral-hover-gradient-to": "rgba(255, 255, 255, 0)", + "--fg-interactive-hover": "rgba(147, 197, 253, 1)", + "--fg-error": "rgba(251, 113, 133, 1)", "--bg-switch-off": "rgba(63, 63, 70, 1)", - "--border-strong": "rgba(255, 255, 255, 0.15)", + "--border-strong": "rgba(255, 255, 255, 0.16)", + "--border-error": "rgba(251, 113, 133, 1)", "--fg-subtle": "rgba(161, 161, 170, 1)", "--bg-highlight-hover": "rgba(30, 58, 138, 1)", "--button-inverted": "rgba(82, 82, 91, 1)", - "--button-inverted-gradient-from": "rgba(255, 255, 255, 1)", - "--button-inverted-gradient-to": "rgba(255, 255, 255, 0)", - "--fg-base": "rgba(250, 250, 250, 1)", - "--code-border": "rgba(39, 39, 42, 1)", - "--contrast-bg-subtle": "rgba(39, 39, 42, 1)", - "--contrast-bg-base-hover": "rgba(82, 82, 91, 1)", - "--bg-base-hover": "rgba(39, 39, 42, 1)", - "--bg-subtle-hover": "rgba(24, 24, 27, 1)", - "--fg-disabled": "rgba(63, 63, 70, 1)", - "--bg-subtle": "rgba(9, 9, 11, 1)", - "--tag-neutral-border": "rgba(63, 63, 70, 1)", - "--bg-subtle-pressed": "rgba(39, 39, 42, 1)", - "--tag-neutral-text": "rgba(161, 161, 170, 1)", - "--fg-muted": "rgba(82, 82, 91, 1)", - "--bg-overlay": "rgba(9, 9, 11, 0.7)", + "--tag-orange-text": "rgba(253, 186, 116, 1)", + "--fg-base": "rgba(244, 244, 245, 1)", + "--fg-disabled": "rgba(82, 82, 91, 1)", + "--button-danger": "rgba(159, 18, 57, 1)", + "--tag-neutral-border": "rgba(255, 255, 255, 0.06)", + "--tag-blue-border": "rgba(30, 58, 138, 1)", + "--tag-neutral-text": "rgba(212, 212, 216, 1)", + "--tag-purple-border": "rgba(91, 33, 182, 1)", + "--tag-green-text": "rgba(52, 211, 153, 1)", "--button-inverted-hover": "rgba(113, 113, 122, 1)", - "--button-inverted-hover-gradient-from": "rgba(255, 255, 255, 1)", - "--button-inverted-hover-gradient-to": "rgba(255, 255, 255, 0)", - "--fg-on-inverted": "rgba(9, 9, 11, 1)", - "--code-bg-subtle": "rgba(24, 24, 27, 1)", + "--bg-component-pressed": "rgba(255, 255, 255, 0.16)", + "--contrast-border-bot": "rgba(255, 255, 255, 0.08)", + "--tag-blue-icon": "rgba(96, 165, 250, 1)", + "--bg-field": "rgba(255, 255, 255, 0.04)", + "--tag-neutral-bg": "rgba(255, 255, 255, 0.08)", + "--tag-green-border": "rgba(6, 78, 59, 1)", + "--tag-red-icon": "rgba(251, 113, 133, 1)", + "--tag-red-text": "rgba(253, 164, 175, 1)", + "--tag-purple-icon": "rgba(167, 139, 250, 1)", + "--bg-interactive": "rgba(96, 165, 250, 1)", + "--bg-field-hover": "rgba(255, 255, 255, 0.08)", + "--border-transparent": "rgba(255, 255, 255, 0)", + "--tag-orange-icon": "rgba(251, 146, 60, 1)", + "--tag-purple-bg": "rgba(46, 16, 101, 1)", + "--bg-base-hover": "rgba(39, 39, 42, 1)", + "--tag-blue-bg": "rgba(23, 37, 84, 1)", + "--tag-green-bg": "rgba(2, 44, 34, 1)", + "--tag-purple-text": "rgba(196, 181, 253, 1)", + "--tag-red-border": "rgba(136, 19, 55, 1)", + "--border-danger": "rgba(190, 18, 60, 1)", + "--tag-green-icon": "rgba(16, 185, 129, 1)", + "--tag-red-bg": "rgba(76, 5, 25, 1)", + "--fg-interactive": "rgba(96, 165, 250, 1)", + "--tag-orange-bg": "rgba(67, 20, 7, 1)", + "--button-danger-hover": "rgba(190, 18, 60, 1)", "--bg-component": "rgba(39, 39, 42, 1)", - "--border-loud": "rgba(250, 250, 250, 1)", - "--bg-base-pressed": "rgba(63, 63, 70, 1)", "--bg-disabled": "rgba(39, 39, 42, 1)", - "--contrast-bg-highlight": "rgba(82, 82, 91, 1)", - "--button-transparent-pressed": "rgba(63, 63, 70, 1)", - "--code-fg-muted": "rgba(82, 82, 91, 1)", - "--contrast-fg-secondary": "rgba(161, 161, 170, 1)", - "--contrast-bg-base-pressed": "rgba(113, 113, 122, 1)", - "--contrast-fg-primary": "rgba(250, 250, 250, 1)", - "--contrast-bg-base": "rgba(63, 63, 70, 1)", - "--bg-component-pressed": "rgba(82, 82, 91, 1)", - "--bg-component-hover": "rgba(63, 63, 70, 1)", - "--bg-field": "rgba(39, 39, 42, 1)", - "--bg-field-component": "rgba(24, 24, 27, 1)", - "--bg-field-component-hover": "rgba(24, 24, 27, 1)", - "--bg-field-hover": "rgba(39, 39, 42, 1)", + "--button-transparent": "rgba(255, 255, 255, 0)", + "--border-menu-bot": "rgba(255, 255, 255, 0.08)", + "--tag-purple-bg-hover": "rgba(91, 33, 182, 1)", + "--tag-orange-bg-hover": "rgba(124, 45, 18, 1)", + "--tag-blue-bg-hover": "rgba(30, 58, 138, 1)", + "--tag-red-bg-hover": "rgba(136, 19, 55, 1)", + "--tag-green-bg-hover": "rgba(6, 78, 59, 1)", + "--border-menu-top": "rgba(33, 33, 36, 1)", + "--bg-base": "rgba(33, 33, 36, 1)", + "--contrast-border-top": "rgba(33, 33, 36, 1)", + "--bg-field-component": "rgba(33, 33, 36, 1)", + "--bg-subtle-hover": "rgba(33, 33, 36, 1)", + "--bg-subtle": "rgba(24, 24, 27, 1)", + "--fg-on-inverted": "rgba(24, 24, 27, 1)", + "--bg-overlay": "rgba(24, 24, 27, 0.72)", + "--button-transparent-hover": "rgba(255, 255, 255, 0.08)", + "--contrast-fg-secondary": "rgba(255, 255, 255, 0.56)", + "--contrast-border-base": "rgba(255, 255, 255, 0.16)", + "--contrast-bg-base-pressed": "rgba(82, 82, 91, 1)", + "--button-neutral-pressed": "rgba(255, 255, 255, 0.12)", + "--border-base": "rgba(255, 255, 255, 0.08)", + "--contrast-fg-primary": "rgba(255, 255, 255, 0.88)", + "--button-neutral-hover": "rgba(255, 255, 255, 0.08)", + "--contrast-bg-base": "rgba(39, 39, 42, 1)", + "--tag-neutral-bg-hover": "rgba(255, 255, 255, 0.12)", + "--contrast-bg-subtle": "rgba(255, 255, 255, 0.04)", + "--contrast-bg-base-hover": "rgba(63, 63, 70, 1)", + "--bg-field-component-hover": "rgba(39, 39, 42, 1)", + "--bg-subtle-pressed": "rgba(39, 39, 42, 1)", + "--button-transparent-pressed": "rgba(255, 255, 255, 0.12)", + "--fg-muted": "rgba(113, 113, 122, 1)", }, light: { - "--tag-green-bg": "rgba(209, 250, 229, 1)", - "--border-interactive": "rgba(59, 130, 246, 1)", - "--bg-highlight": "rgba(239, 246, 255, 1)", - "--tag-red-bg": "rgba(255, 228, 230, 1)", - "--tag-orange-bg": "rgba(254, 244, 199, 1)", - "--bg-base": "rgba(255, 255, 255, 1)", - "--tag-green-icon": "rgba(5, 150, 105, 1)", - "--tag-purple-bg-hover": "rgba(221, 214, 254, 1)", - "--tag-blue-border": "rgba(191, 219, 254, 1)", - "--tag-orange-icon": "rgba(217, 119, 6, 1)", - "--tag-purple-bg": "rgba(237, 233, 254, 1)", - "--tag-purple-text": "rgba(109, 40, 217, 1)", - "--tag-blue-bg": "rgba(219, 234, 254, 1)", - "--tag-blue-icon": "rgba(37, 99, 235, 1)", - "--border-error": "rgba(225, 29, 72, 1)", - "--fg-on-inverted": "rgba(255, 255, 255, 1)", - "--fg-on-color": "rgba(255, 255, 255, 1)", - "--fg-interactive-hover": "rgba(37, 99, 235, 1)", - "--fg-interactive": "rgba(59, 130, 246, 1)", - "--fg-error": "rgba(225, 29, 72, 1)", - "--border-danger": "rgba(190, 18, 60, 1)", - "--fg-muted": "rgba(161, 161, 170, 1)", - "--bg-subtle-pressed": "rgba(228, 228, 231, 1)", - "--tag-green-bg-hover": "rgba(167, 243, 208, 1)", - "--tag-blue-bg-hover": "rgba(191, 219, 254, 1)", - "--tag-red-icon": "rgba(225, 29, 72, 1)", - "--tag-red-bg-hover": "rgba(254, 205, 211, 1)", - "--tag-red-text": "rgba(190, 18, 60, 1)", - "--tag-purple-icon": "rgba(124, 58, 237, 1)", - "--tag-blue-text": "rgba(29, 78, 216, 1)", - "--tag-orange-bg-hover": "rgba(253, 230, 138, 1)", - "--tag-purple-border": "rgba(221, 214, 254, 1)", - "--tag-orange-text": "rgba(180, 83, 9, 1)", - "--tag-orange-border": "rgba(253, 230, 138, 1)", - "--tag-red-border": "rgba(254, 205, 211, 1)", - "--tag-green-border": "rgba(167, 243, 208, 1)", - "--tag-green-text": "rgba(4, 120, 87, 1)", - "--button-danger": "rgba(225, 29, 72, 1)", - "--button-danger-gradient-from": "rgba(255, 255, 255, 1)", - "--button-danger-gradient-to": "rgba(255, 255, 255, 0)", - "--button-danger-pressed": "rgba(159, 18, 57, 1)", - "--button-danger-pressed-gradient-from": "rgba(255, 255, 255, 1)", - "--button-danger-pressed-gradient-to": "rgba(255, 255, 255, 0)", - "--button-danger-hover": "rgba(190, 18, 60, 1)", - "--button-danger-hover-gradient-from": "rgba(255, 255, 255, 1)", - "--button-danger-hover-gradient-to": "rgba(255, 255, 255, 0)", - "--bg-interactive": "rgba(59, 130, 246, 1)", - "--bg-highlight-hover": "rgba(219, 234, 254, 1)", - "--button-transparent": "rgba(255, 255, 255, 0.01)", - "--bg-overlay": "rgba(9, 9, 11, 0.4)", "--tag-neutral-border": "rgba(228, 228, 231, 1)", - "--border-loud": "rgba(9, 9, 11, 1)", - "--contrast-fg-primary": "rgba(250, 250, 250, 1)", + "--tag-neutral-icon": "rgba(161, 161, 170, 1)", + "--bg-switch-off-hover": "rgba(212, 212, 216, 1)", + "--border-menu-bot": "rgba(255, 255, 255, 1)", + "--border-menu-top": "rgba(228, 228, 231, 1)", + "--bg-subtle-hover": "rgba(244, 244, 245, 1)", + "--contrast-fg-primary": "rgba(255, 255, 255, 0.88)", "--bg-switch-off": "rgba(228, 228, 231, 1)", "--contrast-bg-base-pressed": "rgba(63, 63, 70, 1)", + "--bg-field-component-hover": "rgba(250, 250, 250, 1)", "--bg-base-pressed": "rgba(228, 228, 231, 1)", "--tag-neutral-text": "rgba(82, 82, 91, 1)", - "--button-transparent-hover": "rgba(244, 244, 245, 1)", + "--tag-red-text": "rgba(159, 18, 57, 1)", "--contrast-bg-base": "rgba(24, 24, 27, 1)", - "--fg-disabled": "rgba(212, 212, 216, 1)", - "--bg-field": "rgba(250, 250, 250, 1)", "--border-strong": "rgba(212, 212, 216, 1)", - "--bg-field-hover": "rgba(244, 244, 245, 1)", - "--contrast-border-base": "rgba(82, 82, 91, 1)", - "--fg-base": "rgba(9, 9, 11, 1)", - "--contrast-bg-subtle": "rgba(39, 39, 42, 1)", - "--contrast-fg-secondary": "rgba(161, 161, 170, 1)", - "--code-fg-subtle": "rgba(161, 161, 170, 1)", - "--tag-neutral-bg": "rgba(244, 244, 245, 1)", - "--button-transparent-pressed": "rgba(228, 228, 231, 1)", - "--tag-neutral-bg-hover": "rgba(228, 228, 231, 1)", - "--code-fg-muted": "rgba(113, 113, 122, 1)", - "--contrast-bg-highlight": "rgba(63, 63, 70, 1)", - "--tag-neutral-icon": "rgba(113, 113, 122, 1)", - "--border-base": "rgba(228, 228, 231, 1)", - "--code-bg-base": "rgba(24, 24, 27, 1)", - "--button-neutral": "rgba(255, 255, 255, 1)", - "--button-neutral-gradient-from": "rgba(9, 9, 11, 0)", - "--button-neutral-gradient-to": "rgba(9, 9, 11, 1)", - "--code-bg-subtle": "rgba(39, 39, 42, 1)", - "--button-neutral-hover": "rgba(244, 244, 245, 1)", - "--button-neutral-hover-gradient-from": "rgba(9, 9, 11, 0)", - "--button-neutral-hover-gradient-to": "rgba(9, 9, 11, 1)", - "--contrast-bg-base-hover": "rgba(39, 39, 42, 1)", - "--bg-subtle": "rgba(250, 250, 250, 1)", - "--bg-switch-off-hover": "rgba(212, 212, 216, 1)", - "--code-fg-base": "rgba(250, 250, 250, 1)", - "--bg-disabled": "rgba(244, 244, 245, 1)", - "--code-border": "rgba(63, 63, 70, 1)", - "--fg-subtle": "rgba(82, 82, 91, 1)", - "--bg-subtle-hover": "rgba(244, 244, 245, 1)", - "--button-neutral-pressed": "rgba(228, 228, 231, 1)", - "--button-neutral-pressed-gradient-from": "rgba(9, 9, 11, 0)", - "--button-neutral-pressed-gradient-to": "rgba(9, 9, 11, 1)", - "--border-transparent": "rgba(9, 9, 11, 0)", - "--button-inverted": "rgba(9, 9, 11, 1)", - "--button-inverted-gradient-from": "rgba(255, 255, 255, 1)", - "--button-inverted-gradient-to": "rgba(255, 255, 255, 0)", - "--button-inverted-pressed": "rgba(39, 39, 42, 1)", - "--button-inverted-pressed-gradient-from": "rgba(255, 255, 255, 1)", - "--button-inverted-pressed-gradient-to": "rgba(255, 255, 255, 0)", - "--button-inverted-hover": "rgba(24, 24, 27, 1)", - "--button-inverted-hover-gradient-from": "rgba(255, 255, 255, 1)", - "--button-inverted-hover-gradient-to": "rgba(255, 255, 255, 0)", - "--bg-component-hover": "rgba(244, 244, 245, 1)", - "--bg-field-component": "rgba(255, 255, 255, 1)", - "--bg-field-component-hover": "rgba(250, 250, 250, 1)", - "--bg-component-pressed": "rgba(228, 228, 231, 1)", - "--bg-component": "rgba(250, 250, 250, 1)", + "--contrast-border-base": "rgba(255, 255, 255, 0.15)", + "--bg-field": "rgba(250, 250, 250, 1)", + "--tag-blue-text": "rgba(30, 64, 175, 1)", + "--button-inverted-pressed": "rgba(82, 82, 91, 1)", + "--border-interactive": "rgba(59, 130, 246, 1)", "--bg-base-hover": "rgba(244, 244, 245, 1)", + "--contrast-bg-subtle": "rgba(39, 39, 42, 1)", + "--bg-highlight": "rgba(239, 246, 255, 1)", + "--contrast-fg-secondary": "rgba(255, 255, 255, 0.56)", + "--tag-red-bg": "rgba(255, 228, 230, 1)", + "--button-transparent": "rgba(255, 255, 255, 0)", + "--button-danger-pressed": "rgba(159, 18, 57, 1)", + "--fg-on-color": "rgba(255, 255, 255, 1)", + "--button-inverted-hover": "rgba(63, 63, 70, 1)", + "--bg-field-component": "rgba(255, 255, 255, 1)", + "--tag-orange-text": "rgba(154, 52, 18, 1)", + "--tag-green-icon": "rgba(16, 185, 129, 1)", + "--border-base": "rgba(228, 228, 231, 1)", + "--bg-base": "rgba(255, 255, 255, 1)", + "--tag-orange-border": "rgba(254, 215, 170, 1)", + "--tag-red-border": "rgba(254, 205, 211, 1)", + "--tag-green-border": "rgba(167, 243, 208, 1)", + "--tag-green-text": "rgba(6, 95, 70, 1)", + "--button-neutral": "rgba(255, 255, 255, 1)", + "--tag-blue-border": "rgba(191, 219, 254, 1)", + "--fg-interactive-hover": "rgba(37, 99, 235, 1)", + "--tag-orange-icon": "rgba(249, 115, 22, 1)", + "--button-neutral-hover": "rgba(244, 244, 245, 1)", + "--fg-interactive": "rgba(59, 130, 246, 1)", + "--bg-component-pressed": "rgba(228, 228, 231, 1)", + "--tag-purple-bg": "rgba(237, 233, 254, 1)", + "--contrast-bg-base-hover": "rgba(39, 39, 42, 1)", + "--bg-component": "rgba(250, 250, 250, 1)", + "--bg-subtle": "rgba(250, 250, 250, 1)", + "--tag-purple-text": "rgba(91, 33, 182, 1)", + "--contrast-border-bot": "rgba(255, 255, 255, 0.1)", + "--button-inverted": "rgba(39, 39, 42, 1)", + "--tag-red-icon": "rgba(244, 63, 94, 1)", + "--button-transparent-hover": "rgba(244, 244, 245, 1)", + "--button-neutral-pressed": "rgba(228, 228, 231, 1)", + "--tag-purple-icon": "rgba(167, 139, 250, 1)", + "--bg-field-hover": "rgba(244, 244, 245, 1)", + "--fg-on-inverted": "rgba(255, 255, 255, 1)", + "--bg-interactive": "rgba(59, 130, 246, 1)", + "--border-danger": "rgba(190, 18, 60, 1)", + "--button-transparent-pressed": "rgba(228, 228, 231, 1)", + "--tag-purple-border": "rgba(221, 214, 254, 1)", + "--bg-highlight-hover": "rgba(219, 234, 254, 1)", + "--border-error": "rgba(225, 29, 72, 1)", + "--button-danger": "rgba(225, 29, 72, 1)", + "--tag-blue-bg": "rgba(219, 234, 254, 1)", + "--border-transparent": "rgba(255, 255, 255, 0)", + "--button-danger-hover": "rgba(190, 18, 60, 1)", + "--bg-subtle-pressed": "rgba(228, 228, 231, 1)", + "--fg-error": "rgba(225, 29, 72, 1)", + "--bg-component-hover": "rgba(244, 244, 245, 1)", + "--bg-disabled": "rgba(244, 244, 245, 1)", + "--tag-blue-icon": "rgba(96, 165, 250, 1)", + "--fg-subtle": "rgba(82, 82, 91, 1)", + "--tag-orange-bg-hover": "rgba(254, 215, 170, 1)", + "--tag-green-bg-hover": "rgba(167, 243, 208, 1)", + "--tag-red-bg-hover": "rgba(254, 205, 211, 1)", + "--tag-purple-bg-hover": "rgba(221, 214, 254, 1)", + "--tag-neutral-bg-hover": "rgba(228, 228, 231, 1)", + "--tag-blue-bg-hover": "rgba(191, 219, 254, 1)", + "--tag-green-bg": "rgba(209, 250, 229, 1)", + "--tag-neutral-bg": "rgba(244, 244, 245, 1)", + "--tag-orange-bg": "rgba(255, 237, 213, 1)", + "--fg-base": "rgba(24, 24, 27, 1)", + "--contrast-border-top": "rgba(24, 24, 27, 1)", + "--bg-overlay": "rgba(24, 24, 27, 0.4)", + "--fg-disabled": "rgba(161, 161, 170, 1)", + "--fg-muted": "rgba(113, 113, 122, 1)", }, } diff --git a/www/apps/ui/src/config/docs.tsx b/www/apps/ui/src/config/sidebar.tsx similarity index 97% rename from www/apps/ui/src/config/docs.tsx rename to www/apps/ui/src/config/sidebar.tsx index a9a0cdf1aa..15c6874d1a 100644 --- a/www/apps/ui/src/config/docs.tsx +++ b/www/apps/ui/src/config/sidebar.tsx @@ -1,12 +1,10 @@ -import { SidebarSectionItems } from "types" +import { Sidebar } from "types" -type DocsConfig = { - sidebar: SidebarSectionItems -} - -export const docsConfig: DocsConfig = { - sidebar: { - default: [ +export const sidebars: Sidebar.Sidebar[] = [ + { + sidebar_id: "ui", + title: "Medusa UI", + items: [ { type: "link", title: "Introduction", @@ -364,6 +362,5 @@ export const docsConfig: DocsConfig = { ], }, ], - mobile: [], }, -} +] diff --git a/www/apps/ui/src/config/site.ts b/www/apps/ui/src/config/site.ts index cf938bf971..bc1d79d60b 100644 --- a/www/apps/ui/src/config/site.ts +++ b/www/apps/ui/src/config/site.ts @@ -1,5 +1,6 @@ import { globalConfig } from "docs-ui" import { DocsConfig } from "types" +import { sidebars } from "./sidebar" type SiteConfig = { name: string @@ -16,17 +17,18 @@ export const siteConfig: SiteConfig = { basePath: process.env.NEXT_PUBLIC_BASE_PATH, url: `${baseUrl}/${process.env.NEXT_PUBLIC_BASE_PATH}`, description: "Primitives for building Medusa applications.", - // sidebar is defined in docs.tsx - sidebar: { - default: [], - mobile: [], - }, + sidebars, project: { title: "Medusa UI", key: "ui", }, breadcrumbOptions: { - showCategories: true, + startItems: [ + { + title: "Documentation", + link: baseUrl, + }, + ], }, logo: `${process.env.NEXT_PUBLIC_BASE_PATH}/images/logo.png`, version: { diff --git a/www/apps/ui/src/providers/sidebar.tsx b/www/apps/ui/src/providers/sidebar.tsx index 8aec55686a..d37748b9ff 100644 --- a/www/apps/ui/src/providers/sidebar.tsx +++ b/www/apps/ui/src/providers/sidebar.tsx @@ -2,7 +2,7 @@ import { SidebarProvider as UiSidebarProvider, useScrollController, } from "docs-ui" -import { docsConfig } from "@/config/docs" +import { sidebars } from "@/config/sidebar" type SidebarProviderProps = { children?: React.ReactNode @@ -13,11 +13,8 @@ const SidebarProvider = ({ children }: SidebarProviderProps) => { return ( {children} diff --git a/www/apps/ui/src/types/nav.ts b/www/apps/ui/src/types/nav.ts deleted file mode 100644 index 1b30f75502..0000000000 --- a/www/apps/ui/src/types/nav.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface SidebarNavItem { - title: string - href?: string - disabled?: boolean - external?: boolean - label?: string - items?: SidebarNavItem[] -} diff --git a/www/apps/user-guide/app/layout.tsx b/www/apps/user-guide/app/layout.tsx index 028058cadf..69ebaf9466 100644 --- a/www/apps/user-guide/app/layout.tsx +++ b/www/apps/user-guide/app/layout.tsx @@ -64,13 +64,7 @@ export default function RootLayout({ htmlClassName={clsx(inter.variable, robotoMono.variable)} gaId={process.env.NEXT_PUBLIC_GA_ID} > - } - > + }> {children} diff --git a/www/apps/user-guide/config/index.ts b/www/apps/user-guide/config/index.ts index 79a9aa2413..c32774ef83 100644 --- a/www/apps/user-guide/config/index.ts +++ b/www/apps/user-guide/config/index.ts @@ -1,5 +1,5 @@ -import { DocsConfig, SidebarItem } from "types" -import { generatedSidebar as sidebar } from "@/generated/sidebar.mjs" +import { DocsConfig, Sidebar } from "types" +import { generatedSidebars } from "@/generated/sidebar.mjs" import { globalConfig } from "docs-ui" const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000" @@ -9,16 +9,18 @@ export const config: DocsConfig = { titleSuffix: "Medusa Admin User Guide", baseUrl, basePath: process.env.NEXT_PUBLIC_BASE_PATH, - sidebar: { - default: sidebar as SidebarItem[], - mobile: [], - }, + sidebars: generatedSidebars as Sidebar.Sidebar[], project: { title: "User Guide", key: "user-guide", }, - breadcrumbOptions: { - showCategories: true, - }, logo: `${process.env.NEXT_PUBLIC_BASE_PATH}/images/logo.png`, + breadcrumbOptions: { + startItems: [ + { + title: "Documentation", + link: baseUrl, + }, + ], + }, } diff --git a/www/apps/user-guide/generated/sidebar.mjs b/www/apps/user-guide/generated/sidebar.mjs index 92a3e46990..bd95d8c9bc 100644 --- a/www/apps/user-guide/generated/sidebar.mjs +++ b/www/apps/user-guide/generated/sidebar.mjs @@ -1,166 +1,59 @@ -export const generatedSidebar = [ +export const generatedSidebars = [ { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/", - "title": "Introduction", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "path": "/reset-password", - "title": "Reset Password", - "children": [] - }, - { - "type": "separator" - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Tips", - "autogenerate_path": "/tips", - "children": [ + "sidebar_id": "user-guide", + "title": "User Guide", + "items": [ { "loaded": true, "isPathHref": true, "type": "link", - "path": "/tips/bulk-editor", - "title": "Bulk Editor in Medusa Admin", - "description": "", + "path": "/", + "title": "Introduction", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "path": "/tips/languages", - "title": "Languages in Medusa Admin", - "description": "", + "path": "/reset-password", + "title": "Reset Password", "children": [] }, + { + "type": "separator" + }, { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/tips/lists", - "title": "Lists", - "description": "", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Orders", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Overview", - "path": "/orders", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Details", - "path": "/orders/manage", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Payments", - "path": "/orders/payments", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Fulfillments", - "path": "/orders/fulfillments", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Edit Order Items", - "path": "/orders/edit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Returns", - "path": "/orders/returns", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Exchanges", - "path": "/orders/exchanges", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Claims", - "path": "/orders/claims", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Products", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Overview", - "path": "/products", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Create Product", - "path": "/products/create", + "type": "category", + "title": "Tips", + "autogenerate_path": "/tips", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "title": "Multi-Part Product", - "path": "/products/create/multi-part", + "path": "/tips/bulk-editor", + "title": "Bulk Editor in Medusa Admin", + "description": "", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "title": "Bundle Product", - "path": "/products/create/bundle", + "path": "/tips/languages", + "title": "Languages in Medusa Admin", + "description": "", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/tips/lists", + "title": "Lists", + "description": "", "children": [] } ] @@ -168,224 +61,71 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "link", - "title": "Edit Product", - "path": "/products/edit", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Variants", - "path": "/products/variants", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Collections", - "path": "/products/collections", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Categories", - "path": "/products/categories", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Import Products", - "path": "/products/import", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Export Products", - "path": "/products/export", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Inventory", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Overview", - "path": "/inventory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Inventory", - "path": "/inventory/inventory", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Reservations", - "path": "/inventory/reservations", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Customers", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Overview", - "path": "/customers", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Customers", - "path": "/customers/manage", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Groups", - "path": "/customers/groups", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Promotions", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Overview", - "path": "/promotions", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Create Promotion", - "path": "/promotions/create", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Promotion", - "path": "/promotions/manage", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Campaigns", - "path": "/promotions/campaigns", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Price Lists", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Overview", - "path": "/price-lists", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Create Price List", - "path": "/price-lists/create", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Manage Price List", - "path": "/price-lists/manage", - "children": [] - } - ] - }, - { - "loaded": true, - "isPathHref": true, - "type": "category", - "title": "Settings", - "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Overview", - "path": "/settings", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Store", - "path": "/settings/store", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Users", - "path": "/settings/users", + "type": "category", + "title": "Orders", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "title": "Manage Invites", - "path": "/settings/users/invites", + "title": "Overview", + "path": "/orders", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Details", + "path": "/orders/manage", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Payments", + "path": "/orders/payments", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Fulfillments", + "path": "/orders/fulfillments", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Edit Order Items", + "path": "/orders/edit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Returns", + "path": "/orders/returns", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Exchanges", + "path": "/orders/exchanges", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Claims", + "path": "/orders/claims", "children": [] } ] @@ -393,72 +133,88 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "link", - "title": "Regions", - "path": "/settings/regions", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Tax Regions", - "path": "/settings/tax-regions", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Return Reasons", - "path": "/settings/return-reasons", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Sales Channels", - "path": "/settings/sales-channels", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Product Types", - "path": "/settings/product-types", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Product Tags", - "path": "/settings/product-tags", - "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Location & Shipping", - "path": "/settings/locations-and-shipping", + "type": "category", + "title": "Products", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "title": "Manage Locations", - "path": "/settings/locations-and-shipping/locations", + "title": "Overview", + "path": "/products", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "title": "Manage Shipping Profiles", - "path": "/settings/locations-and-shipping/shipping-profiles", + "title": "Create Product", + "path": "/products/create", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Multi-Part Product", + "path": "/products/create/multi-part", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Bundle Product", + "path": "/products/create/bundle", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Edit Product", + "path": "/products/edit", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Variants", + "path": "/products/variants", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Collections", + "path": "/products/collections", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Categories", + "path": "/products/categories", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Import Products", + "path": "/products/import", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Export Products", + "path": "/products/export", "children": [] } ] @@ -466,32 +222,31 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "link", - "title": "Developer Settings", - "path": "/settings/developer", + "type": "category", + "title": "Inventory", "children": [ { "loaded": true, "isPathHref": true, "type": "link", - "title": "Publishable API Keys", - "path": "/settings/developer/publishable-api-keys", + "title": "Overview", + "path": "/inventory", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "title": "Secret API Keys", - "path": "/settings/developer/secret-api-keys", + "title": "Manage Inventory", + "path": "/inventory/inventory", "children": [] }, { "loaded": true, "isPathHref": true, "type": "link", - "title": "Workflows", - "path": "/settings/developer/workflows", + "title": "Manage Reservations", + "path": "/inventory/reservations", "children": [] } ] @@ -499,10 +254,261 @@ export const generatedSidebar = [ { "loaded": true, "isPathHref": true, - "type": "link", - "title": "Profile", - "path": "/settings/profile", - "children": [] + "type": "category", + "title": "Customers", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Overview", + "path": "/customers", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Customers", + "path": "/customers/manage", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Groups", + "path": "/customers/groups", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Promotions", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Overview", + "path": "/promotions", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Create Promotion", + "path": "/promotions/create", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Promotion", + "path": "/promotions/manage", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Campaigns", + "path": "/promotions/campaigns", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Price Lists", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Overview", + "path": "/price-lists", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Create Price List", + "path": "/price-lists/create", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Price List", + "path": "/price-lists/manage", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "category", + "title": "Settings", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Overview", + "path": "/settings", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Store", + "path": "/settings/store", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Users", + "path": "/settings/users", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Invites", + "path": "/settings/users/invites", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Regions", + "path": "/settings/regions", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Tax Regions", + "path": "/settings/tax-regions", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Return Reasons", + "path": "/settings/return-reasons", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Sales Channels", + "path": "/settings/sales-channels", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Product Types", + "path": "/settings/product-types", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Product Tags", + "path": "/settings/product-tags", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Location & Shipping", + "path": "/settings/locations-and-shipping", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Locations", + "path": "/settings/locations-and-shipping/locations", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Manage Shipping Profiles", + "path": "/settings/locations-and-shipping/shipping-profiles", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Developer Settings", + "path": "/settings/developer", + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Publishable API Keys", + "path": "/settings/developer/publishable-api-keys", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Secret API Keys", + "path": "/settings/developer/secret-api-keys", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Workflows", + "path": "/settings/developer/workflows", + "children": [] + } + ] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Profile", + "path": "/settings/profile", + "children": [] + } + ] } ] } diff --git a/www/apps/user-guide/providers/sidebar.tsx b/www/apps/user-guide/providers/sidebar.tsx index e170238727..4a7ac455da 100644 --- a/www/apps/user-guide/providers/sidebar.tsx +++ b/www/apps/user-guide/providers/sidebar.tsx @@ -14,13 +14,8 @@ const SidebarProvider = ({ children }: SidebarProviderProps) => { return ( {children} diff --git a/www/apps/user-guide/sidebar.mjs b/www/apps/user-guide/sidebar.mjs index 51cd3f1d1e..90cb0f447e 100644 --- a/www/apps/user-guide/sidebar.mjs +++ b/www/apps/user-guide/sidebar.mjs @@ -1,320 +1,322 @@ -import { sidebarAttachHrefCommonOptions } from "build-scripts" - -// TODO check the order of items based on the Medusa Admin's sidebar - -/** @type {import('types').RawSidebarItemType[]} */ -export const sidebar = sidebarAttachHrefCommonOptions([ +/** @type {import('types').Sidebar.RawSidebar[]} */ +export const sidebar = [ { - type: "link", - path: "/", - title: "Introduction", - }, - { - type: "link", - path: "/reset-password", - title: "Reset Password", - }, - { - type: "separator", - }, - { - type: "category", - title: "Tips", - autogenerate_path: "/tips", - }, - { - type: "category", - title: "Orders", - children: [ + sidebar_id: "user-guide", + title: "User Guide", + items: [ { type: "link", - title: "Overview", - path: "/orders", + path: "/", + title: "Introduction", }, { type: "link", - title: "Manage Details", - path: "/orders/manage", + path: "/reset-password", + title: "Reset Password", }, { - type: "link", - title: "Manage Payments", - path: "/orders/payments", + type: "separator", }, { - type: "link", - title: "Manage Fulfillments", - path: "/orders/fulfillments", + type: "category", + title: "Tips", + autogenerate_path: "/tips", }, { - type: "link", - title: "Edit Order Items", - path: "/orders/edit", - }, - { - type: "link", - title: "Manage Returns", - path: "/orders/returns", - }, - { - type: "link", - title: "Manage Exchanges", - path: "/orders/exchanges", - }, - { - type: "link", - title: "Manage Claims", - path: "/orders/claims", - }, - ], - }, - { - type: "category", - title: "Products", - children: [ - { - type: "link", - title: "Overview", - path: "/products", - }, - { - type: "link", - title: "Create Product", - path: "/products/create", + type: "category", + title: "Orders", children: [ { type: "link", - title: "Multi-Part Product", - path: "/products/create/multi-part", + title: "Overview", + path: "/orders", }, { type: "link", - title: "Bundle Product", - path: "/products/create/bundle", + title: "Manage Details", + path: "/orders/manage", + }, + { + type: "link", + title: "Manage Payments", + path: "/orders/payments", + }, + { + type: "link", + title: "Manage Fulfillments", + path: "/orders/fulfillments", + }, + { + type: "link", + title: "Edit Order Items", + path: "/orders/edit", + }, + { + type: "link", + title: "Manage Returns", + path: "/orders/returns", + }, + { + type: "link", + title: "Manage Exchanges", + path: "/orders/exchanges", + }, + { + type: "link", + title: "Manage Claims", + path: "/orders/claims", }, ], }, { - type: "link", - title: "Edit Product", - path: "/products/edit", - }, - { - type: "link", - title: "Manage Variants", - path: "/products/variants", - }, - { - type: "link", - title: "Manage Collections", - path: "/products/collections", - }, - { - type: "link", - title: "Manage Categories", - path: "/products/categories", - }, - { - type: "link", - title: "Import Products", - path: "/products/import", - }, - { - type: "link", - title: "Export Products", - path: "/products/export", - }, - ], - }, - { - type: "category", - title: "Inventory", - children: [ - { - type: "link", - title: "Overview", - path: "/inventory", - }, - { - type: "link", - title: "Manage Inventory", - path: "/inventory/inventory", - }, - { - type: "link", - title: "Manage Reservations", - path: "/inventory/reservations", - }, - ], - }, - { - type: "category", - title: "Customers", - children: [ - { - type: "link", - title: "Overview", - path: "/customers", - }, - { - type: "link", - title: "Manage Customers", - path: "/customers/manage", - }, - { - type: "link", - title: "Manage Groups", - path: "/customers/groups", - }, - ], - }, - { - type: "category", - title: "Promotions", - children: [ - { - type: "link", - title: "Overview", - path: "/promotions", - }, - { - type: "link", - title: "Create Promotion", - path: "/promotions/create", - }, - { - type: "link", - title: "Manage Promotion", - path: "/promotions/manage", - }, - { - type: "link", - title: "Manage Campaigns", - path: "/promotions/campaigns", - }, - ], - }, - { - type: "category", - title: "Price Lists", - children: [ - { - type: "link", - title: "Overview", - path: "/price-lists", - }, - { - type: "link", - title: "Create Price List", - path: "/price-lists/create", - }, - { - type: "link", - title: "Manage Price List", - path: "/price-lists/manage", - }, - ], - }, - { - type: "category", - title: "Settings", - children: [ - { - type: "link", - title: "Overview", - path: "/settings", - }, - { - type: "link", - title: "Store", - path: "/settings/store", - }, - { - type: "link", - title: "Users", - path: "/settings/users", + type: "category", + title: "Products", children: [ { type: "link", - title: "Manage Invites", - path: "/settings/users/invites", + title: "Overview", + path: "/products", + }, + { + type: "link", + title: "Create Product", + path: "/products/create", + children: [ + { + type: "link", + title: "Multi-Part Product", + path: "/products/create/multi-part", + }, + { + type: "link", + title: "Bundle Product", + path: "/products/create/bundle", + }, + ], + }, + { + type: "link", + title: "Edit Product", + path: "/products/edit", + }, + { + type: "link", + title: "Manage Variants", + path: "/products/variants", + }, + { + type: "link", + title: "Manage Collections", + path: "/products/collections", + }, + { + type: "link", + title: "Manage Categories", + path: "/products/categories", + }, + { + type: "link", + title: "Import Products", + path: "/products/import", + }, + { + type: "link", + title: "Export Products", + path: "/products/export", }, ], }, { - type: "link", - title: "Regions", - path: "/settings/regions", - }, - { - type: "link", - title: "Tax Regions", - path: "/settings/tax-regions", - }, - { - type: "link", - title: "Return Reasons", - path: "/settings/return-reasons", - }, - { - type: "link", - title: "Sales Channels", - path: "/settings/sales-channels", - }, - { - type: "link", - title: "Product Types", - path: "/settings/product-types", - }, - { - type: "link", - title: "Product Tags", - path: "/settings/product-tags", - }, - { - type: "link", - title: "Location & Shipping", - path: "/settings/locations-and-shipping", + type: "category", + title: "Inventory", children: [ { type: "link", - title: "Manage Locations", - path: "/settings/locations-and-shipping/locations", + title: "Overview", + path: "/inventory", }, { type: "link", - title: "Manage Shipping Profiles", - path: "/settings/locations-and-shipping/shipping-profiles", + title: "Manage Inventory", + path: "/inventory/inventory", + }, + { + type: "link", + title: "Manage Reservations", + path: "/inventory/reservations", }, ], }, { - type: "link", - title: "Developer Settings", - path: "/settings/developer", + type: "category", + title: "Customers", children: [ { type: "link", - title: "Publishable API Keys", - path: "/settings/developer/publishable-api-keys", + title: "Overview", + path: "/customers", }, { type: "link", - title: "Secret API Keys", - path: "/settings/developer/secret-api-keys", + title: "Manage Customers", + path: "/customers/manage", }, { type: "link", - title: "Workflows", - path: "/settings/developer/workflows", + title: "Manage Groups", + path: "/customers/groups", }, ], }, { - type: "link", - title: "Profile", - path: "/settings/profile", + type: "category", + title: "Promotions", + children: [ + { + type: "link", + title: "Overview", + path: "/promotions", + }, + { + type: "link", + title: "Create Promotion", + path: "/promotions/create", + }, + { + type: "link", + title: "Manage Promotion", + path: "/promotions/manage", + }, + { + type: "link", + title: "Manage Campaigns", + path: "/promotions/campaigns", + }, + ], + }, + { + type: "category", + title: "Price Lists", + children: [ + { + type: "link", + title: "Overview", + path: "/price-lists", + }, + { + type: "link", + title: "Create Price List", + path: "/price-lists/create", + }, + { + type: "link", + title: "Manage Price List", + path: "/price-lists/manage", + }, + ], + }, + { + type: "category", + title: "Settings", + children: [ + { + type: "link", + title: "Overview", + path: "/settings", + }, + { + type: "link", + title: "Store", + path: "/settings/store", + }, + { + type: "link", + title: "Users", + path: "/settings/users", + children: [ + { + type: "link", + title: "Manage Invites", + path: "/settings/users/invites", + }, + ], + }, + { + type: "link", + title: "Regions", + path: "/settings/regions", + }, + { + type: "link", + title: "Tax Regions", + path: "/settings/tax-regions", + }, + { + type: "link", + title: "Return Reasons", + path: "/settings/return-reasons", + }, + { + type: "link", + title: "Sales Channels", + path: "/settings/sales-channels", + }, + { + type: "link", + title: "Product Types", + path: "/settings/product-types", + }, + { + type: "link", + title: "Product Tags", + path: "/settings/product-tags", + }, + { + type: "link", + title: "Location & Shipping", + path: "/settings/locations-and-shipping", + children: [ + { + type: "link", + title: "Manage Locations", + path: "/settings/locations-and-shipping/locations", + }, + { + type: "link", + title: "Manage Shipping Profiles", + path: "/settings/locations-and-shipping/shipping-profiles", + }, + ], + }, + { + type: "link", + title: "Developer Settings", + path: "/settings/developer", + children: [ + { + type: "link", + title: "Publishable API Keys", + path: "/settings/developer/publishable-api-keys", + }, + { + type: "link", + title: "Secret API Keys", + path: "/settings/developer/secret-api-keys", + }, + { + type: "link", + title: "Workflows", + path: "/settings/developer/workflows", + }, + ], + }, + { + type: "link", + title: "Profile", + path: "/settings/profile", + }, + ], }, ], }, -]) +] diff --git a/www/packages/build-scripts/src/generate-sidebar.ts b/www/packages/build-scripts/src/generate-sidebar.ts index 7ff08e88ea..3e1fb798cc 100644 --- a/www/packages/build-scripts/src/generate-sidebar.ts +++ b/www/packages/build-scripts/src/generate-sidebar.ts @@ -1,13 +1,14 @@ -import type { RawSidebarItem, SidebarItem } from "types" import { existsSync, mkdirSync, readdirSync, statSync } from "fs" import path from "path" -import { getSidebarItemLink, sidebarAttachHrefCommonOptions } from "./index.js" +import { getSidebarItemLink, sidebarAttachCommonOptions } from "./index.js" import getCoreFlowsRefSidebarChildren from "./utils/get-core-flows-ref-sidebar-children.js" import { parseTags } from "./utils/parse-tags.js" import numberSidebarItems from "./utils/number-sidebar-items.js" import { sortSidebarItems } from "./utils/sidebar-sorting.js" +import { Sidebar } from "types" +import { validateSidebarUniqueIds } from "./utils/validate-sidebar-unique-ids.js" -export type ItemsToAdd = SidebarItem & { +export type ItemsToAdd = Sidebar.SidebarItem & { sidebar_position?: number } @@ -52,9 +53,7 @@ async function getAutogeneratedSidebarItems( loaded: true, }) } else { - items.push( - ...(sidebarAttachHrefCommonOptions(newItems) as ItemsToAdd[]) - ) + items.push(...newItems) } continue } @@ -96,7 +95,7 @@ async function getAutogeneratedSidebarItems( async function getAutogeneratedTagSidebarItems( tags: string, type: "link" | "ref", - existingChildren?: RawSidebarItem[] + existingChildren?: Sidebar.RawSidebarItem[] ): Promise { const items: ItemsToAdd[] = [] @@ -105,13 +104,15 @@ async function getAutogeneratedTagSidebarItems( items.push( ...parsedTags .filter((tagItem) => { - return existingChildren?.every((existingItem) => { - if (existingItem.type !== "link" && existingItem.type !== "ref") { - return true - } + return existingChildren + ? existingChildren.every((existingItem) => { + if (existingItem.type !== "link" && existingItem.type !== "ref") { + return true + } - return existingItem.path !== tagItem.path - }) + return existingItem.path !== tagItem.path + }) + : true }) .map( (tagItem) => @@ -122,10 +123,12 @@ async function getAutogeneratedTagSidebarItems( ) ) - return sidebarAttachHrefCommonOptions([...(existingChildren || []), ...items]) + return sidebarAttachCommonOptions([...(existingChildren || []), ...items]) } -async function checkItem(item: RawSidebarItem): Promise { +async function checkItem( + item: Sidebar.RawSidebarItem +): Promise { if (!item.type) { throw new Error( `ERROR: The following item doesn't have a type: ${JSON.stringify( @@ -138,14 +141,26 @@ async function checkItem(item: RawSidebarItem): Promise { if (item.type === "separator") { return item } + if (item.type === "sidebar" && !item.sidebar_id) { + throw new Error( + `ERROR: The following sidebar item doesn't have a sidebar_id: ${JSON.stringify( + item, + undefined, + 2 + )}` + ) + } if (item.autogenerate_path) { - item.children = ( - await getAutogeneratedSidebarItems(item.autogenerate_path) - ).map((child) => { - delete child.sidebar_position + item.children = [ + ...(item.children || []), + ...(await getAutogeneratedSidebarItems(item.autogenerate_path)).map( + (child) => { + delete child.sidebar_position - return child - }) + return child + } + ), + ] } else if (item.autogenerate_tags) { item.children = await getAutogeneratedTagSidebarItems( item.autogenerate_tags, @@ -156,13 +171,16 @@ async function checkItem(item: RawSidebarItem): Promise { item.custom_autogenerate && Object.hasOwn(customGenerators, item.custom_autogenerate) ) { - item.children = await customGenerators[item.custom_autogenerate]() + item.children = [ + ...(item.children || []), + ...(await customGenerators[item.custom_autogenerate]()), + ] } else if (item.children) { item.children = await checkItems(item.children) } item.children = sortSidebarItems({ - items: item.children as RawSidebarItem[], + items: item.children as Sidebar.RawSidebarItem[], type: item.sort_sidebar, }) @@ -170,10 +188,10 @@ async function checkItem(item: RawSidebarItem): Promise { } async function checkItems( - items: RawSidebarItem[], + items: Sidebar.RawSidebarItem[], options?: GenerateSidebarOptions -): Promise { - const updatedItems = ( +): Promise { + let updatedItems = ( await Promise.all(items.map(async (item) => await checkItem(item))) ).filter((item) => { if (item.type !== "category" && item.type !== "sub-category") { @@ -184,20 +202,29 @@ async function checkItems( }) if (options?.addNumbering) { - return numberSidebarItems(updatedItems) + updatedItems = numberSidebarItems(updatedItems) } - return updatedItems + return sidebarAttachCommonOptions(updatedItems) } export async function generateSidebar( - sidebar: RawSidebarItem[], + sidebars: Sidebar.RawSidebar[], options?: GenerateSidebarOptions ): Promise { const path = await import("path") const { writeFileSync } = await import("fs") - const normalizedSidebar = await checkItems(sidebar, options) + const normalizedSidebars: Sidebar.RawSidebar[] = [] + + validateSidebarUniqueIds(sidebars) + + for (const sidebarItem of sidebars) { + normalizedSidebars.push({ + ...sidebarItem, + items: await checkItems(sidebarItem.items, options), + }) + } const generatedDirPath = path.resolve("generated") @@ -208,8 +235,8 @@ export async function generateSidebar( // write normalized sidebar writeFileSync( path.resolve(generatedDirPath, "sidebar.mjs"), - `export const generatedSidebar = ${JSON.stringify( - normalizedSidebar, + `export const generatedSidebars = ${JSON.stringify( + normalizedSidebars, null, 2 )}`, diff --git a/www/packages/build-scripts/src/utils/get-sidebar-item-link.ts b/www/packages/build-scripts/src/utils/get-sidebar-item-link.ts index d30d1ca3bd..3d865e9ee5 100644 --- a/www/packages/build-scripts/src/utils/get-sidebar-item-link.ts +++ b/www/packages/build-scripts/src/utils/get-sidebar-item-link.ts @@ -1,6 +1,6 @@ import { getFrontMatter, findPageTitle } from "docs-utils" -import { ItemsToAdd, sidebarAttachHrefCommonOptions } from "../index.js" -import { InteractiveSidebarItem } from "types" +import { ItemsToAdd, sidebarAttachCommonOptions } from "../index.js" +import { Sidebar } from "types" export async function getSidebarItemLink({ filePath, @@ -16,7 +16,7 @@ export async function getSidebarItemLink({ return } - const newItem = sidebarAttachHrefCommonOptions([ + const newItem = sidebarAttachCommonOptions([ { type: "link", path: @@ -25,7 +25,7 @@ export async function getSidebarItemLink({ title: frontmatter.sidebar_label || findPageTitle(filePath) || "", description: frontmatter.sidebar_description || "", }, - ])[0] as InteractiveSidebarItem + ])[0] as Sidebar.InteractiveSidebarItem return { ...newItem, diff --git a/www/packages/build-scripts/src/utils/number-sidebar-items.ts b/www/packages/build-scripts/src/utils/number-sidebar-items.ts index 90574090d7..8e03efd9ce 100644 --- a/www/packages/build-scripts/src/utils/number-sidebar-items.ts +++ b/www/packages/build-scripts/src/utils/number-sidebar-items.ts @@ -1,15 +1,15 @@ -import { InteractiveSidebarItem, SidebarItem, SidebarItemCategory } from "types" +import { Sidebar } from "types" export default function numberSidebarItems( - sidebarItems: SidebarItem[], + sidebarItems: Sidebar.SidebarItem[], numbering = [1] -): SidebarItem[] { +): Sidebar.SidebarItem[] { if (!numbering.length) { numbering.push(1) } const isTopItems = numbering.length === 1 - const numberedItems: SidebarItem[] = [] - let parentItem: InteractiveSidebarItem | undefined + const numberedItems: Sidebar.SidebarItem[] = [] + let parentItem: Sidebar.InteractiveSidebarItem | undefined sidebarItems.forEach((item) => { if (item.type === "separator") { ;(parentItem?.children || numberedItems).push(item) @@ -29,6 +29,7 @@ export default function numberSidebarItems( numberedItems.push( item.type === "category" ? { + initialOpen: false, ...item, title: item.chapterTitle, } @@ -43,7 +44,7 @@ export default function numberSidebarItems( parentItem = numberedItems[ numberedItems.length - 1 - ] as SidebarItemCategory + ] as Sidebar.SidebarItemCategory } if (item.children) { diff --git a/www/packages/build-scripts/src/utils/sidebar-attach-href-common-options.ts b/www/packages/build-scripts/src/utils/sidebar-attach-href-common-options.ts index bb44f8b048..b4e780feae 100644 --- a/www/packages/build-scripts/src/utils/sidebar-attach-href-common-options.ts +++ b/www/packages/build-scripts/src/utils/sidebar-attach-href-common-options.ts @@ -1,13 +1,13 @@ -import { RawSidebarItem } from "types" +import { Sidebar } from "types" -const commonOptions: Partial = { +const commonOptions: Partial = { loaded: true, isPathHref: true, } -export function sidebarAttachHrefCommonOptions( - sidebar: RawSidebarItem[] -): RawSidebarItem[] { +export function sidebarAttachCommonOptions( + sidebar: Sidebar.RawSidebarItem[] +): Sidebar.RawSidebarItem[] { return sidebar.map((item) => { if (item.type === "separator") { return item @@ -16,7 +16,7 @@ export function sidebarAttachHrefCommonOptions( return { ...commonOptions, ...item, - children: sidebarAttachHrefCommonOptions(item.children || []), + children: sidebarAttachCommonOptions(item.children || []), } }) } diff --git a/www/packages/build-scripts/src/utils/sidebar-sorting.ts b/www/packages/build-scripts/src/utils/sidebar-sorting.ts index 780c7ae78c..5303bd3417 100644 --- a/www/packages/build-scripts/src/utils/sidebar-sorting.ts +++ b/www/packages/build-scripts/src/utils/sidebar-sorting.ts @@ -1,14 +1,14 @@ -import { InteractiveSidebarItem, RawSidebarItem, SidebarSortType } from "types" +import { Sidebar } from "types" type Options = { - items: RawSidebarItem[] - type?: SidebarSortType + items: Sidebar.RawSidebarItem[] + type?: Sidebar.SidebarSortType } export const sortSidebarItems = ({ items, type = "none", -}: Options): RawSidebarItem[] => { +}: Options): Sidebar.RawSidebarItem[] => { switch (type) { case "alphabetize": return alphabetizeSidebarItems(items) @@ -17,9 +17,11 @@ export const sortSidebarItems = ({ } } -const alphabetizeSidebarItems = (items: RawSidebarItem[]): RawSidebarItem[] => { - const segments: RawSidebarItem[][] = [] - let currentSegment: RawSidebarItem[] = [] +const alphabetizeSidebarItems = ( + items: Sidebar.RawSidebarItem[] +): Sidebar.RawSidebarItem[] => { + const segments: Sidebar.RawSidebarItem[][] = [] + let currentSegment: Sidebar.RawSidebarItem[] = [] items.forEach((item) => { if (item.type === "separator") { @@ -41,7 +43,7 @@ const alphabetizeSidebarItems = (items: RawSidebarItem[]): RawSidebarItem[] => { .map((segment) => { return segment[0].type === "separator" ? segment - : (segment as InteractiveSidebarItem[]).sort((a, b) => + : (segment as Sidebar.InteractiveSidebarItem[]).sort((a, b) => a.title.localeCompare(b.title) ) }) diff --git a/www/packages/build-scripts/src/utils/validate-sidebar-unique-ids.ts b/www/packages/build-scripts/src/utils/validate-sidebar-unique-ids.ts new file mode 100644 index 0000000000..684b7d0fdb --- /dev/null +++ b/www/packages/build-scripts/src/utils/validate-sidebar-unique-ids.ts @@ -0,0 +1,22 @@ +import { Sidebar } from "types" + +export const validateSidebarUniqueIds = ( + sidebars: (Sidebar.RawSidebar | Sidebar.SidebarItemSidebar)[], + sidebarIds = new Set() +): void => { + for (const sidebar of sidebars) { + if (sidebarIds.has(sidebar.sidebar_id)) { + throw new Error(`Duplicate sidebar item id found: ${sidebar.sidebar_id}`) + } + + sidebarIds.add(sidebar.sidebar_id) + + const children = ( + "items" in sidebar ? sidebar.items : sidebar.children || [] + ).filter( + (child) => child.type === "sidebar" + ) as Sidebar.SidebarItemSidebar[] + + validateSidebarUniqueIds(children, sidebarIds) + } +} diff --git a/www/packages/docs-ui/src/components/Breadcrumbs/index.tsx b/www/packages/docs-ui/src/components/Breadcrumbs/index.tsx index 616f60164d..97fc268ec2 100644 --- a/www/packages/docs-ui/src/components/Breadcrumbs/index.tsx +++ b/www/packages/docs-ui/src/components/Breadcrumbs/index.tsx @@ -3,94 +3,53 @@ import React, { useMemo } from "react" import clsx from "clsx" import Link from "next/link" -import { SidebarItemLink } from "types" -import { - CurrentItemsState, - isSidebarItemLink, - useSidebar, - useSiteConfig, -} from "../../providers" +import { useSidebar, useSiteConfig } from "../../providers" import { Button } from "../Button" import { TriangleRightMini } from "@medusajs/icons" +import { Sidebar } from "types" + +type BreadcrumbItems = { + title: string + link: string +}[] export const Breadcrumbs = () => { - const { currentItems, activeItem: sidebarActiveItem } = useSidebar() + const { sidebarHistory, getSidebarFirstLinkChild, getSidebar } = useSidebar() const { - config: { breadcrumbOptions, project, baseUrl, basePath }, + config: { breadcrumbOptions }, } = useSiteConfig() - const getLinkPath = (item?: SidebarItemLink): string | undefined => { - if (!item) { - return - } + const getLinkPath = (item: Sidebar.SidebarItemLink): string => { return item.isPathHref ? item.path : `#${item.path}` } - const getBreadcrumbsOfItem = ( - item: CurrentItemsState - ): Map => { - let tempBreadcrumbItems: Map = new Map() - if (item.previousSidebar) { - tempBreadcrumbItems = getBreadcrumbsOfItem(item.previousSidebar) - } - - const parentPath = isSidebarItemLink(item.parentItem) - ? getLinkPath(item.parentItem) - : (item.parentItem?.type === "category" && - breadcrumbOptions?.showCategories) || - item.parentItem?.type === "sub-category" - ? "#" - : undefined - const firstItemPath = isSidebarItemLink(item.default[0]) - ? getLinkPath(item.default[0]) - : (item.default[0].type === "category" && - breadcrumbOptions?.showCategories) || - item.default[0].type === "sub-category" - ? "#" - : undefined - - const breadcrumbPath = parentPath || firstItemPath || "/" - - tempBreadcrumbItems.set( - breadcrumbPath, - item.parentItem?.childSidebarTitle || - item.parentItem?.chapterTitle || - item.parentItem?.title || - "" - ) - - return tempBreadcrumbItems - } - const breadcrumbItems = useMemo(() => { - const tempBreadcrumbItems: Map = new Map() - tempBreadcrumbItems.set(`${baseUrl}${basePath}`, project.title) - - if (currentItems) { - getBreadcrumbsOfItem(currentItems).forEach((value, key) => - tempBreadcrumbItems.set(key, value) - ) + const items: BreadcrumbItems = [] + if (breadcrumbOptions?.startItems) { + items.push(...breadcrumbOptions.startItems) } - if (sidebarActiveItem) { - if ( - sidebarActiveItem.parentItem && - (sidebarActiveItem.parentItem.type !== "category" || - breadcrumbOptions?.showCategories) - ) { - tempBreadcrumbItems.set( - isSidebarItemLink(sidebarActiveItem.parentItem) - ? getLinkPath(sidebarActiveItem.parentItem) || "#" - : "#", - sidebarActiveItem.parentItem.chapterTitle || - sidebarActiveItem.parentItem.title || - "" - ) + sidebarHistory.forEach((sidebar_id) => { + const sidebar = getSidebar(sidebar_id) + + if (!sidebar) { + return } - } - return tempBreadcrumbItems - }, [currentItems, sidebarActiveItem, breadcrumbOptions]) + const sidebarFirstChild = getSidebarFirstLinkChild(sidebar) + + if (!sidebarFirstChild) { + return + } + + items.push({ + title: sidebar.title, + link: getLinkPath(sidebarFirstChild), + }) + }) + + return items + }, [sidebarHistory, breadcrumbOptions]) return (
{ "mb-docs_1 flex-wrap" )} > - {Array.from(breadcrumbItems).map(([link, title], index) => ( + {breadcrumbItems.map(({ title, link }, index) => ( {index > 0 && }
) diff --git a/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx index 92831fb373..ee6412ce5e 100644 --- a/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx @@ -3,34 +3,37 @@ // @refresh reset import React, { useEffect, useMemo, useState } from "react" -import { SidebarItemCategory as SidebarItemCategoryType } from "types" +import { Sidebar } from "types" import { Loading, SidebarItem, useSidebar } from "../../../.." import clsx from "clsx" import { MinusMini, PlusMini } from "@medusajs/icons" -export type SidebarItemCategory = { - item: SidebarItemCategoryType - expandItems?: boolean +export type SidebarItemCategoryProps = { + item: Sidebar.SidebarItemCategory } & React.AllHTMLAttributes export const SidebarItemCategory = ({ item, - expandItems = true, className, -}: SidebarItemCategory) => { +}: SidebarItemCategoryProps) => { const [showLoading, setShowLoading] = useState(false) const [open, setOpen] = useState( - item.initialOpen !== undefined ? item.initialOpen : expandItems + item.initialOpen !== undefined ? item.initialOpen : true ) const { - isChildrenActive, + isItemActive, updatePersistedCategoryState, getPersistedCategoryState, - persistState, + persistCategoryState, } = useSidebar() const itemShowLoading = useMemo(() => { return !item.loaded || (item.showLoadingIfEmpty && !item.children?.length) }, [item]) + const isActive = useMemo(() => { + return isItemActive({ + item, + }) + }, [isItemActive, item]) useEffect(() => { if (open && itemShowLoading) { @@ -45,22 +48,20 @@ export const SidebarItemCategory = ({ }, [itemShowLoading, showLoading]) useEffect(() => { - const isActive = isChildrenActive(item) - if (isActive && !open) { setOpen(true) } - }, [isChildrenActive, item.children]) + }, [isActive, item.children]) useEffect(() => { - if (!persistState) { + if (!persistCategoryState) { return } const persistedOpen = getPersistedCategoryState(item.title) - if (persistedOpen !== undefined) { + if (persistedOpen !== undefined && !isActive) { setOpen(persistedOpen) } - }, [persistState]) + }, [persistCategoryState]) const handleOpen = () => { item.onOpen?.() @@ -90,7 +91,7 @@ export const SidebarItemCategory = ({ if (!open) { handleOpen() } - if (persistState) { + if (persistCategoryState) { updatePersistedCategoryState(item.title, !open) } setOpen((prev) => !prev) @@ -133,7 +134,7 @@ export const SidebarItemCategory = ({ ))} diff --git a/www/packages/docs-ui/src/components/Sidebar/Item/Link/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Item/Link/index.tsx index d1efaf5e98..e0c688e090 100644 --- a/www/packages/docs-ui/src/components/Sidebar/Item/Link/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/Item/Link/index.tsx @@ -2,8 +2,8 @@ // @refresh reset -import React, { useEffect, useMemo, useRef } from "react" -import { SidebarItemLink as SidebarItemlinkType } from "types" +import React, { useCallback, useEffect, useMemo, useRef } from "react" +import { Sidebar } from "types" import { checkSidebarItemVisibility, SidebarItem, @@ -14,27 +14,36 @@ import clsx from "clsx" import Link from "next/link" export type SidebarItemLinkProps = { - item: SidebarItemlinkType + item: Sidebar.SidebarItemLink nested?: boolean + isParentCategoryOpen?: boolean } & React.AllHTMLAttributes export const SidebarItemLink = ({ item, className, nested = false, + isParentCategoryOpen, }: SidebarItemLinkProps) => { const { - isLinkActive, + isItemActive, setMobileSidebarOpen: setSidebarOpen, disableActiveTransition, sidebarRef, sidebarTopHeight, } = useSidebar() const { isMobile } = useMobile() - const active = useMemo(() => isLinkActive(item, true), [isLinkActive, item]) + const active = useMemo( + () => + isItemActive({ + item, + checkLinkChildren: false, + }), + [isItemActive, item] + ) const ref = useRef(null) - const newTopCalculator = useMemo(() => { + const getNewTopCalculator = useCallback(() => { if (!sidebarRef.current || !ref.current) { return 0 } @@ -48,33 +57,43 @@ export const SidebarItemLink = ({ sidebarRef.current.scrollTop - 10 // remove extra margin just in case ) - }, [sidebarTopHeight, sidebarRef, ref]) + }, [sidebarTopHeight, sidebarRef.current, ref.current]) useEffect(() => { - if (active && ref.current && sidebarRef.current && !isMobile) { - const isVisible = checkSidebarItemVisibility( - (ref.current.children.item(0) as HTMLElement) || ref.current, - !disableActiveTransition - ) - if (isVisible) { - return - } - if (!disableActiveTransition) { - ref.current.scrollIntoView({ - block: "center", - }) - } else { - sidebarRef.current.scrollTo({ - top: newTopCalculator, - }) - } + if ( + !active || + !ref.current || + !sidebarRef.current || + isMobile || + !isParentCategoryOpen + ) { + return + } + + const isVisible = checkSidebarItemVisibility( + (ref.current.children.item(0) as HTMLElement) || ref.current, + !disableActiveTransition + ) + if (isVisible) { + return + } + if (!disableActiveTransition) { + ref.current.scrollIntoView({ + block: "center", + }) + } else { + sidebarRef.current.scrollTo({ + top: getNewTopCalculator(), + }) } }, [ active, sidebarRef.current, disableActiveTransition, isMobile, - newTopCalculator, + ref.current, + getNewTopCalculator, + isParentCategoryOpen, ]) useEffect(() => { @@ -84,11 +103,7 @@ export const SidebarItemLink = ({ }, [active, isMobile]) const hasChildren = useMemo(() => { - return ( - !item.isChildSidebar && - !item.hideChildren && - (item.children?.length || 0) > 0 - ) + return !item.hideChildren && (item.children?.length || 0) > 0 }, [item.children]) const isTitleOneWord = useMemo( @@ -147,6 +162,7 @@ export const SidebarItemLink = ({ item={childItem} key={index} nested={!item.childrenSameLevel} + isParentCategoryOpen={isParentCategoryOpen} /> ))} diff --git a/www/packages/docs-ui/src/components/Sidebar/Item/Sidebar/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Item/Sidebar/index.tsx new file mode 100644 index 0000000000..60ced0c3ff --- /dev/null +++ b/www/packages/docs-ui/src/components/Sidebar/Item/Sidebar/index.tsx @@ -0,0 +1,63 @@ +"use client" + +// @refresh reset + +import React, { useMemo } from "react" +import { Sidebar } from "types" +import { useSidebar } from "../../../.." +import clsx from "clsx" +import Link from "next/link" + +export type SidebarItemSidebarProps = { + item: Sidebar.SidebarItemSidebar + nested?: boolean +} & React.AllHTMLAttributes + +export const SidebarItemSidebar = ({ + item, + className, + nested = false, +}: SidebarItemSidebarProps) => { + const { getSidebarFirstLinkChild: getSidebarFirstChild } = useSidebar() + + const isTitleOneWord = useMemo( + () => item.title.split(" ").length === 1, + [item.title] + ) + + const firstChild = useMemo(() => getSidebarFirstChild(item), [item]) + + return ( +
  • + + + + {item.title} + + {item.additionalElms} + + +
  • + ) +} diff --git a/www/packages/docs-ui/src/components/Sidebar/Item/SubCategory/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Item/SubCategory/index.tsx index ae9c9e6a9c..31e22cedf5 100644 --- a/www/packages/docs-ui/src/components/Sidebar/Item/SubCategory/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/Item/SubCategory/index.tsx @@ -2,90 +2,25 @@ // @refresh reset -import React, { useEffect, useMemo, useRef } from "react" -import { SidebarItemSubCategory as SidebarItemSubCategoryType } from "types" -import { - checkSidebarItemVisibility, - SidebarItem, - useMobile, - useSidebar, -} from "../../../.." +import React, { useMemo, useRef } from "react" +import { Sidebar } from "types" +import { SidebarItem } from "../../../.." import clsx from "clsx" -export type SidebarItemLinkProps = { - item: SidebarItemSubCategoryType +export type SidebarItemSubCategoryProps = { + item: Sidebar.SidebarItemSubCategory nested?: boolean + isParentCategoryOpen?: boolean } & React.AllHTMLAttributes export const SidebarItemSubCategory = ({ item, className, nested = false, -}: SidebarItemLinkProps) => { - const { isLinkActive, disableActiveTransition, sidebarRef } = useSidebar() - const { isMobile } = useMobile() - const active = useMemo( - () => !isMobile && isLinkActive(item, true), - [isLinkActive, item, isMobile] - ) + isParentCategoryOpen, +}: SidebarItemSubCategoryProps) => { const ref = useRef(null) - /** - * Tries to place the item in the center of the sidebar - */ - const newTopCalculator = (): number => { - if (!sidebarRef.current || !ref.current) { - return 0 - } - const sidebarBoundingRect = sidebarRef.current.getBoundingClientRect() - const sidebarHalf = sidebarBoundingRect.height / 2 - const itemTop = ref.current.offsetTop - const itemBottom = - itemTop + (ref.current.children.item(0) as HTMLElement)?.clientHeight - - // try deducting half - let newTop = itemTop - sidebarHalf - let newBottom = newTop + sidebarBoundingRect.height - if (newTop <= itemTop && newBottom >= itemBottom) { - return newTop - } - - // try adding half - newTop = itemTop + sidebarHalf - newBottom = newTop + sidebarBoundingRect.height - if (newTop <= itemTop && newBottom >= itemBottom) { - return newTop - } - - //return the item's top minus some top margin - return itemTop - sidebarBoundingRect.top - } - - useEffect(() => { - if ( - active && - ref.current && - sidebarRef.current && - window.innerWidth >= 1025 - ) { - if ( - !disableActiveTransition && - !checkSidebarItemVisibility( - (ref.current.children.item(0) as HTMLElement) || ref.current, - !disableActiveTransition - ) - ) { - ref.current.scrollIntoView({ - block: "center", - }) - } else if (disableActiveTransition) { - sidebarRef.current.scrollTo({ - top: newTopCalculator(), - }) - } - } - }, [active, sidebarRef.current, disableActiveTransition]) - const hasChildren = useMemo(() => { return !item.hideChildren && (item.children?.length || 0) > 0 }, [item.children]) @@ -103,15 +38,8 @@ export const SidebarItemSubCategory = ({ "py-docs_0.25 px-docs_0.5", "block w-full", !isTitleOneWord && "break-words", - active && [ - "rounded-docs_sm", - "shadow-borders-base dark:shadow-borders-base-dark", - "text-medusa-fg-base", - ], - !active && [ - !nested && "text-medusa-fg-subtle", - nested && "text-medusa-fg-muted", - ], + !nested && "text-medusa-fg-subtle", + nested && "text-medusa-fg-muted", "text-compact-small-plus", className )} @@ -140,6 +68,7 @@ export const SidebarItemSubCategory = ({ item={childItem} key={index} nested={!item.childrenSameLevel} + isParentCategoryOpen={isParentCategoryOpen} /> ))} diff --git a/www/packages/docs-ui/src/components/Sidebar/Item/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Item/index.tsx index 6c61848d1b..dad8e8e663 100644 --- a/www/packages/docs-ui/src/components/Sidebar/Item/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/Item/index.tsx @@ -1,17 +1,18 @@ "use client" import React from "react" -import { SidebarItem as SidebarItemType } from "types" -import { SidebarItemCategory } from "./Category" +import { Sidebar } from "types" import { SidebarItemLink } from "./Link" import { SidebarItemSubCategory } from "./SubCategory" import { DottedSeparator } from "../.." +import { SidebarItemCategory } from "./Category" +import { SidebarItemSidebar } from "./Sidebar" export type SidebarItemProps = { - item: SidebarItemType + item: Sidebar.SidebarItem nested?: boolean - expandItems?: boolean hasNextItems?: boolean + isParentCategoryOpen?: boolean } & React.AllHTMLAttributes export const SidebarItem = ({ @@ -33,6 +34,8 @@ export const SidebarItem = ({ case "ref": case "external": return + case "sidebar": + return case "separator": return } diff --git a/www/packages/docs-ui/src/components/Sidebar/Top/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Top/index.tsx index 604809e3ff..964b39b9ca 100644 --- a/www/packages/docs-ui/src/components/Sidebar/Top/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/Top/index.tsx @@ -2,17 +2,14 @@ import React from "react" import { SidebarChild } from "../Child" -import { InteractiveSidebarItem } from "types" import { SidebarTopMobileClose } from "./MobileClose" -import { DottedSeparator } from "../../.." +import { DottedSeparator, useSidebar } from "../../.." import clsx from "clsx" -export type SidebarTopProps = { - parentItem?: InteractiveSidebarItem -} +export const SidebarTop = React.forwardRef( + function SidebarTop(props, ref) { + const { sidebarHistory } = useSidebar() -export const SidebarTop = React.forwardRef( - function SidebarTop({ parentItem }, ref) { return (
    ( >
    - {parentItem && ( + {sidebarHistory.length > 1 && ( <> - + )} diff --git a/www/packages/docs-ui/src/components/Sidebar/index.tsx b/www/packages/docs-ui/src/components/Sidebar/index.tsx index cdde5f23ec..70fb094dfa 100644 --- a/www/packages/docs-ui/src/components/Sidebar/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/index.tsx @@ -1,39 +1,35 @@ "use client" import React, { Suspense, useMemo, useRef } from "react" -import { isSidebarItemLink, useSidebar } from "@/providers" +import { useSidebar } from "@/providers" import clsx from "clsx" import { Loading } from "@/components" import { SidebarItem } from "./Item" // @ts-expect-error can't install the types package because it doesn't support React v19 import { CSSTransition, SwitchTransition } from "react-transition-group" -import { SidebarTop, SidebarTopProps } from "./Top" +import { SidebarTop } from "./Top" import { useClickOutside, useKeyboardShortcut } from "@/hooks" import useResizeObserver from "@react-hook/resize-observer" +import { isSidebarItemLink } from "../../utils/sidebar-utils" export type SidebarProps = { className?: string - expandItems?: boolean - sidebarTopProps?: Omit } -export const Sidebar = ({ - className = "", - expandItems = true, - sidebarTopProps, -}: SidebarProps) => { +export const Sidebar = ({ className = "" }: SidebarProps) => { const sidebarWrapperRef = useRef(null) const sidebarTopRef = useRef(null) const { - items, - currentItems, + sidebars, + shownSidebar, mobileSidebarOpen, setMobileSidebarOpen, - staticSidebarItems, + isSidebarStatic, sidebarRef, desktopSidebarOpen, setDesktopSidebarOpen, setSidebarTopHeight, + sidebarHistory, } = useSidebar() useClickOutside({ elmRef: sidebarWrapperRef, @@ -51,15 +47,16 @@ export const Sidebar = ({ }, }) - const sidebarItems = useMemo( - () => currentItems || items, - [items, currentItems] - ) - useResizeObserver(sidebarTopRef as React.RefObject, () => { setSidebarTopHeight(sidebarTopRef.current?.clientHeight || 0) }) + const sidebarItems = useMemo(() => { + return shownSidebar && "items" in shownSidebar + ? shownSidebar.items + : shownSidebar?.children || [] + }, [shownSidebar]) + return ( <> {mobileSidebarOpen && ( @@ -94,7 +91,11 @@ export const Sidebar = ({
      - - {/* MOBILE SIDEBAR - keeping this in case we need it in the future */} - {/*
      - {!sidebarItems.mobile.length && !staticSidebarItems && ( - - )} - {sidebarItems.mobile.map((item, index) => ( - - ))} - {sidebarItems.mobile.length > 0 && } -
      */} - {/* DESKTOP SIDEBAR */} +
      - {!sidebarItems.default.length && !staticSidebarItems && ( - + {!sidebarItems.length && !isSidebarStatic && ( + )} - {sidebarItems.default.map((item, index) => { + {sidebarItems.map((item, index) => { const itemKey = item.type === "separator" ? index @@ -155,10 +136,7 @@ export const Sidebar = ({ > ) diff --git a/www/packages/docs-ui/src/hooks/use-child-docs/index.tsx b/www/packages/docs-ui/src/hooks/use-child-docs/index.tsx index f57107d26b..01239b4df5 100644 --- a/www/packages/docs-ui/src/hooks/use-child-docs/index.tsx +++ b/www/packages/docs-ui/src/hooks/use-child-docs/index.tsx @@ -9,17 +9,17 @@ import { H3, H4, Hr, - isSidebarItemLink, LocalSearch, MarkdownContent, SearchInput, useIsBrowser, useSidebar, } from "../.." -import { InteractiveSidebarItem, SidebarItem, SidebarItemLink } from "types" +import { Sidebar } from "types" import slugify from "slugify" import { MDXComponents } from "../.." import { ChevronDoubleRight, ExclamationCircle } from "@medusajs/icons" +import { isSidebarItemLink } from "../../utils/sidebar-utils" type HeadingComponent = ( props: React.HTMLAttributes @@ -60,11 +60,11 @@ export const useChildDocs = ({ ...searchProps } = { enable: false }, }: UseChildDocsProps) => { - const { currentItems, activeItem } = useSidebar() + const { shownSidebar, activeItem } = useSidebar() const { isBrowser } = useIsBrowser() const [searchQuery, setSearchQuery] = useState("") const [localSearch, setLocalSearch] = useState< - LocalSearch | undefined + LocalSearch | undefined >() const TitleHeaderComponent = useCallback( (level: number): HeadingComponent => { @@ -91,7 +91,7 @@ export const useChildDocs = ({ : "all" }, [showItems, hideItems]) - const filterCondition = (item: SidebarItem): boolean => { + const filterCondition = (item: Sidebar.SidebarItem): boolean => { if (item.type === "separator") { return false } @@ -111,8 +111,10 @@ export const useChildDocs = ({ } } - const filterItems = (items: SidebarItem[]): InteractiveSidebarItem[] => { - return (items.filter(filterCondition) as InteractiveSidebarItem[]) + const filterItems = ( + items: Sidebar.SidebarItem[] + ): Sidebar.InteractiveSidebarItem[] => { + return (items.filter(filterCondition) as Sidebar.InteractiveSidebarItem[]) .map((item) => Object.assign({}, item)) .map((item) => { if (item.children && filterType === "hide") { @@ -124,19 +126,19 @@ export const useChildDocs = ({ } const filterNonInteractiveItems = ( - items: SidebarItem[] | undefined - ): InteractiveSidebarItem[] => { + items: Sidebar.SidebarItem[] | undefined + ): Sidebar.InteractiveSidebarItem[] => { return ( (items?.filter( (item) => item.type !== "separator" - ) as InteractiveSidebarItem[]) || [] + ) as Sidebar.InteractiveSidebarItem[]) || [] ) } const getChildrenForLevel = ( - item: InteractiveSidebarItem, + item: Sidebar.InteractiveSidebarItem, currentLevel = 1 - ): InteractiveSidebarItem[] | undefined => { + ): Sidebar.InteractiveSidebarItem[] | undefined => { if (currentLevel === childLevel) { return filterNonInteractiveItems(item.children) } @@ -144,7 +146,7 @@ export const useChildDocs = ({ return } - const childrenResult: InteractiveSidebarItem[] = [] + const childrenResult: Sidebar.InteractiveSidebarItem[] = [] filterNonInteractiveItems(item.children).forEach((child) => { const childChildren = getChildrenForLevel(child, currentLevel + 1) @@ -162,34 +164,24 @@ export const useChildDocs = ({ const filteredItems = useMemo(() => { let targetItems = type === "sidebar" - ? currentItems - ? Object.assign({}, currentItems) - : undefined - : { - default: [...(activeItem?.children || [])], - } + ? shownSidebar && "items" in shownSidebar + ? shownSidebar.items + : shownSidebar?.children || [] + : [...(activeItem?.children || [])] if (filterType !== "all" && targetItems) { - targetItems = { - ...targetItems, - default: filterItems(targetItems.default), - } + targetItems = filterItems(targetItems) } - return targetItems - ? { - ...targetItems, - default: filterNonInteractiveItems(targetItems?.default), - } - : undefined - }, [currentItems, type, activeItem, filterType]) + return filterNonInteractiveItems(targetItems) + }, [shownSidebar, type, activeItem, filterType]) const searchableItems = useMemo(() => { - const searchableItems: SidebarItemLink[] = [] + const searchableItems: Sidebar.SidebarItemLink[] = [] if (!enableSearch) { return searchableItems } if (onlyTopLevel) { - filteredItems?.default?.forEach((item) => { + filteredItems.forEach((item) => { if (isSidebarItemLink(item)) { searchableItems.push(item) } else { @@ -197,16 +189,16 @@ export const useChildDocs = ({ isSidebarItemLink(child) ) if (firstChild) { - searchableItems.push(firstChild as SidebarItemLink) + searchableItems.push(firstChild as Sidebar.SidebarItemLink) } } }) } else { - filteredItems?.default?.forEach((item) => { - const childItems: SidebarItemLink[] = + filteredItems?.forEach((item) => { + const childItems: Sidebar.SidebarItemLink[] = (getChildrenForLevel(item)?.filter((childItem) => { return isSidebarItemLink(childItem) - }) as SidebarItemLink[]) || [] + }) as Sidebar.SidebarItemLink[]) || [] searchableItems.push(...childItems) }) } @@ -224,7 +216,7 @@ export const useChildDocs = ({ } setLocalSearch( - getLocalSearch({ + getLocalSearch({ docs: searchableItems, searchableFields: ["title", "description"], options: { @@ -263,7 +255,7 @@ export const useChildDocs = ({ localStorage.setItem(`${storageKey}-query`, searchQuery) }, [isBrowser, searchQuery, storageKey, enableSearch]) - const getTopLevelElms = (items?: InteractiveSidebarItem[]) => { + const getTopLevelElms = (items?: Sidebar.InteractiveSidebarItem[]) => { return ( isSidebarItemLink(item) - ) as SidebarItemLink + ) as Sidebar.SidebarItemLink )?.path : "#" return { @@ -292,7 +284,7 @@ export const useChildDocs = ({ } const getAllLevelsElms = ( - items?: InteractiveSidebarItem[], + items?: Sidebar.InteractiveSidebarItem[], headerLevel = titleLevel ) => { return items?.map((item, key) => { @@ -405,8 +397,8 @@ export const useChildDocs = ({ {!searchQuery && ( <> {onlyTopLevel - ? getTopLevelElms(filteredItems?.default) - : getAllLevelsElms(filteredItems?.default)} + ? getTopLevelElms(filteredItems) + : getAllLevelsElms(filteredItems)} )} diff --git a/www/packages/docs-ui/src/layouts/main-content.tsx b/www/packages/docs-ui/src/layouts/main-content.tsx index b012949562..61b56d74a3 100644 --- a/www/packages/docs-ui/src/layouts/main-content.tsx +++ b/www/packages/docs-ui/src/layouts/main-content.tsx @@ -1,9 +1,8 @@ "use client" import React, { useEffect } from "react" -import { useSidebar } from "../providers/Sidebar" import clsx from "clsx" -import { MainNav, useIsBrowser, useLayout } from ".." +import { MainNav, useIsBrowser, useLayout, useSidebar } from ".." export type MainContentLayoutProps = { mainWrapperClasses?: string diff --git a/www/packages/docs-ui/src/providers/Pagination/index.tsx b/www/packages/docs-ui/src/providers/Pagination/index.tsx index 8788edbfc6..bdf409baa2 100644 --- a/www/packages/docs-ui/src/providers/Pagination/index.tsx +++ b/www/packages/docs-ui/src/providers/Pagination/index.tsx @@ -1,15 +1,10 @@ "use client" -import React, { - createContext, - useContext, - useEffect, - useMemo, - useState, -} from "react" -import { isSidebarItemLink, useSidebar } from "../Sidebar" +import React, { createContext, useContext, useEffect, useState } from "react" import { usePrevious } from "@uidotdev/usehooks" -import { InteractiveSidebarItem, SidebarItem } from "types" +import { useSidebar } from "../Sidebar" +import { isSidebarItemLink } from "../../utils/sidebar-utils" +import { Sidebar } from "types" export type Page = { title: string @@ -27,8 +22,8 @@ export const PaginationContext = createContext( null ) -type SidebarItemWithParent = InteractiveSidebarItem & { - parent?: SidebarItem +type SidebarItemWithParent = Sidebar.InteractiveSidebarItem & { + parent?: Sidebar.InteractiveSidebarItem } type SearchItemsResult = { @@ -42,14 +37,13 @@ export type PaginationProviderProps = { } export const PaginationProvider = ({ children }: PaginationProviderProps) => { - const { items, activePath } = useSidebar() - const combinedItems = useMemo(() => [...items.default], [items]) + const { shownSidebar, activePath } = useSidebar() const previousActivePath = usePrevious(activePath) const [nextPage, setNextPage] = useState() const [prevPage, setPrevPage] = useState() const getFirstChild = ( - item: InteractiveSidebarItem + item: Sidebar.InteractiveSidebarItem ): SidebarItemWithParent | undefined => { const children = getChildrenWithPages(item) if (!children?.length) { @@ -65,7 +59,7 @@ export const PaginationProvider = ({ children }: PaginationProviderProps) => { } const getChildrenWithPages = ( - item: InteractiveSidebarItem + item: Sidebar.InteractiveSidebarItem ): SidebarItemWithParent[] | undefined => { return item.children?.filter( (childItem) => @@ -76,7 +70,7 @@ export const PaginationProvider = ({ children }: PaginationProviderProps) => { } const getPrevItem = ( - items: SidebarItem[], + items: Sidebar.SidebarItem[], index: number ): SidebarItemWithParent | undefined => { let foundItem: SidebarItemWithParent | undefined @@ -106,7 +100,7 @@ export const PaginationProvider = ({ children }: PaginationProviderProps) => { } const getNextItem = ( - items: SidebarItem[], + items: Sidebar.SidebarItem[], index: number ): SidebarItemWithParent | undefined => { let foundItem: SidebarItemWithParent | undefined @@ -133,7 +127,9 @@ export const PaginationProvider = ({ children }: PaginationProviderProps) => { return foundItem } - const searchItems = (currentItems: SidebarItem[]): SearchItemsResult => { + const searchItems = ( + currentItems: Sidebar.SidebarItem[] + ): SearchItemsResult => { const result: SearchItemsResult = { foundActive: false, } @@ -182,7 +178,11 @@ export const PaginationProvider = ({ children }: PaginationProviderProps) => { useEffect(() => { if (activePath !== previousActivePath) { - const result = searchItems(combinedItems) + const sidebarItems = + shownSidebar && "items" in shownSidebar + ? shownSidebar.items + : shownSidebar?.children || [] + const result = searchItems(sidebarItems) setPrevPage( result.prevItem ? { @@ -190,10 +190,7 @@ export const PaginationProvider = ({ children }: PaginationProviderProps) => { link: isSidebarItemLink(result.prevItem) ? result.prevItem.path : "", - parentTitle: - result.prevItem.parent?.type !== "separator" - ? result.prevItem.parent?.title - : undefined, + parentTitle: result.prevItem.parent?.title, } : undefined ) @@ -204,10 +201,7 @@ export const PaginationProvider = ({ children }: PaginationProviderProps) => { link: isSidebarItemLink(result.nextItem) ? result.nextItem.path : "", - parentTitle: - result.nextItem.parent?.type !== "separator" - ? result.nextItem.parent?.title - : undefined, + parentTitle: result.nextItem?.parent?.title, } : undefined ) diff --git a/www/packages/docs-ui/src/providers/Sidebar/index.tsx b/www/packages/docs-ui/src/providers/Sidebar/index.tsx index bdc4d8a325..e91987a590 100644 --- a/www/packages/docs-ui/src/providers/Sidebar/index.tsx +++ b/www/packages/docs-ui/src/providers/Sidebar/index.tsx @@ -1,7 +1,6 @@ "use client" import React, { - ReactNode, createContext, useCallback, useContext, @@ -11,224 +10,180 @@ import React, { useRef, useState, } from "react" -import { usePathname, useRouter } from "next/navigation" -import { getScrolledTop } from "@/utils" +import { Sidebar } from "types" import { - SidebarItemSections, - SidebarItem, - SidebarSectionItems, - SidebarItemLink, - InteractiveSidebarItem, - SidebarItemCategory, - SidebarItemLinkWithParent, - InteractiveSidebarItemTypes, -} from "types" + areSidebarItemsEqual, + findSidebarItem, + getSidebarItemWithHistory, + isSidebarItemLink, +} from "../../utils/sidebar-utils" +import { useSiteConfig } from "../SiteConifg" import { useIsBrowser } from "../BrowserProvider" +import { getScrolledTop } from "../../utils" +import { usePathname, useRouter } from "next/navigation" -export type CurrentItemsState = SidebarSectionItems & { - previousSidebar?: CurrentItemsState +export type SidebarActionOptions = { + sidebar_id: string + /** + * When specified, the items are added as children of the parent item + */ + parent?: { + type: Sidebar.InteractiveSidebarItemTypes + path: string + title: string + /** + * Whether to change the loaded state of the parent item + */ + changeLoaded?: boolean + } + /** + * The position to insert the items at + */ + indexPosition?: number + /** + * If enabled, the items are filtered to not add items that already exist + */ + ignoreExisting?: boolean } export type SidebarStyleOptions = { + /** + * Useful for projects that have nested sidebars. + */ disableActiveTransition?: boolean } export type SidebarContextType = { - items: SidebarSectionItems - currentItems: CurrentItemsState | undefined + sidebars: Sidebar.Sidebar[] + /** + * The sidebar that is currently shown + */ + shownSidebar: Sidebar.Sidebar | Sidebar.SidebarItemSidebar | undefined activePath: string | null - activeItem: SidebarItemLinkWithParent | undefined + activeItem: Sidebar.SidebarItemLink | null setActivePath: (path: string | null) => void - isLinkActive: (item: SidebarItem, checkChildren?: boolean) => boolean - isChildrenActive: (item: SidebarItemCategory) => boolean - addItems: (items: SidebarItem[], options?: ActionOptionsType) => void - removeItems: (items: SidebarItem[]) => void - findItemInSection: ( - section: SidebarItem[], - item: Partial, - checkChildren?: boolean - ) => SidebarItem | undefined + /** + * Check if an item is active. This includes checking its child items, + * so for UI links that have children, the `checkLinkChildren` option should be set to `false` + * to ensure that the link isn't shown as active if a child link is active. + */ + isItemActive: (options: { + item: Sidebar.InteractiveSidebarItem + checkLinkChildren?: boolean + }) => boolean + addItems: ( + items: Sidebar.SidebarItem[], + options?: SidebarActionOptions + ) => void + removeItems: (options: { + items: Sidebar.SidebarItem[] + sidebar_id: string + }) => void mobileSidebarOpen: boolean setMobileSidebarOpen: React.Dispatch> desktopSidebarOpen: boolean setDesktopSidebarOpen: React.Dispatch> - staticSidebarItems?: boolean + // Whether the items in the sidebar are static or are added dynamically + // TODO look into generating the sidebar item of the API reference + isSidebarStatic: boolean + /** + * Whether the active path should change when the hash changes + * This is only used by the API reference + */ shouldHandleHashChange: boolean sidebarRef: React.RefObject + /** + * Go back in the sidebar history + */ goBack: () => void + /** + * The height of the top part of the sidebar + */ sidebarTopHeight: number setSidebarTopHeight: React.Dispatch> + /** + * Reset the sidebar to its initial state (the sidebars passed as a prop) + */ resetItems: () => void - isItemLoaded: (path: string) => boolean updatePersistedCategoryState: (title: string, opened: boolean) => void getPersistedCategoryState: (title: string) => boolean | undefined - persistState: boolean + persistCategoryState: boolean isSidebarShown: boolean + sidebarHistory: string[] + /** + * Get the first link child of a sidebar + */ + getSidebarFirstLinkChild: ( + sidebar: Sidebar.Sidebar | Sidebar.SidebarItemSidebar + ) => Sidebar.SidebarItemLink | undefined + getSidebar: ( + sidebar_id: string + ) => Sidebar.Sidebar | Sidebar.SidebarItemSidebar } & SidebarStyleOptions export const SidebarContext = createContext(null) -export type ActionOptionsType = { - section?: SidebarItemSections - parent?: { - type: InteractiveSidebarItemTypes - path: string - title: string - changeLoaded?: boolean - } - indexPosition?: number - ignoreExisting?: boolean -} - export type ActionType = | { type: "add" | "update" - items: SidebarItem[] - options?: ActionOptionsType + items: Sidebar.SidebarItem[] + options?: SidebarActionOptions } | { type: "replace" - replacementItems: SidebarSectionItems + sidebars: Sidebar.Sidebar[] } | { type: "remove" - items: SidebarItem[] + items: Sidebar.SidebarItem[] + sidebar_id: string } -type LinksMap = Map - -export const isSidebarItemLink = ( - item: SidebarItem | undefined, - checkRef = true -): item is SidebarItemLink => { - return ( - item !== undefined && - (item.type === "link" || (checkRef && item.type === "ref")) - ) -} - -const areItemsEqual = ( - itemA: SidebarItem, - itemB: SidebarItem, - compareTitles = true -): boolean => { - if ( - itemA.type === "separator" || - itemB.type === "separator" || - itemA.type !== itemB.type - ) { - return false - } - const hasSameTitle = !compareTitles || itemA.title === itemB.title - const hasSamePath = - !isSidebarItemLink(itemA) || - !isSidebarItemLink(itemB) || - itemA.path === itemB.path - - return hasSameTitle && hasSamePath -} - -const findItem = ( - section: SidebarItem[], - item: Partial, - checkChildren = true, - compareTitles = true -): SidebarItemLinkWithParent | undefined => { - let foundItem: SidebarItemLinkWithParent | undefined - section.some((i) => { - if (i.type === "separator") { - return false - } - if (areItemsEqual(item as SidebarItem, i, compareTitles)) { - foundItem = i as SidebarItemLink - } else if (checkChildren && i.children) { - foundItem = findItem(i.children, item, checkChildren, compareTitles) - if (foundItem && !foundItem.parentItem) { - foundItem.parentItem = i - } - } - - return foundItem !== undefined - }) - - return foundItem -} - -const getLinksMap = ( - items: SidebarItem[], - initMap?: LinksMap, - parentItem?: InteractiveSidebarItem -): LinksMap => { - const map: LinksMap = initMap || new Map() - - items.forEach((item) => { - if (item.type === "separator") { - return - } - - if (isSidebarItemLink(item)) { - map.set(item.path, { - ...item, - parentItem, - }) - } - if (item.children?.length) { - getLinksMap(item.children, map, item) - } - }) - - return map -} - export const reducer = ( - state: SidebarSectionItems, + state: Sidebar.Sidebar[], actionData: ActionType -): SidebarSectionItems => { +): Sidebar.Sidebar[] => { if (actionData.type === "replace") { - return actionData.replacementItems + return actionData.sidebars } if (actionData.type === "remove") { - return { - ...state, - default: state.default.filter((item) => { - if (item.type === "separator") { - return true + const { sidebar_id, items: itemsToRemove } = actionData + return state.map((sidebar) => { + if (sidebar.sidebar_id === sidebar_id) { + return { + ...sidebar, + items: sidebar.items.filter((item) => { + return !itemsToRemove.some((itemToRemove) => + areSidebarItemsEqual({ + itemA: item, + itemB: itemToRemove, + }) + ) + }), } - - const found = actionData.items.some((itemToRemove) => { - if ( - itemToRemove.type === "separator" || - itemToRemove.type !== item.type - ) { - return false - } - - if ( - itemToRemove.type === "category" || - itemToRemove.type === "sub-category" - ) { - return itemToRemove.title === item.title - } - - return ( - itemToRemove.path === (item as SidebarItemLink).path && - itemToRemove.title === (item as SidebarItemLink).title - ) - }) - - return !found - }), - } + } + return sidebar + }) } + const { type, options } = actionData let { items } = actionData const { parent, ignoreExisting = false, indexPosition } = options || {} - const sectionName = SidebarItemSections.DEFAULT - const sectionItems = state[sectionName] + const sidebarIndex = state.findIndex( + (s) => s.sidebar_id === options?.sidebar_id + ) + const sidebar = state[sidebarIndex] + + if (!sidebar) { + return state + } if (!ignoreExisting) { - items = items.filter((item) => !findItem(sectionItems, item)) + items = items.filter( + (item) => + findSidebarItem({ sidebarItems: sidebar.items, item }) === undefined + ) } if (!items.length) { @@ -237,114 +192,206 @@ export const reducer = ( switch (type) { case "add": - return { - ...state, - [sectionName]: - indexPosition !== undefined - ? [ - ...sectionItems.slice(0, indexPosition), - ...items, - ...sectionItems.slice(indexPosition), - ] - : [...sectionItems, ...items], - } + return [ + ...state.slice(0, sidebarIndex), + { + ...sidebar, + items: + indexPosition !== undefined + ? [ + ...sidebar.items.slice(0, indexPosition), + ...items, + ...sidebar.items.slice(indexPosition), + ] + : [...sidebar.items, ...items], + }, + ...state.slice(sidebarIndex + 1), + ] case "update": // find item index - return { - ...state, - [sectionName]: sectionItems.map((i) => { - if (i.type === "separator") { - return i - } - if (parent && areItemsEqual(i, parent as SidebarItem)) { - return { - ...i, - children: - indexPosition !== undefined - ? [ - ...(i.children?.slice(0, indexPosition) || []), - ...items, - ...(i.children?.slice(indexPosition) || []), - ] - : [...(i.children || []), ...items], - loaded: parent.changeLoaded - ? true - : isSidebarItemLink(i) - ? i.loaded - : true, + return [ + ...state.slice(0, sidebarIndex), + { + ...sidebar, + items: sidebar.items.map((i) => { + if (i.type === "separator") { + return i } - } - return i - }), - } + if ( + parent && + areSidebarItemsEqual({ + itemA: i, + itemB: parent as Sidebar.InteractiveSidebarItem, + }) + ) { + return { + ...i, + children: + indexPosition !== undefined + ? [ + ...(i.children?.slice(0, indexPosition) || []), + ...items, + ...(i.children?.slice(indexPosition) || []), + ] + : [...(i.children || []), ...items], + loaded: parent.changeLoaded + ? true + : isSidebarItemLink(i) + ? i.loaded + : true, + } + } + return i + }), + }, + ...state.slice(sidebarIndex + 1), + ] default: return state } } export type SidebarProviderProps = { - children?: ReactNode + children?: React.ReactNode isLoading?: boolean setIsLoading?: React.Dispatch> - initialItems?: SidebarSectionItems + sidebars: Sidebar.Sidebar[] shouldHandleHashChange?: boolean shouldHandlePathChange?: boolean scrollableElement?: Element | Window - staticSidebarItems?: boolean - resetOnCondition?: () => boolean - projectName: string - persistState?: boolean + isSidebarStatic?: boolean + persistCategoryState?: boolean + disableActiveTransition?: boolean } & SidebarStyleOptions export const SidebarProvider = ({ children, - isLoading = false, + isLoading, setIsLoading, - initialItems, + sidebars: initialSidebars = [], shouldHandleHashChange = false, - shouldHandlePathChange = false, + shouldHandlePathChange = true, scrollableElement, - staticSidebarItems = false, - disableActiveTransition = false, - resetOnCondition, - projectName, - persistState = true, + isSidebarStatic = true, + persistCategoryState = true, + disableActiveTransition = true, }: SidebarProviderProps) => { - const categoriesStorageKey = `${projectName}_categories` + const { + config: { project }, + } = useSiteConfig() + const categoriesStorageKey = `${project.title}_categories` const hideSidebarStorageKey = `hide_sidebar` - const [items, dispatch] = useReducer(reducer, { - default: initialItems?.default || [], - mobile: initialItems?.mobile || [], - }) - const [currentItems, setCurrentItems] = useState< - CurrentItemsState | undefined - >() + const [sidebars, dispatch] = useReducer(reducer, initialSidebars) const [activePath, setActivePath] = useState("") - const linksMap: LinksMap = useMemo(() => { - return new Map([ - ...getLinksMap(items.mobile), - ...getLinksMap(items.default), - ]) - }, [items]) - const findItemInSection = useCallback(findItem, []) - const activeItem = useMemo(() => { - if (activePath === null) { - return undefined - } - - return linksMap.get(activePath) - }, [activePath, linksMap]) const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false) - const [sidebarTopHeight, setSidebarTopHeight] = useState(0) const [desktopSidebarOpen, setDesktopSidebarOpen] = useState(true) const sidebarRef = useRef(null) + const [sidebarTopHeight, setSidebarTopHeight] = useState(0) const pathname = usePathname() const router = useRouter() const { isBrowser } = useIsBrowser() - const getResolvedScrollableElement = useCallback(() => { + + const resolvedScrollableElement = useMemo(() => { + if (!isBrowser) { + return + } + return scrollableElement || window - }, [scrollableElement]) + }, [scrollableElement, isBrowser]) + + const activeMainSidebar = useMemo(() => { + if (!activePath) { + // set first sidebar as active + return sidebars[0] + } + return ( + sidebars.find( + (s) => + findSidebarItem({ + sidebarItems: s.items, + item: { type: "link", path: activePath, title: "" }, + }) !== undefined + ) || sidebars[0] + ) + }, [sidebars, activePath]) + + const { activeItem, sidebarHistory } = useMemo(() => { + if (!activePath) { + return { + activeItem: null, + sidebarHistory: [] as string[], + } + } + const result = + getSidebarItemWithHistory({ + sidebarItems: activeMainSidebar.items, + item: { type: "link", path: activePath, title: "" }, + compareTitles: false, + }) || null + + return { + ...result, + sidebarHistory: [ + activeMainSidebar.sidebar_id, + ...(result.sidebarHistory || []), + ], + activeItem: (result.item as Sidebar.SidebarItemLink) || null, + } + }, [activePath, activeMainSidebar]) + + const getSidebar = useCallback( + (sidebar_id: string) => { + return ( + sidebars.find((s) => s.sidebar_id === sidebar_id) || + (findSidebarItem({ + sidebarItems: activeMainSidebar.items || [], + item: { type: "sidebar", sidebar_id, title: "" }, + compareTitles: false, + }) as Sidebar.SidebarItemSidebar) + ) + }, + [sidebars, activeMainSidebar] + ) + + const shownSidebar = useMemo(() => { + if (!sidebarHistory.length) { + return + } + + return getSidebar(sidebarHistory[sidebarHistory.length - 1]) + }, [activeMainSidebar, sidebarHistory, getSidebar]) + + const isItemActive: SidebarContextType["isItemActive"] = useCallback( + ({ item, checkLinkChildren = true }): boolean => { + if (!activePath) { + return false + } + + if (isSidebarItemLink(item)) { + if (item.path === activePath) { + return true + } else if (!checkLinkChildren) { + return false + } + } + + return ( + item.children?.some((child) => { + if (child.type === "separator") { + return false + } + + return isItemActive({ + item: child as Sidebar.InteractiveSidebarItem, + checkLinkChildren, + }) + }) || false + ) + }, + [activePath] + ) + const isSidebarShown = useMemo(() => { if (!isBrowser) { return true @@ -353,16 +400,10 @@ export const SidebarProvider = ({ return document.getElementsByTagName("aside").length > 0 }, [isBrowser]) - const isItemLoaded = useCallback( - (path: string) => { - const item = linksMap.get(path) - - return item?.loaded || false - }, - [items, linksMap] - ) - - const addItems = (newItems: SidebarItem[], options?: ActionOptionsType) => { + const addItems = ( + newItems: Sidebar.SidebarItem[], + options?: SidebarActionOptions + ) => { dispatch({ type: options?.parent ? "update" : "add", items: newItems, @@ -370,123 +411,39 @@ export const SidebarProvider = ({ }) } - const removeItems = (itemsToRemove: SidebarItem[]) => { + const removeItems = ({ + items, + sidebar_id, + }: { + items: Sidebar.SidebarItem[] + sidebar_id: string + }) => { dispatch({ type: "remove", - items: itemsToRemove, + items, + sidebar_id, }) } - const isLinkActive = useCallback( - (item: SidebarItem, checkChildren = false, checkRef = true): boolean => { - if (!isSidebarItemLink(item, checkRef)) { - return false - } - - return ( - item.path === activePath || - (checkChildren && activePath?.split("_")[0] === item.path) - ) - }, - [activePath] - ) - - const isChildrenActive = useCallback( - (item: InteractiveSidebarItem): boolean => { - return ( - item.children?.some((child) => { - if (isLinkActive(child, true)) { - return true - } - - return child.type !== "separator" && child.children - ? isChildrenActive(child) - : false - }) || false - ) - }, - [isLinkActive] - ) - - const init = () => { - const currentPath = location.hash.replace("#", "") - if (currentPath) { - setActivePath(currentPath) - } - } - - const getCurrentSidebar = useCallback( - (searchItems: SidebarItem[]): InteractiveSidebarItem | undefined => { - let currentSidebar: InteractiveSidebarItem | undefined - searchItems.some((item) => { - if (item.type === "separator") { - return false - } - if (item.isChildSidebar && isLinkActive(item, false, false)) { - currentSidebar = item - return true - } - if (!item.children?.length) { - return false - } - - const childSidebar = - getCurrentSidebar(item.children) || - (activePath - ? findItem( - item.children, - { - path: activePath, - type: "link", - }, - true, - false - ) - : undefined) - - currentSidebar = childSidebar - ? childSidebar.isChildSidebar - ? childSidebar - : item - : undefined - - return currentSidebar !== undefined - }) - - return currentSidebar - }, - [isLinkActive, activePath] - ) - - const goBack = () => { - if (!currentItems) { - return - } - - const previousSidebar = currentItems.previousSidebar || items - - const backItem = previousSidebar.default.find( - (item) => isSidebarItemLink(item) && !item.isChildSidebar - ) as SidebarItemLink - - if (!backItem) { - return - } - - setActivePath(backItem.path!) - setCurrentItems(previousSidebar) - router.replace(backItem.path!) - } - const resetItems = useCallback(() => { dispatch({ type: "replace", - replacementItems: { - default: initialItems?.default || [], - mobile: initialItems?.mobile || [], - }, + sidebars: initialSidebars, }) - }, [initialItems]) + }, [initialSidebars]) + + const init = () => { + const currentPath = location.hash.replace("#", "") + if (currentPath) { + setActivePath(currentPath) + } else { + const firstChild = getFirstLinkChild(activeMainSidebar.items) + + if (firstChild) { + setActivePath(firstChild.path) + } + } + } useEffect(() => { if (shouldHandleHashChange) { @@ -495,21 +452,17 @@ export const SidebarProvider = ({ }, [shouldHandleHashChange]) useEffect(() => { - if (!shouldHandleHashChange) { + if (!shouldHandleHashChange || !resolvedScrollableElement) { return } - const resolvedScrollableElement = getResolvedScrollableElement() - const handleScroll = () => { if (getScrolledTop(resolvedScrollableElement) === 0) { - const firstItemPath = - items.default.length && isSidebarItemLink(items.default[0]) - ? items.default[0].path - : "" - setActivePath(firstItemPath) - if (firstItemPath) { - router.push(`#${firstItemPath}`, { + const firstChild = getFirstLinkChild(activeMainSidebar.items) + + if (firstChild) { + setActivePath(firstChild.path) + router.push(`#${firstChild.path}`, { scroll: false, }) } @@ -521,7 +474,7 @@ export const SidebarProvider = ({ return () => { resolvedScrollableElement.removeEventListener("scroll", handleScroll) } - }, [shouldHandleHashChange, getResolvedScrollableElement]) + }, [shouldHandleHashChange, resolvedScrollableElement]) useEffect(() => { if (!shouldHandleHashChange || !isBrowser) { @@ -544,10 +497,10 @@ export const SidebarProvider = ({ }, [shouldHandleHashChange, isBrowser]) useEffect(() => { - if (isLoading && items.default.length) { + if (isLoading && sidebars.length) { setIsLoading?.(false) } - }, [items, isLoading, setIsLoading]) + }, [sidebars, isLoading, setIsLoading]) useEffect(() => { if (!shouldHandlePathChange) { @@ -559,47 +512,6 @@ export const SidebarProvider = ({ } }, [shouldHandlePathChange, pathname]) - useEffect(() => { - if (!activePath?.length) { - setCurrentItems(undefined) - return - } - - const currentSidebar = getCurrentSidebar(items.default) - - if (!currentSidebar) { - setCurrentItems(undefined) - return - } - - if ( - currentSidebar.isChildSidebar && - currentSidebar.children && - (!currentItems?.parentItem || - !areItemsEqual(currentItems?.parentItem, currentSidebar)) - ) { - const { children, ...parentItem } = currentSidebar - const hasPreviousSidebar = - isSidebarItemLink(currentItems?.previousSidebar?.parentItem) && - isSidebarItemLink(parentItem) && - currentItems.previousSidebar.parentItem.path !== parentItem.path - - setCurrentItems({ - default: children, - mobile: items.mobile, - parentItem: parentItem, - previousSidebar: hasPreviousSidebar ? currentItems : undefined, - }) - } - }, [getCurrentSidebar, activePath]) - - useEffect(() => { - if (resetOnCondition?.()) { - resetItems() - setActivePath(null) - } - }, [resetOnCondition, resetItems]) - useEffect(() => { if (!isBrowser) { return @@ -627,12 +539,12 @@ export const SidebarProvider = ({ const storageData = JSON.parse( localStorage.getItem(categoriesStorageKey) || "{}" ) - if (!Object.hasOwn(storageData, projectName)) { - storageData[projectName] = {} + if (!Object.hasOwn(storageData, project.title)) { + storageData[project.title] = {} } - storageData[projectName] = { - ...storageData[projectName], + storageData[project.title] = { + ...storageData[project.title], [title]: opened, } @@ -644,42 +556,98 @@ export const SidebarProvider = ({ localStorage.getItem(categoriesStorageKey) || "{}" ) - return !Object.hasOwn(storageData, projectName) || - !Object.hasOwn(storageData[projectName], title) + return !Object.hasOwn(storageData, project.title) || + !Object.hasOwn(storageData[project.title], title) ? undefined - : storageData[projectName][title] + : storageData[project.title][title] + } + + const getFirstLinkChild = useCallback( + (items: Sidebar.SidebarItem[]): Sidebar.SidebarItemLink | undefined => { + let foundItem: Sidebar.SidebarItemLink | undefined + items.some((item) => { + if (item.type === "link") { + foundItem = item + } else if ("children" in item && item.children) { + foundItem = getFirstLinkChild(item.children) + } + + return foundItem !== undefined + }) + + return foundItem + }, + [] + ) + + const getSidebarFirstLinkChild = useCallback( + ( + sidebar: Sidebar.Sidebar | Sidebar.SidebarItemSidebar + ): Sidebar.SidebarItemLink | undefined => { + const itemsToSearch = + "items" in sidebar ? sidebar.items : sidebar.children || [] + + return getFirstLinkChild(itemsToSearch) + }, + [getFirstLinkChild] + ) + + const openSidebar = (sidebar_id: string) => { + const sidebar = getSidebar(sidebar_id) + if (!sidebar) { + return + } + + const firstChild = getSidebarFirstLinkChild(sidebar) + + if (firstChild) { + setActivePath(firstChild.path) + router.replace( + firstChild.isPathHref ? firstChild.path : `#${firstChild.path}` + ) + } + } + + const goBack = () => { + if (!sidebarHistory || sidebarHistory.length <= 1) { + openSidebar(activeMainSidebar.sidebar_id) + } else { + const lastSidebar = sidebarHistory[sidebarHistory.length - 2] + + openSidebar(lastSidebar) + } } return ( {children} diff --git a/www/packages/docs-ui/src/providers/SiteConifg/index.tsx b/www/packages/docs-ui/src/providers/SiteConifg/index.tsx index 6ec5aa9777..f9e08a4967 100644 --- a/www/packages/docs-ui/src/providers/SiteConifg/index.tsx +++ b/www/packages/docs-ui/src/providers/SiteConifg/index.tsx @@ -25,17 +25,11 @@ export const SiteConfigProvider = ({ Object.assign( { baseUrl: "", - sidebar: { - default: [], - mobile: [], - }, + sidebars: [], project: { title: "", key: "", }, - breadcrumbOptions: { - showCategories: true, - }, reportIssueLink: GITHUB_ISSUES_LINK, logo: "", }, diff --git a/www/packages/docs-ui/src/utils/get-local-search.ts b/www/packages/docs-ui/src/utils/get-local-search.ts index 00c753f524..0deb0dec17 100644 --- a/www/packages/docs-ui/src/utils/get-local-search.ts +++ b/www/packages/docs-ui/src/utils/get-local-search.ts @@ -21,12 +21,16 @@ export const getLocalSearch = ({ docs, searchableFields, options, -}: GetLocalSearchInput): LocalSearch => { - const miniSearch = new MiniSearch({ - fields: searchableFields, - ...options, - }) - miniSearch.addAll(docs) +}: GetLocalSearchInput): LocalSearch | undefined => { + try { + const miniSearch = new MiniSearch({ + fields: searchableFields, + ...options, + }) + miniSearch.addAll(docs) - return miniSearch as LocalSearch + return miniSearch as LocalSearch + } catch (e) { + console.warn(e) + } } diff --git a/www/packages/docs-ui/src/utils/index.ts b/www/packages/docs-ui/src/utils/index.ts index 54988860ad..a946dda6b8 100644 --- a/www/packages/docs-ui/src/utils/index.ts +++ b/www/packages/docs-ui/src/utils/index.ts @@ -12,6 +12,6 @@ export * from "./is-elm-window" export * from "./is-in-view" export * from "./learning-paths" export * from "./set-obj-value" -export * from "./sidebar-attach-href-common-options" +export * from "./sidebar-utils" export * from "./swr-fetcher" export * from "./workflow-diagram-utils" diff --git a/www/packages/docs-ui/src/utils/sidebar-attach-href-common-options.ts b/www/packages/docs-ui/src/utils/sidebar-attach-href-common-options.ts deleted file mode 100644 index bb44f8b048..0000000000 --- a/www/packages/docs-ui/src/utils/sidebar-attach-href-common-options.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { RawSidebarItem } from "types" - -const commonOptions: Partial = { - loaded: true, - isPathHref: true, -} - -export function sidebarAttachHrefCommonOptions( - sidebar: RawSidebarItem[] -): RawSidebarItem[] { - return sidebar.map((item) => { - if (item.type === "separator") { - return item - } - - return { - ...commonOptions, - ...item, - children: sidebarAttachHrefCommonOptions(item.children || []), - } - }) -} diff --git a/www/packages/docs-ui/src/utils/sidebar-utils.ts b/www/packages/docs-ui/src/utils/sidebar-utils.ts new file mode 100644 index 0000000000..f98e0c7442 --- /dev/null +++ b/www/packages/docs-ui/src/utils/sidebar-utils.ts @@ -0,0 +1,129 @@ +import { Sidebar } from "types" + +export const isSidebarItemLink = ( + item: Sidebar.SidebarItem | undefined, + options?: { + checkRef?: boolean + checkExternal?: boolean + } +): item is Sidebar.SidebarItemLink => { + const { checkRef = true, checkExternal = true } = options || {} + + return ( + item !== undefined && + (item.type === "link" || + (checkRef && item.type === "ref") || + (checkExternal && item.type === "external")) + ) +} + +export const areSidebarItemsEqual = ({ + itemA, + itemB, + compareTitles = true, +}: { + itemA: Sidebar.SidebarItem + itemB: Sidebar.SidebarItem + compareTitles?: boolean +}): boolean => { + if (itemA.type !== itemB.type) { + return false + } + // after this, we know that itemA and itemB have the same type + switch (itemA.type) { + case "separator": + return true + case "sidebar": + return ( + itemA.sidebar_id === (itemB as Sidebar.SidebarItemSidebar).sidebar_id + ) + case "category": + case "sub-category": + return compareTitles + ? itemA.title === (itemB as Sidebar.SidebarItemCategory).title + : false + case "link": + case "ref": + case "external": { + const hasSameTitle = + !compareTitles || + itemA.title === (itemB as Sidebar.SidebarItemLink).title + const hasSamePath = itemA.path === (itemB as Sidebar.SidebarItemLink).path + + return hasSameTitle && hasSamePath + } + } +} + +export const findSidebarItem = ({ + sidebarItems, + item, + checkChildren = true, + compareTitles = true, +}: { + sidebarItems: Sidebar.SidebarItem[] + item: Sidebar.SidebarItem + checkChildren?: boolean + compareTitles?: boolean +}): Sidebar.SidebarItem | undefined => { + let foundItem: Sidebar.SidebarItem | undefined + sidebarItems.some((i) => { + if (areSidebarItemsEqual({ itemA: i, itemB: item })) { + foundItem = i + } else if (checkChildren && "children" in i && i.children) { + foundItem = findSidebarItem({ + sidebarItems: i.children, + item, + checkChildren, + compareTitles, + }) + } + + return foundItem !== undefined + }) + + return foundItem +} + +export const getSidebarItemWithHistory = ({ + sidebarItems, + item, + sidebarHistory = [], + checkChildren = true, + compareTitles = true, +}: { + sidebarItems: Sidebar.SidebarItem[] + item: Sidebar.SidebarItem + sidebarHistory?: string[] + checkChildren?: boolean + compareTitles?: boolean +}): { + item: Sidebar.SidebarItem | undefined + sidebarHistory: string[] +} => { + let foundItem: Sidebar.SidebarItem | undefined + sidebarItems.some((i) => { + if (areSidebarItemsEqual({ itemA: i, itemB: item, compareTitles })) { + foundItem = i + } else if (checkChildren && "children" in i && i.children) { + const result = getSidebarItemWithHistory({ + sidebarItems: i.children, + item, + checkChildren, + compareTitles, + }) + + if (result.item) { + foundItem = result.item + if (i.type === "sidebar") { + sidebarHistory.push(i.sidebar_id) + } + sidebarHistory.push(...result.sidebarHistory) + } + } + + return foundItem !== undefined + }) + + return { item: foundItem, sidebarHistory } +} diff --git a/www/packages/remark-rehype-plugins/src/page-number.ts b/www/packages/remark-rehype-plugins/src/page-number.ts index 32c5b77a36..56acb32cc3 100644 --- a/www/packages/remark-rehype-plugins/src/page-number.ts +++ b/www/packages/remark-rehype-plugins/src/page-number.ts @@ -1,12 +1,11 @@ import path from "path" import type { Transformer } from "unified" -import type { RawSidebarItem } from "types" -import type { UnistTree } from "types" +import type { Sidebar, UnistTree } from "types" export function pageNumberRehypePlugin({ sidebar, }: { - sidebar: RawSidebarItem[] + sidebar: Sidebar.RawSidebarItem[] }): Transformer { return async (tree, file) => { const { valueToEstree } = await import("estree-util-value-to-estree") @@ -66,9 +65,9 @@ export function pageNumberRehypePlugin({ } function findSidebarItem( - sidebar: RawSidebarItem[], + sidebar: Sidebar.RawSidebarItem[], path: string -): RawSidebarItem | undefined { +): Sidebar.RawSidebarItem | undefined { let foundItem = undefined for (const item of sidebar) { if (item.type === "separator") { diff --git a/www/packages/tags/src/tags/index.ts b/www/packages/tags/src/tags/index.ts index 795cd782f3..a525f6e220 100644 --- a/www/packages/tags/src/tags/index.ts +++ b/www/packages/tags/src/tags/index.ts @@ -2,39 +2,39 @@ export * from "./user-guide.js" export * from "./fulfillment.js" export * from "./payment.js" export * from "./pricing.js" -export * from "./product.js" export * from "./promotion.js" -export * from "./user.js" +export * from "./product.js" export * from "./auth.js" export * from "./api-key.js" export * from "./workflow.js" export * from "./stock-location.js" -export * from "./sales-channel.js" export * from "./region.js" +export * from "./sales-channel.js" +export * from "./user.js" export * from "./store.js" export * from "./currency.js" -export * from "./concept.js" -export * from "./tax.js" -export * from "./query.js" -export * from "./order.js" -export * from "./inventory.js" -export * from "./stripe.js" export * from "./customer.js" -export * from "./checkout.js" +export * from "./inventory.js" +export * from "./cart.js" +export * from "./server.js" +export * from "./query.js" +export * from "./concept.js" export * from "./example.js" -export * from "./product-collection.js" export * from "./publishable-api-key.js" -export * from "./link.js" +export * from "./checkout.js" +export * from "./product-collection.js" export * from "./step.js" export * from "./product-category.js" -export * from "./locking.js" -export * from "./event-bus.js" +export * from "./link.js" export * from "./remote-query.js" -export * from "./logger.js" -export * from "./js-sdk.js" +export * from "./locking.js" export * from "./file.js" +export * from "./js-sdk.js" +export * from "./event-bus.js" export * from "./admin.js" -export * from "./notification.js" -export * from "./cart.js" export * from "./storefront.js" -export * from "./server.js" +export * from "./logger.js" +export * from "./tax.js" +export * from "./notification.js" +export * from "./stripe.js" +export * from "./order.js" diff --git a/www/packages/types/src/config.ts b/www/packages/types/src/config.ts index 106138b45a..78961ab130 100644 --- a/www/packages/types/src/config.ts +++ b/www/packages/types/src/config.ts @@ -1,14 +1,17 @@ -import { SidebarSectionItems } from "./sidebar.js" +import { Sidebar } from "./index.js" export type BreadcrumbOptions = { - showCategories?: boolean + startItems?: { + title: string + link: string + }[] } export declare type DocsConfig = { titleSuffix?: string baseUrl: string basePath?: string - sidebar: SidebarSectionItems + sidebars: Sidebar.Sidebar[] filesBasePath?: string useNextLinks?: boolean project: { diff --git a/www/packages/types/src/index.ts b/www/packages/types/src/index.ts index b9984408b2..0e8dc05ae9 100644 --- a/www/packages/types/src/index.ts +++ b/www/packages/types/src/index.ts @@ -7,7 +7,7 @@ export * from "./menu.js" export * from "./navigation.js" export * from "./remark-rehype.js" export * from "./navigation-dropdown.js" -export * from "./sidebar.js" +export * as Sidebar from "./sidebar.js" export * from "./tags.js" export * from "./toc.js" export * from "./ui.js" diff --git a/www/packages/types/src/sidebar.ts b/www/packages/types/src/sidebar.ts index ed61ead939..948354be35 100644 --- a/www/packages/types/src/sidebar.ts +++ b/www/packages/types/src/sidebar.ts @@ -1,17 +1,16 @@ -export enum SidebarItemSections { - DEFAULT = "default", - MOBILE = "mobile", +export type Sidebar = { + sidebar_id: string + title: string + items: SidebarItem[] } export type SidebarItemCommon = { title: string children?: SidebarItem[] - isChildSidebar?: boolean - hasTitleStyling?: boolean - childSidebarTitle?: string loaded?: boolean additionalElms?: React.ReactNode chapterTitle?: string + childSidebarTitle?: string hideChildren?: boolean // generated by scripts number?: string @@ -25,6 +24,7 @@ export type InteractiveSidebarItemTypes = | "link" | "ref" | "external" + | "sidebar" export type SidebarItemLink = SidebarItemCommon & { type: "link" | "ref" | "external" @@ -34,6 +34,11 @@ export type SidebarItemLink = SidebarItemCommon & { childrenSameLevel?: boolean } +export type SidebarItemSidebar = SidebarItemCommon & { + type: "sidebar" + sidebar_id: string +} + export type SidebarItemCategory = SidebarItemCommon & { type: "category" onOpen?: () => void @@ -54,6 +59,7 @@ export type InteractiveSidebarItem = | SidebarItemLink | SidebarItemCategory | SidebarItemSubCategory + | SidebarItemSidebar export type SidebarItemLinkWithParent = SidebarItemLink & { parentItem?: InteractiveSidebarItem @@ -61,12 +67,6 @@ export type SidebarItemLinkWithParent = SidebarItemLink & { export type SidebarItem = InteractiveSidebarItem | SidebarItemSeparator -export type SidebarSectionItems = { - [k in SidebarItemSections]: SidebarItem[] -} & { - parentItem?: InteractiveSidebarItem -} - export type SidebarSortType = "none" | "alphabetize" export type RawSidebarItem = SidebarItem & { @@ -86,8 +86,17 @@ export type RawSidebarItem = SidebarItem & { } ) +export type RawSidebar = Omit & { + items: RawSidebarItem[] +} + export type PersistedSidebarCategoryState = { [k: string]: { [k: string]: boolean } } + +// export type SidebarHeirarchyItem = { +// title: string +// path?: string +// } diff --git a/www/yarn.lock b/www/yarn.lock index 6ec3d12337..d322c86d76 100644 --- a/www/yarn.lock +++ b/www/yarn.lock @@ -1639,6 +1639,15 @@ __metadata: languageName: node linkType: hard +"@medusajs/icons@npm:2.6.0": + version: 2.6.0 + resolution: "@medusajs/icons@npm:2.6.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + checksum: cb8628018398aba010bb7b1f653cb7dc91d9bd59a40f1e7ee4cdc7732559e75062db790fb609fd3f748a9b80ccc0f421267a414ed9f5a7a4e079ef643e65333e + languageName: node + linkType: hard + "@medusajs/icons@npm:^2.5.1, @medusajs/icons@npm:~2.5.1": version: 2.5.1 resolution: "@medusajs/icons@npm:2.5.1" @@ -1648,6 +1657,18 @@ __metadata: languageName: node linkType: hard +"@medusajs/ui-preset@npm:2.6.0": + version: 2.6.0 + resolution: "@medusajs/ui-preset@npm:2.6.0" + dependencies: + "@tailwindcss/forms": ^0.5.3 + tailwindcss-animate: ^1.0.6 + peerDependencies: + tailwindcss: ">=3.0.0" + checksum: 8ea576d2f2f8b2805c943b28636800c8d950b4df3e3fe785476dbeceb04735d4ce618cf9acdf34dca0ec0c2fec2334d522bdeca24e535ceed065bab961617114 + languageName: node + linkType: hard + "@medusajs/ui-preset@npm:~2.5.1": version: 2.5.1 resolution: "@medusajs/ui-preset@npm:2.5.1" @@ -1660,7 +1681,7 @@ __metadata: languageName: node linkType: hard -"@medusajs/ui@npm:~4.0.6": +"@medusajs/ui@npm:4.0.6, @medusajs/ui@npm:~4.0.6": version: 4.0.6 resolution: "@medusajs/ui@npm:4.0.6" dependencies: @@ -7508,8 +7529,8 @@ __metadata: resolution: "docs-ui@workspace:packages/docs-ui" dependencies: "@emotion/is-prop-valid": ^1.3.1 - "@medusajs/icons": ~2.5.1 - "@medusajs/ui": ~4.0.6 + "@medusajs/icons": 2.6.0 + "@medusajs/ui": 4.0.6 "@next/third-parties": 15.0.4 "@octokit/request": ^8.1.1 "@react-hook/resize-observer": ^1.2.6 @@ -14819,7 +14840,7 @@ __metadata: version: 0.0.0-use.local resolution: "tailwind@workspace:packages/tailwind" dependencies: - "@medusajs/ui-preset": ~2.5.1 + "@medusajs/ui-preset": 2.6.0 tailwindcss-animate: ^1.0.7 peerDependencies: docs-ui: "*" @@ -15376,7 +15397,7 @@ turbo@latest: version: 0.0.0-use.local resolution: "types@workspace:packages/types" dependencies: - "@medusajs/icons": ~2.5.1 + "@medusajs/icons": 2.6.0 "@types/node": ^20.11.20 rimraf: ^5.0.5 tsconfig: "*"