Skip to main content
Skip to main content

updateTypes - Product Module Reference

Beta

This documentation provides a reference to the updateTypes method. This belongs to the Product Module.

This method is used to update a product type

Example

import {
initialize as initializeProductModule,
} from "@medusajs/product"

async function updateProductType (id: string, value: string) {
const productModule = await initializeProductModule()

const productTypes = await productModule.updateTypes([
{
id,
value
}
])

// do something with the product types or return them
}

Parameters

dataUpdateProductTypeDTO[]Required
The product types to be updated, each having the attributes that should be updated in the product type.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ProductTypeDTO[]>Required
The list of updated product types.
Was this section helpful?