diff --git a/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx b/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx new file mode 100644 index 0000000000..ff7c657d3e --- /dev/null +++ b/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx @@ -0,0 +1,415 @@ +--- +tags: + - inventory + - product + - stock location + - concept +--- + +export const metadata = { + title: `Inventory Kits`, +} + +# {metadata.title} + +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. + +## What is an Inventory Kit? + +An inventory kit is a collection of inventory items that are linked to a single product variant. These inventory items can be used to represent different parts of a product, or to represent a bundle of products. + +The Medusa application links inventory items from the [Inventory Module](../page.mdx) to product variants in the [Product Module](../../product/page.mdx). Each variant can have multiple inventory items, and these inventory items can be re-used or shared across variants. + +Using inventory kits, you can implement use cases like: + +- [Multi-part products](#multi-part-products): A product that consists of multiple parts, each with its own inventory item. +- [Bundled products](#bundled-products): A product that is sold as a bundle, where each variant in the bundle product can re-use the inventory items of another product that should be sold as part of the bundle. + +--- + +## Multi-Part Products + +Consider your store sells bicycles that consist of a frame, wheels, and seats, and you want to manage the inventory of these parts separately. + +To implement this in Medusa, you can: + +- Create inventory items for each of the different parts. +- For each bicycle product, add a variant whose inventory kit consists of the inventory items of each of the parts. + +Then, whenever a customer purchases a bicycle, the inventory of each part is updated accordingly. You can also use the `required_quantity` of the variant's inventory items to set how much quantity is consumed of the part's inventory when a bicycle is sold. For example, the bicycle's wheels require 2 wheels inventory items to be sold when a bicycle is sold. + +![Diagram showcasing how a variant is linked to multi-part inventory items](https://res.cloudinary.com/dza7lstvk/image/upload/v1736414257/Medusa%20Resources/multi-part-product_kepbnx.jpg) + +### Create Multi-Part Product + +Using the Medusa Admin, you can create a multi-part product by creating its inventory items first, then assigning these inventory items to the product's variant(s). + +Using [workflows](!docs!/learn/fundamentals/workflows), you can implement this by first creating the inventory items: + +export const multiPartsHighlights1 = [ + ["11", "stockLocations", "Retrieve the stock locations to create the inventory items in."], + ["19", "inventoryItems", "Create the inventory items."] +] + +```ts highlights={multiPartsHighlights1} +import { + createInventoryItemsWorkflow, + useQueryGraphStep +} from "@medusajs/medusa/core-flows" +import { createWorkflow } from "@medusajs/framework/workflows-sdk" + +export const createMultiPartProductsWorkflow = createWorkflow( + "create-multi-part-products", + () => { + // Alternatively, you can create a stock location + const { data: stockLocations } = useQueryGraphStep({ + entity: "stock_location", + fields: ["*"], + filters: { + name: "European Warehouse" + } + }) + + const inventoryItems = createInventoryItemsWorkflow.runAsStep({ + input: { + items: [ + { + sku: "FRAME", + title: "Frame", + location_levels: [ + { + stocked_quantity: 100, + location_id: stockLocations[0].id + } + ] + }, + { + sku: "WHEEL", + title: "Wheel", + location_levels: [ + { + stocked_quantity: 100, + location_id: stockLocations[0].id + } + ] + }, + { + sku: "SEAT", + title: "Seat", + location_levels: [ + { + stocked_quantity: 100, + location_id: stockLocations[0].id + } + ] + } + ] + } + }) + + // TODO create the product + } +) +``` + +You start by retrieving the stock location to create the inventory items in. Alternatively, you can [create a stock location](/references/medusa-workflows/createStockLocationsWorkflow). + +Then, you create the inventory items that the product variant consists of. + +Next, create the product and pass the inventory item's IDs to the product's variant: + +export const multiPartHighlights2 = [ + ["15", "inventoryItemIds", "Create an array of inventory items to pass to the variant."], + ["26", "products", "Create the product with the inventory items."], + ["43", "inventoryItemIds", "Pass the inventory item IDs as the product variant's inventory items."] +] + +```ts highlights={multiPartHighlights2} +import { + // ... + transform +} from "@medusajs/framework/workflows-sdk" +import { + // ... + createProductsWorkflow +} from "@medusajs/medusa/core-flows" + +export const createMultiPartProductsWorkflow = createWorkflow( + "create-multi-part-products", + () => { + // ... + + const inventoryItemIds = transform({ + inventoryItems + }, (data) => { + return data.inventoryItems.map((inventoryItem) => { + return { + inventory_item_id: inventoryItem.id, + // can also specify required_quantity + } + }) + }) + + const products = createProductsWorkflow.runAsStep({ + input: { + products: [ + { + title: "Bicycle", + variants: [ + { + title: "Bicycle - Small", + prices: [ + { + amount: 100, + currency_code: "usd" + } + ], + options: { + "Default Option": "Default Variant" + }, + inventory_items: inventoryItemIds + } + ], + options: [ + { + title: "Default Option", + values: ["Default Variant"] + } + ] + } + ] + } + }) + } +) +``` + +You prepare the inventory item IDs to pass to the variant using [transform](!docs!/learn/fundamentals/workflows/variable-manipulation) from the Workflows SDK, then pass these IDs to the created product's variant. + +You can now [execute the workflow](!docs!/learn/fundamentals/workflows#3-execute-the-workflow) in [API routes](!docs!/learn/fundamentals/api-routes), [scheduled jobs](!docs!/learn/fundamentals/scheduled-jobs), or [subscribers](!docs!/learn/fundamentals/events-and-subscribers). + +--- + +## Bundled Products + +Consider you have three products: shirt, pants, and shoes. You sell those products separately, but you also want to offer them as a bundle. + +![Diagram showcasing products each having their own variants and inventory](https://res.cloudinary.com/dza7lstvk/image/upload/v1736414787/Medusa%20Resources/bundled-product-1_vmzewk.jpg) + +You can do that by creating a product, where each variant re-uses the inventory items of each of the shirt, pants, and shoes products. + +Then, when the bundled product's variant is purchased, the inventory quantity of the associated inventory items are updated. + +![Diagram showcasing a bundled product using the same inventory as the products part of the bundle](https://res.cloudinary.com/dza7lstvk/image/upload/v1736414780/Medusa%20Resources/bundled-product_x94ca1.jpg) + +### Create Bundled Product + +You can create a bundled product in the Medusa Admin by creating the products part of the bundle first, each having its own inventory items. Then, you create the bundled product whose variant(s) have inventory kits composed of inventory items from each of the products part of the bundle. + +Using [workflows](!docs!/learn/fundamentals/workflows), you can implement this by first creating the products part of the bundle: + +export const bundledHighlights1 = [ + ["11", "products", "Create the products part of the bundle."], + ["28", "manage_inventory", "Enabling this without specifying inventory items creates a default inventory item."] +] + +```ts highlights={bundledHighlights1} +import { + createWorkflow, +} from "@medusajs/framework/workflows-sdk" +import { + createProductsWorkflow, +} from "@medusajs/medusa/core-flows" + +export const createBundledProducts = createWorkflow( + "create-bundled-products", + () => { + const products = createProductsWorkflow.runAsStep({ + input: { + products: [ + { + title: "Shirt", + variants: [ + { + title: "Shirt", + prices: [ + { + amount: 10, + currency_code: "usd" + } + ], + options: { + "Default Option": "Default Variant" + }, + manage_inventory: true + } + ], + options: [ + { + title: "Default Option", + values: ["Default Variant"] + } + ] + }, + { + title: "Pants", + variants: [ + { + title: "Pants", + prices: [ + { + amount: 10, + currency_code: "usd" + } + ], + options: { + "Default Option": "Default Variant" + }, + manage_inventory: true + } + ], + options: [ + { + title: "Default Option", + values: ["Default Variant"] + } + ] + }, + { + title: "Shoes", + variants: [ + { + title: "Shoes", + prices: [ + { + amount: 10, + currency_code: "usd" + } + ], + options: { + "Default Option": "Default Variant" + }, + manage_inventory: true + } + ], + options: [ + { + title: "Default Option", + values: ["Default Variant"] + } + ] + } + ] + } + }) + + // TODO re-retrieve with inventory + } +) +``` + +You create three products and enable `manage_inventory` for their variants, which will create a default inventory item. You can also create the inventory item first for more control over the quantity as explained in [the previous section](#create-multi-part-product). + +Next, retrieve the products again but with variant information: + +export const bundledHighlights2 = [ + ["13", "productIds", "Prepare the product IDs to retrieve them with Query."], + ["18", "productsWithInventory", "Re-retrieve the products with the inventory items of the product's variant."], + ["29", "inventoryItemIds", "Prepare the inventory items to pass to the bundled product's variant."] +] + +```ts highlights={bundledHighlights2} +import { + // ... + transform +} from "@medusajs/framework/workflows-sdk" +import { + useQueryGraphStep +} from "@medusajs/medusa/core-flows" + +export const createBundledProducts = createWorkflow( + "create-bundled-products", + () => { + // ... + const productIds = transform({ + products + }, (data) => data.products.map((product) => product.id)) + + // @ts-ignore + const { data: productsWithInventory } = useQueryGraphStep({ + entity: "product", + fields: [ + "variants.*", + "variants.inventory_items.*" + ], + filters: { + id: productIds + } + }) + + const inventoryItemIds = transform({ + productsWithInventory + }, (data) => { + return data.productsWithInventory.map((product) => { + return { + inventory_item_id: product.variants[0].inventory_items?.[0]?.inventory_item_id + } + }) + }) + + // create bundled product + } +) +``` + +Using [Query](!docs!/learn/fundamentals/module-links/query), you retrieve the product again with the inventory items of each variant. Then, you prepare the inventory items to pass to the bundled product's variant. + +Finally, create the bundled product: + +export const bundledProductHighlights3 = [ + ["5", "bundledProduct", "Create the bundled product."], + ["22", "inventory_items", "Pass the inventory items of the products part of the bundle."] +] + +```ts highlights={bundledProductHighlights3} +export const createBundledProducts = createWorkflow( + "create-bundled-products", + () => { + // ... + const bundledProduct = createProductsWorkflow.runAsStep({ + input: { + products: [ + { + title: "Bundled Clothes", + variants: [ + { + title: "Bundle", + prices: [ + { + amount: 30, + currency_code: "usd" + } + ], + options: { + "Default Option": "Default Variant" + }, + inventory_items: inventoryItemIds, + } + ], + options: [ + { + title: "Default Option", + values: ["Default Variant"] + } + ] + } + ] + } + }).config({ name: "create-bundled-product" }) + } +) +``` + +The bundled product has the same inventory items as those of the products part of the bundle. + +You can now [execute the workflow](!docs!/learn/fundamentals/workflows#3-execute-the-workflow) in [API routes](!docs!/learn/fundamentals/api-routes), [scheduled jobs](!docs!/learn/fundamentals/scheduled-jobs), or [subscribers](!docs!/learn/fundamentals/events-and-subscribers). diff --git a/www/apps/resources/app/commerce-modules/inventory/page.mdx b/www/apps/resources/app/commerce-modules/inventory/page.mdx index 9abb351be9..a6b4a8c4a7 100644 --- a/www/apps/resources/app/commerce-modules/inventory/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/page.mdx @@ -22,6 +22,7 @@ Learn more about why modules are isolated in [this documentation](!docs!/learn/f - [Inventory Across Locations](./concepts/page.mdx#inventorylevel): Manage inventory levels across different locations, such as warehouses. - [Reservation Management](./concepts/page.mdx#reservationitem): Reserve quantities of inventory items at specific locations for orders or other purposes. - [Check Inventory Availability](/references/inventory-next/confirmInventory): Check whether an inventory item has the necessary quantity for purchase. +- [Inventory Kits](./inventory-kit/page.mdx): Create and manage inventory kits for a single product, allowing you to implement use cases like bundled or multi-part products. --- diff --git a/www/apps/resources/app/commerce-modules/product/page.mdx b/www/apps/resources/app/commerce-modules/product/page.mdx index 45777f4580..442c46e4e5 100644 --- a/www/apps/resources/app/commerce-modules/product/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/page.mdx @@ -20,6 +20,7 @@ Learn more about why modules are isolated in [this documentation](!docs!/learn/f - [Products Management](/references/product/models/Product): 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](/references/product/models): The Product Module provides different data models used to organize products, including categories, collections, tags, and more. +- [Bundled and Multi-Part Products](../inventory/inventory-kit/page.mdx): Create and manage inventory kits for a single product, allowing you to implement use cases like bundled or multi-part products. --- diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 44d81fa1f2..1564dbe9e2 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -30,7 +30,7 @@ export const generatedEditDates = { "app/commerce-modules/inventory/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/inventory/concepts/page.mdx": "2024-10-08T15:11:27.634Z", "app/commerce-modules/inventory/inventory-in-flows/page.mdx": "2025-01-08T12:21:12.157Z", - "app/commerce-modules/inventory/page.mdx": "2024-12-25T15:55:02.850Z", + "app/commerce-modules/inventory/page.mdx": "2025-01-09T09:28:33.889Z", "app/commerce-modules/order/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/order/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/order/claim/page.mdx": "2024-10-09T10:11:12.090Z", @@ -64,7 +64,7 @@ export const generatedEditDates = { "app/commerce-modules/product/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/product/guides/price/page.mdx": "2024-12-25T15:10:37.730Z", "app/commerce-modules/product/guides/price-with-taxes/page.mdx": "2024-12-25T15:10:40.879Z", - "app/commerce-modules/product/page.mdx": "2024-12-25T15:55:02.850Z", + "app/commerce-modules/product/page.mdx": "2025-01-09T09:29:05.898Z", "app/commerce-modules/promotion/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/promotion/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/promotion/actions/page.mdx": "2024-10-09T14:49:01.645Z", @@ -5787,5 +5787,6 @@ export const generatedEditDates = { "references/types/HttpTypes/interfaces/types.HttpTypes.StoreProductPricingContext/page.mdx": "2025-01-07T12:54:22.026Z", "references/types/StockLocationTypes/interfaces/types.StockLocationTypes.FilterableStockLocationAddressProps/page.mdx": "2025-01-07T12:54:23.060Z", "references/types/StockLocationTypes/types/types.StockLocationTypes.UpdateStockLocationAddressInput/page.mdx": "2025-01-07T12:54:23.057Z", - "references/types/StockLocationTypes/types/types.StockLocationTypes.UpsertStockLocationAddressInput/page.mdx": "2025-01-07T12:54:23.058Z" + "references/types/StockLocationTypes/types/types.StockLocationTypes.UpsertStockLocationAddressInput/page.mdx": "2025-01-07T12:54:23.058Z", + "app/commerce-modules/inventory/inventory-kit/page.mdx": "2025-01-09T09:39:50.221Z" } \ No newline at end of file diff --git a/www/apps/resources/generated/files-map.mjs b/www/apps/resources/generated/files-map.mjs index 042dbb7cdf..0c5448175f 100644 --- a/www/apps/resources/generated/files-map.mjs +++ b/www/apps/resources/generated/files-map.mjs @@ -295,6 +295,10 @@ export const filesMap = [ "filePath": "/www/apps/resources/app/commerce-modules/inventory/inventory-in-flows/page.mdx", "pathname": "/commerce-modules/inventory/inventory-in-flows" }, + { + "filePath": "/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx", + "pathname": "/commerce-modules/inventory/inventory-kit" + }, { "filePath": "/www/apps/resources/app/commerce-modules/inventory/links-to-other-modules/page.mdx", "pathname": "/commerce-modules/inventory/links-to-other-modules" diff --git a/www/apps/resources/generated/sidebar.mjs b/www/apps/resources/generated/sidebar.mjs index 61b4c3f11a..f6eea7f5fb 100644 --- a/www/apps/resources/generated/sidebar.mjs +++ b/www/apps/resources/generated/sidebar.mjs @@ -644,7 +644,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "ref", - "title": "Retrieve Customer in Storefront", + "title": "Retrieve Logged-In Customer in Storefront", "path": "/storefront-development/customers/retrieve", "children": [] }, @@ -1237,6 +1237,14 @@ export const generatedSidebar = [ "path": "/references/medusa-workflows/addToCartWorkflow", "children": [] }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow", + "children": [] + }, { "loaded": true, "isPathHref": true, @@ -2258,7 +2266,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "ref", - "title": "Retrieve Customer in Storefront", + "title": "Retrieve Logged-In Customer in Storefront", "path": "/storefront-development/customers/retrieve", "children": [] }, @@ -4261,6 +4269,14 @@ export const generatedSidebar = [ "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, @@ -4308,6 +4324,14 @@ export const generatedSidebar = [ "path": "/references/medusa-workflows/addToCartWorkflow", "children": [] }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow", + "children": [] + }, { "loaded": true, "isPathHref": true, @@ -5225,6 +5249,14 @@ export const generatedSidebar = [ "initialOpen": false, "autogenerate_as_ref": true, "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow", + "children": [] + }, { "loaded": true, "isPathHref": true, @@ -5873,6 +5905,14 @@ export const generatedSidebar = [ "path": "/references/medusa-workflows/refundPaymentWorkflow", "children": [] }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentsWorkflow", + "path": "/references/medusa-workflows/refundPaymentsWorkflow", + "children": [] + }, { "loaded": true, "isPathHref": true, @@ -7773,6 +7813,14 @@ export const generatedSidebar = [ "initialOpen": false, "autogenerate_as_ref": true, "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow", + "children": [] + }, { "loaded": true, "isPathHref": true, @@ -7845,6 +7893,14 @@ export const generatedSidebar = [ "path": "/references/medusa-workflows/refundPaymentWorkflow", "children": [] }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentsWorkflow", + "path": "/references/medusa-workflows/refundPaymentsWorkflow", + "children": [] + }, { "loaded": true, "isPathHref": true, @@ -7928,6 +7984,14 @@ export const generatedSidebar = [ "path": "/references/medusa-workflows/steps/refundPaymentStep", "children": [] }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "refundPaymentsStep", + "path": "/references/medusa-workflows/steps/refundPaymentsStep", + "children": [] + }, { "loaded": true, "isPathHref": true, @@ -9407,6 +9471,8 @@ export const generatedSidebar = [ "type": "category", "title": "Concepts", "initialOpen": false, + "autogenerate_tags": "concept+product", + "autogenerate_as_ref": true, "children": [ { "loaded": true, @@ -9415,6 +9481,14 @@ export const generatedSidebar = [ "path": "/commerce-modules/product/links-to-other-modules", "title": "Links to Other Modules", "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "Inventory Kits", + "path": "/commerce-modules/inventory/inventory-kit", + "children": [] } ] }, @@ -13347,6 +13421,14 @@ export const generatedSidebar = [ "title": "updateTaxRatesWorkflow", "path": "/references/medusa-workflows/updateTaxRatesWorkflow", "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateTaxRegionsWorkflow", + "path": "/references/medusa-workflows/updateTaxRegionsWorkflow", + "children": [] } ] }, @@ -13430,6 +13512,14 @@ export const generatedSidebar = [ "title": "updateTaxRatesStep", "path": "/references/medusa-workflows/steps/updateTaxRatesStep", "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "ref", + "title": "updateTaxRegionsStep", + "path": "/references/medusa-workflows/steps/updateTaxRegionsStep", + "children": [] } ] }, diff --git a/www/apps/resources/sidebars/inventory.mjs b/www/apps/resources/sidebars/inventory.mjs index 343aa15719..caa869177f 100644 --- a/www/apps/resources/sidebars/inventory.mjs +++ b/www/apps/resources/sidebars/inventory.mjs @@ -28,6 +28,11 @@ export const inventorySidebar = [ path: "/commerce-modules/inventory/inventory-in-flows", title: "Inventory in Flows", }, + { + type: "link", + path: "/commerce-modules/inventory/inventory-kit", + title: "Inventory Kit", + }, { type: "link", path: "/commerce-modules/inventory/links-to-other-modules", diff --git a/www/apps/resources/sidebars/product.mjs b/www/apps/resources/sidebars/product.mjs index d6c93a82c8..8bd3064f7b 100644 --- a/www/apps/resources/sidebars/product.mjs +++ b/www/apps/resources/sidebars/product.mjs @@ -17,6 +17,8 @@ export const productSidebar = [ type: "category", title: "Concepts", initialOpen: false, + autogenerate_tags: "concept+product", + autogenerate_as_ref: true, children: [ { type: "link", diff --git a/www/packages/tags/src/tags/auth.ts b/www/packages/tags/src/tags/auth.ts index 3dec141dd2..f8023565f7 100644 --- a/www/packages/tags/src/tags/auth.ts +++ b/www/packages/tags/src/tags/auth.ts @@ -16,7 +16,7 @@ export const auth = [ "path": "/storefront-development/customers/reset-password" }, { - "title": "Retrieve Customer in Storefront", + "title": "Retrieve Logged-In Customer in Storefront", "path": "/storefront-development/customers/retrieve" }, { diff --git a/www/packages/tags/src/tags/cart.ts b/www/packages/tags/src/tags/cart.ts index 99f58cdcde..e060c29e00 100644 --- a/www/packages/tags/src/tags/cart.ts +++ b/www/packages/tags/src/tags/cart.ts @@ -99,6 +99,10 @@ export const cart = [ "title": "addToCartWorkflow", "path": "/references/medusa-workflows/addToCartWorkflow" }, + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "createCartWorkflow", "path": "/references/medusa-workflows/createCartWorkflow" diff --git a/www/packages/tags/src/tags/concept.ts b/www/packages/tags/src/tags/concept.ts new file mode 100644 index 0000000000..da7bc2c3f1 --- /dev/null +++ b/www/packages/tags/src/tags/concept.ts @@ -0,0 +1,6 @@ +export const concept = [ + { + "title": "Inventory Kits", + "path": "/commerce-modules/inventory/inventory-kit" + } +] \ No newline at end of file diff --git a/www/packages/tags/src/tags/customer.ts b/www/packages/tags/src/tags/customer.ts index 4b04409371..c42988f0ce 100644 --- a/www/packages/tags/src/tags/customer.ts +++ b/www/packages/tags/src/tags/customer.ts @@ -28,7 +28,7 @@ export const customer = [ "path": "/storefront-development/customers/reset-password" }, { - "title": "Retrieve Customer in Storefront", + "title": "Retrieve Logged-In Customer in Storefront", "path": "/storefront-development/customers/retrieve" }, { diff --git a/www/packages/tags/src/tags/event-bus.ts b/www/packages/tags/src/tags/event-bus.ts index d5e17698f4..44ee98d243 100644 --- a/www/packages/tags/src/tags/event-bus.ts +++ b/www/packages/tags/src/tags/event-bus.ts @@ -11,6 +11,10 @@ export const eventBus = [ "title": "addToCartWorkflow", "path": "/references/medusa-workflows/addToCartWorkflow" }, + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "createCartWorkflow", "path": "/references/medusa-workflows/createCartWorkflow" diff --git a/www/packages/tags/src/tags/index.ts b/www/packages/tags/src/tags/index.ts index 374a531083..4d5668befd 100644 --- a/www/packages/tags/src/tags/index.ts +++ b/www/packages/tags/src/tags/index.ts @@ -1,36 +1,37 @@ -export * from "./product.js" +export * from "./inventory.js" +export * from "./query.js" export * from "./pricing.js" +export * from "./server.js" +export * from "./tax.js" export * from "./storefront.js" export * from "./payment.js" -export * from "./order.js" export * from "./cart.js" export * from "./stripe.js" -export * from "./server.js" -export * from "./product-category.js" -export * from "./auth.js" -export * from "./tax.js" -export * from "./inventory.js" +export * from "./fulfillment.js" +export * from "./order.js" export * from "./customer.js" export * from "./product-collection.js" -export * from "./fulfillment.js" -export * from "./region.js" +export * from "./product-category.js" +export * from "./auth.js" export * from "./api-key.js" -export * from "./query.js" -export * from "./sales-channel.js" -export * from "./remote-link.js" export * from "./publishable-api-key.js" -export * from "./step.js" -export * from "./workflow.js" -export * from "./file.js" -export * from "./locking.js" export * from "./stock-location.js" +export * from "./concept.js" +export * from "./sales-channel.js" +export * from "./product.js" +export * from "./step.js" +export * from "./link.js" +export * from "./remote-query.js" +export * from "./region.js" +export * from "./workflow.js" export * from "./store.js" -export * from "./user.js" +export * from "./promotion.js" +export * from "./currency.js" export * from "./event-bus.js" export * from "./logger.js" +export * from "./user.js" +export * from "./notification.js" +export * from "./file.js" export * from "./js-sdk.js" export * from "./admin.js" -export * from "./promotion.js" -export * from "./remote-query.js" -export * from "./notification.js" -export * from "./currency.js" +export * from "./locking.js" diff --git a/www/packages/tags/src/tags/inventory.ts b/www/packages/tags/src/tags/inventory.ts index e145a282f4..c2ebaf0940 100644 --- a/www/packages/tags/src/tags/inventory.ts +++ b/www/packages/tags/src/tags/inventory.ts @@ -1,4 +1,8 @@ export const inventory = [ + { + "title": "Inventory Kits", + "path": "/commerce-modules/inventory/inventory-kit" + }, { "title": "Retrieve Product Variant's Inventory in Storefront", "path": "/storefront-development/products/inventory" @@ -15,6 +19,10 @@ export const inventory = [ "title": "addToCartWorkflow", "path": "/references/medusa-workflows/addToCartWorkflow" }, + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "confirmVariantInventoryWorkflow", "path": "/references/medusa-workflows/confirmVariantInventoryWorkflow" diff --git a/www/packages/tags/src/tags/remote-link.ts b/www/packages/tags/src/tags/link.ts similarity index 97% rename from www/packages/tags/src/tags/remote-link.ts rename to www/packages/tags/src/tags/link.ts index 413efb2737..3c43179eb9 100644 --- a/www/packages/tags/src/tags/remote-link.ts +++ b/www/packages/tags/src/tags/link.ts @@ -1,4 +1,4 @@ -export const remoteLink = [ +export const link = [ { "title": "linkSalesChannelsToApiKeyStep", "path": "/references/medusa-workflows/steps/linkSalesChannelsToApiKeyStep" @@ -15,6 +15,10 @@ export const remoteLink = [ "title": "updateCartPromotionsStep", "path": "/references/medusa-workflows/steps/updateCartPromotionsStep" }, + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "createCartWorkflow", "path": "/references/medusa-workflows/createCartWorkflow" diff --git a/www/packages/tags/src/tags/locking.ts b/www/packages/tags/src/tags/locking.ts index 3974662914..7bfee689fe 100644 --- a/www/packages/tags/src/tags/locking.ts +++ b/www/packages/tags/src/tags/locking.ts @@ -3,6 +3,10 @@ export const locking = [ "title": "reserveInventoryStep", "path": "/references/medusa-workflows/steps/reserveInventoryStep" }, + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "confirmClaimRequestWorkflow", "path": "/references/medusa-workflows/confirmClaimRequestWorkflow" diff --git a/www/packages/tags/src/tags/logger.ts b/www/packages/tags/src/tags/logger.ts index ff33575388..ee7240eab2 100644 --- a/www/packages/tags/src/tags/logger.ts +++ b/www/packages/tags/src/tags/logger.ts @@ -1,4 +1,8 @@ export const logger = [ + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "createCartWorkflow", "path": "/references/medusa-workflows/createCartWorkflow" @@ -23,10 +27,18 @@ export const logger = [ "title": "cancelPaymentStep", "path": "/references/medusa-workflows/steps/cancelPaymentStep" }, + { + "title": "refundPaymentsStep", + "path": "/references/medusa-workflows/steps/refundPaymentsStep" + }, { "title": "processPaymentWorkflow", "path": "/references/medusa-workflows/processPaymentWorkflow" }, + { + "title": "refundPaymentsWorkflow", + "path": "/references/medusa-workflows/refundPaymentsWorkflow" + }, { "title": "deletePaymentSessionsStep", "path": "/references/medusa-workflows/steps/deletePaymentSessionsStep" diff --git a/www/packages/tags/src/tags/order.ts b/www/packages/tags/src/tags/order.ts index 780526122b..74f43befde 100644 --- a/www/packages/tags/src/tags/order.ts +++ b/www/packages/tags/src/tags/order.ts @@ -3,6 +3,10 @@ export const order = [ "title": "Checkout Step 5: Complete Cart", "path": "/storefront-development/checkout/complete-cart" }, + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "addOrderTransactionStep", "path": "/references/medusa-workflows/steps/addOrderTransactionStep" @@ -467,6 +471,10 @@ export const order = [ "title": "refundPaymentWorkflow", "path": "/references/medusa-workflows/refundPaymentWorkflow" }, + { + "title": "refundPaymentsWorkflow", + "path": "/references/medusa-workflows/refundPaymentsWorkflow" + }, { "title": "createReturnReasonsStep", "path": "/references/medusa-workflows/steps/createReturnReasonsStep" diff --git a/www/packages/tags/src/tags/payment.ts b/www/packages/tags/src/tags/payment.ts index 0fd6be9a28..7fb8ee0055 100644 --- a/www/packages/tags/src/tags/payment.ts +++ b/www/packages/tags/src/tags/payment.ts @@ -19,6 +19,10 @@ export const payment = [ "title": "createPaymentCollectionsStep", "path": "/references/medusa-workflows/steps/createPaymentCollectionsStep" }, + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "createCartWorkflow", "path": "/references/medusa-workflows/createCartWorkflow" @@ -59,6 +63,10 @@ export const payment = [ "title": "refundPaymentStep", "path": "/references/medusa-workflows/steps/refundPaymentStep" }, + { + "title": "refundPaymentsStep", + "path": "/references/medusa-workflows/steps/refundPaymentsStep" + }, { "title": "capturePaymentWorkflow", "path": "/references/medusa-workflows/capturePaymentWorkflow" @@ -71,6 +79,10 @@ export const payment = [ "title": "refundPaymentWorkflow", "path": "/references/medusa-workflows/refundPaymentWorkflow" }, + { + "title": "refundPaymentsWorkflow", + "path": "/references/medusa-workflows/refundPaymentsWorkflow" + }, { "title": "createPaymentSessionStep", "path": "/references/medusa-workflows/steps/createPaymentSessionStep" diff --git a/www/packages/tags/src/tags/product.ts b/www/packages/tags/src/tags/product.ts index 4325a790b3..b40705be65 100644 --- a/www/packages/tags/src/tags/product.ts +++ b/www/packages/tags/src/tags/product.ts @@ -1,4 +1,8 @@ export const product = [ + { + "title": "Inventory Kits", + "path": "/commerce-modules/inventory/inventory-kit" + }, { "title": "Get Variant Prices", "path": "/commerce-modules/product/guides/price" diff --git a/www/packages/tags/src/tags/query.ts b/www/packages/tags/src/tags/query.ts index c41850749a..ec85a61b11 100644 --- a/www/packages/tags/src/tags/query.ts +++ b/www/packages/tags/src/tags/query.ts @@ -59,6 +59,10 @@ export const query = [ "title": "cancelOrderTransferRequestWorkflow", "path": "/references/medusa-workflows/cancelOrderTransferRequestWorkflow" }, + { + "title": "cancelOrderWorkflow", + "path": "/references/medusa-workflows/cancelOrderWorkflow" + }, { "title": "declineOrderTransferRequestWorkflow", "path": "/references/medusa-workflows/declineOrderTransferRequestWorkflow" @@ -71,6 +75,10 @@ export const query = [ "title": "processPaymentWorkflow", "path": "/references/medusa-workflows/processPaymentWorkflow" }, + { + "title": "refundPaymentsWorkflow", + "path": "/references/medusa-workflows/refundPaymentsWorkflow" + }, { "title": "batchProductVariantsWorkflow", "path": "/references/medusa-workflows/batchProductVariantsWorkflow" @@ -86,5 +94,9 @@ export const query = [ { "title": "deleteProductsWorkflow", "path": "/references/medusa-workflows/deleteProductsWorkflow" + }, + { + "title": "updateStockLocationsWorkflow", + "path": "/references/medusa-workflows/updateStockLocationsWorkflow" } ] \ No newline at end of file diff --git a/www/packages/tags/src/tags/remote-query.ts b/www/packages/tags/src/tags/remote-query.ts index f4a5a6eeb9..95bab8e7d1 100644 --- a/www/packages/tags/src/tags/remote-query.ts +++ b/www/packages/tags/src/tags/remote-query.ts @@ -15,6 +15,10 @@ export const remoteQuery = [ "title": "addToCartWorkflow", "path": "/references/medusa-workflows/addToCartWorkflow" }, + { + "title": "completeCartWorkflow", + "path": "/references/medusa-workflows/completeCartWorkflow" + }, { "title": "createCartWorkflow", "path": "/references/medusa-workflows/createCartWorkflow" @@ -147,10 +151,6 @@ export const remoteQuery = [ "title": "cancelOrderFulfillmentWorkflow", "path": "/references/medusa-workflows/cancelOrderFulfillmentWorkflow" }, - { - "title": "cancelOrderWorkflow", - "path": "/references/medusa-workflows/cancelOrderWorkflow" - }, { "title": "cancelReturnReceiveWorkflow", "path": "/references/medusa-workflows/cancelReturnReceiveWorkflow" diff --git a/www/packages/tags/src/tags/step.ts b/www/packages/tags/src/tags/step.ts index 2250612031..5016b9f8dd 100644 --- a/www/packages/tags/src/tags/step.ts +++ b/www/packages/tags/src/tags/step.ts @@ -115,6 +115,10 @@ export const step = [ "title": "updateLineItemsStep", "path": "/references/medusa-workflows/steps/updateLineItemsStep" }, + { + "title": "validateCartPaymentsStep", + "path": "/references/medusa-workflows/steps/validateCartPaymentsStep" + }, { "title": "validateCartShippingOptionsStep", "path": "/references/medusa-workflows/steps/validateCartShippingOptionsStep" @@ -795,6 +799,14 @@ export const step = [ "title": "refundPaymentStep", "path": "/references/medusa-workflows/steps/refundPaymentStep" }, + { + "title": "refundPaymentsStep", + "path": "/references/medusa-workflows/steps/refundPaymentsStep" + }, + { + "title": "validatePaymentsRefundStep", + "path": "/references/medusa-workflows/validatePaymentsRefundStep" + }, { "title": "validateRefundStep", "path": "/references/medusa-workflows/validateRefundStep" @@ -1179,6 +1191,10 @@ export const step = [ "title": "updateTaxRatesStep", "path": "/references/medusa-workflows/steps/updateTaxRatesStep" }, + { + "title": "updateTaxRegionsStep", + "path": "/references/medusa-workflows/steps/updateTaxRegionsStep" + }, { "title": "createUsersStep", "path": "/references/medusa-workflows/steps/createUsersStep" diff --git a/www/packages/tags/src/tags/stock-location.ts b/www/packages/tags/src/tags/stock-location.ts index a1577de4b5..379dd13417 100644 --- a/www/packages/tags/src/tags/stock-location.ts +++ b/www/packages/tags/src/tags/stock-location.ts @@ -1,4 +1,8 @@ export const stockLocation = [ + { + "title": "Inventory Kits", + "path": "/commerce-modules/inventory/inventory-kit" + }, { "title": "createStockLocations", "path": "/references/medusa-workflows/steps/createStockLocations" diff --git a/www/packages/tags/src/tags/storefront.ts b/www/packages/tags/src/tags/storefront.ts index 4b9993a06a..80770477ac 100644 --- a/www/packages/tags/src/tags/storefront.ts +++ b/www/packages/tags/src/tags/storefront.ts @@ -76,7 +76,7 @@ export const storefront = [ "path": "/storefront-development/customers/reset-password" }, { - "title": "Retrieve Customer in Storefront", + "title": "Retrieve Logged-In Customer in Storefront", "path": "/storefront-development/customers/retrieve" }, { diff --git a/www/packages/tags/src/tags/tax.ts b/www/packages/tags/src/tags/tax.ts index 5c2f7b2cb9..8aa0324549 100644 --- a/www/packages/tags/src/tags/tax.ts +++ b/www/packages/tags/src/tags/tax.ts @@ -87,6 +87,10 @@ export const tax = [ "title": "updateTaxRatesStep", "path": "/references/medusa-workflows/steps/updateTaxRatesStep" }, + { + "title": "updateTaxRegionsStep", + "path": "/references/medusa-workflows/steps/updateTaxRegionsStep" + }, { "title": "createTaxRateRulesWorkflow", "path": "/references/medusa-workflows/createTaxRateRulesWorkflow" @@ -119,6 +123,10 @@ export const tax = [ "title": "updateTaxRatesWorkflow", "path": "/references/medusa-workflows/updateTaxRatesWorkflow" }, + { + "title": "updateTaxRegionsWorkflow", + "path": "/references/medusa-workflows/updateTaxRegionsWorkflow" + }, { "title": "taxRate", "path": "/references/js-sdk/admin/taxRate" diff --git a/www/packages/tags/src/tags/workflow.ts b/www/packages/tags/src/tags/workflow.ts index 4dd4d5222c..0cc3ed14bb 100644 --- a/www/packages/tags/src/tags/workflow.ts +++ b/www/packages/tags/src/tags/workflow.ts @@ -627,6 +627,10 @@ export const workflow = [ "title": "refundPaymentWorkflow", "path": "/references/medusa-workflows/refundPaymentWorkflow" }, + { + "title": "refundPaymentsWorkflow", + "path": "/references/medusa-workflows/refundPaymentsWorkflow" + }, { "title": "createPaymentSessionsWorkflow", "path": "/references/medusa-workflows/createPaymentSessionsWorkflow"