diff --git a/.changeset/angry-jobs-prove.md b/.changeset/angry-jobs-prove.md new file mode 100644 index 0000000000..99188d9f0d --- /dev/null +++ b/.changeset/angry-jobs-prove.md @@ -0,0 +1,5 @@ +--- +"@medusajs/types": patch +--- + +fix(types): add missing inventory_items to input of createProductsWorkflow diff --git a/packages/core/types/src/product/common.ts b/packages/core/types/src/product/common.ts index e3f7fdc4d9..4fc9bc8c99 100644 --- a/packages/core/types/src/product/common.ts +++ b/packages/core/types/src/product/common.ts @@ -1237,6 +1237,16 @@ export interface UpdateProductOptionValueDTO { metadata?: MetadataType } +/** + * @interface + * + * Inventory kit for creating a product variant. + */ +export interface CreateProductVariantInventoryKit { + inventory_item_id: string + required_quantity?: number +} + /** * @interface * @@ -1275,6 +1285,11 @@ export interface CreateProductVariantDTO { * Whether the product variant's inventory should be managed by the core system. */ manage_inventory?: boolean + /** + * The variant's inventory items. It's only + * available if `manage_inventory` is enabled. + */ + inventory_items?: CreateProductVariantInventoryKit[] /** * The HS Code of the product variant. */