chore(docs): Generated References (automated) (#9727)

Generated the following references:
- `api_key`
- `auth`
- `cart`
- `core_flows`
- `currency`
- `customer`
- `dml`
- `fulfillment`
- `helper_steps`
- `inventory_next`
- `js_sdk`
- `medusa`
- `medusa_config`
- `modules`
- `modules_sdk`
- `notification`
- `order`
- `order_models`
- `payment`
- `pricing`
- `product`
- `promotion`
- `region`
- `sales_channel`
- `stock_location_next`
- `store`
- `tax`
- `tax_provider`
- `types`
- `user`
- `utils`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2024-10-24 09:41:14 +00:00
1 parent e196ad7659
commit 5deeae060a
2313 files changed
+533036 -383477

No files matched your search

@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createProductCategories` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createProductCategories(data, sharedContext?): Promise&#60;[ProductCategoryDTO](../../../interfaces/product.ProductCategoryDTO/page.mdx)[]&#62;
This method is used to create product categories.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createProductCollections` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createProductCollections(data, sharedContext?): Promise&#60;[ProductCollectionDTO](../../../interfaces/product.ProductCollectionDTO/page.mdx)[]&#62;
This method is used to create product collections.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createProductOptionValues` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createProductOptionValues(data, sharedContext?): Promise&#60;[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]&#62;
This method is used to create product option values.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createProductOptions` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createProductOptions(data, sharedContext?): Promise&#60;[ProductOptionDTO](../../../interfaces/product.ProductOptionDTO/page.mdx)[]&#62;
This method is used to create product options.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createProductTags` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createProductTags(data, sharedContext?): Promise&#60;[ProductTagDTO](../../../interfaces/product.ProductTagDTO/page.mdx)[]&#62;
This method is used to create a product tag.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createProductTypes` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createProductTypes(data, sharedContext?): Promise&#60;[ProductTypeDTO](../../../interfaces/product.ProductTypeDTO/page.mdx)[]&#62;
This method is used to create a product type.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createProductVariants` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createProductVariants(data, sharedContext?): Promise&#60;[ProductVariantDTO](../../../interfaces/product.ProductVariantDTO/page.mdx)[]&#62;
This method is used to create product variants.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `createProducts` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createProducts(data, sharedContext?): Promise&#60;[ProductDTO](../../../interfaces/product.ProductDTO/page.mdx)[]&#62;
This method is used to create a list of products.
@@ -30,7 +36,7 @@ const products = await productModuleService.createProducts([
### Parameters
<TypeList types={[{"name":"data","type":"[CreateProductDTO](../../../interfaces/product.CreateProductDTO/page.mdx)[]","description":"The products to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"Optionally pass an ID when creating a product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to created or updated.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`string`","description":"The product type id to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to be associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](../../../interfaces/product.CreateProductOptionDTO/page.mdx)[]","description":"The product options to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The product option's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[CreateProductVariantDTO](../../../interfaces/product.CreateProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The id of the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","description":"The barcode of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`string`","description":"TLine truncated
<TypeList types={[{"name":"data","type":"[CreateProductDTO](../../../interfaces/product.CreateProductDTO/page.mdx)[]","description":"The products to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"Optionally pass an ID when creating a product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to created or updated.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"external_id","type":"`string`","description":"The id of the product in an external system","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string`","description":"The product type id to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to be associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](../../../interfaces/product.CreateProductOptionDTO/page.mdx)[]","description":"The product options to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The product option's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[CreateProductVariantDTO](../../../interfaces/product.CreateProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The id of the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`",Line truncated
### Returns
@@ -50,7 +56,7 @@ const product = await productModuleService.createProducts({
### Parameters
<TypeList types={[{"name":"data","type":"[CreateProductDTO](../../../interfaces/product.CreateProductDTO/page.mdx)","description":"The product to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"Optionally pass an ID when creating a product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to created or updated.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`string`","description":"The product type id to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to be associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](../../../interfaces/product.CreateProductOptionDTO/page.mdx)[]","description":"The product options to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The product option's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[CreateProductVariantDTO](../../../interfaces/product.CreateProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The id of the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","description":"The barcode of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`string`","description":"The Line truncated
<TypeList types={[{"name":"data","type":"[CreateProductDTO](../../../interfaces/product.CreateProductDTO/page.mdx)","description":"The product to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"Optionally pass an ID when creating a product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to created or updated.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"external_id","type":"`string`","description":"The id of the product in an external system","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string`","description":"The product type id to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to be associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](../../../interfaces/product.CreateProductOptionDTO/page.mdx)[]","description":"The product options to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The product option's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[CreateProductVariantDTO](../../../interfaces/product.CreateProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The id of the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","deLine truncated
### Returns
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `deleteProductCategories` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete categories by their ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `deleteProductCollections` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete collections by their ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `deleteProductOptionValues` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete a product option.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `deleteProductOptions` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete a product option.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `deleteProductTags` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete product tags by their ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `deleteProductTypes` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete a product type.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `deleteProductVariants` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete ProductVariant. This method will completely remove the ProductVariant and they can no longer be accessed or retrieved.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `deleteProducts` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete products. Unlike the softDelete method, this method will completely remove the products and they can no longer be accessed or retrieved.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listAndCountProductCategories` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product categories along with the total count of available product categories satisfying the provided filters.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listAndCountProductCollections` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product collections along with the total count of available product collections satisfying the provided filters.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listAndCountProductOptionValues` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product option values along with the total count of available product option values satisfying the provided filters.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listAndCountProductOptions` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product options along with the total count of available product options satisfying the provided filters.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listAndCountProductTags` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product tags along with the total count of available product tags satisfying the provided filters.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listAndCountProductTypes` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product types along with the total count of available product types satisfying the provided filters.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listAndCountProductVariants` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product variants along with the total count of available product variants satisfying the provided filters.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listAndCountProducts` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of products along with the total count of available products satisfying the provided filters.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listProductCategories` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product categories based on optional filters and configuration.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listProductCollections` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product collections based on optional filters and configuration.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listProductOptionValues` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product option values based on optional filters and configuration.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listProductOptions` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product options based on optional filters and configuration.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listProductTags` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of tags based on optional filters and configuration.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listProductTypes` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product types based on optional filters and configuration.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listProductVariants` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of product variants based on optional filters and configuration.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `listProducts` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a paginated list of products based on optional filters and configuration.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `restoreProductCategories` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to restore categories which were deleted using the softDelete method.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `restoreProductCollections` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to restore collections which were deleted using the softDelete method.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `restoreProductOptionValues` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to restore options which were deleted using the softDelete method.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `restoreProductOptions` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to restore options which were deleted using the softDelete method.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `restoreProductTags` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to restore tags which were deleted using the softDelete method.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `restoreProductTypes` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to restore types which were deleted using the softDelete method.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `restoreProductVariants` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to restore variants which were deleted using the softDelete method.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `restoreProducts` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to restore products which were deleted using the softDelete method.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `retrieveProduct` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a product by its ID
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `retrieveProductCategory` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a product category by its ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `retrieveProductCollection` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a product collection by its ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `retrieveProductOption` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a product option by its ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `retrieveProductTag` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a tag by its ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `retrieveProductType` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a product type by its ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `retrieveProductVariant` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to retrieve a product variant by its ID.
## Example
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `softDeleteProductCategories` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete product categories. Unlike the deleteCategories method, this method won't completely remove the category. It can still be accessed or retrieved using methods like retrieveCategories if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted categories can be restored using the restoreCategories method.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `softDeleteProductCollections` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete product collections. Unlike the deleteCollections method, this method won't completely remove the collection. It can still be accessed or retrieved using methods like retrieveCollections if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted collections can be restored using the restoreCollections method.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `softDeleteProductOptionValues` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete options. Unlike the delete method, this method won't completely remove the option. It can still be accessed or retrieved using methods like retrieve if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted options can be restored using the restore method.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `softDeleteProductOptions` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete options. Unlike the delete method, this method won't completely remove the option. It can still be accessed or retrieved using methods like retrieve if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted options can be restored using the restore method.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `softDeleteProductTags` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete tags. Unlike the delete method, this method won't completely remove the tag. It can still be accessed or retrieved using methods like retrieve if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted tags can be restored using the restore method.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `softDeleteProductTypes` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete types. Unlike the delete method, this method won't completely remove the type. It can still be accessed or retrieved using methods like retrieve if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted types can be restored using the restore method.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `softDeleteProductVariants` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete variants. Unlike the delete method, this method won't completely remove the variant. It can still be accessed or retrieved using methods like retrieve if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted variants can be restored using the restore method.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `softDeleteProducts` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method is used to delete products. Unlike the delete method, this method won't completely remove the product. It can still be accessed or retrieved using methods like retrieve if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted products can be restored using the restore method.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `updateProductCategories` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateProductCategories(id, data, sharedContext?): Promise&#60;[ProductCategoryDTO](../../../interfaces/product.ProductCategoryDTO/page.mdx)&#62;
This method is used to update a category.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `updateProductCollections` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateProductCollections(id, data, sharedContext?): Promise&#60;[ProductCollectionDTO](../../../interfaces/product.ProductCollectionDTO/page.mdx)&#62;
This method is used to update a collection.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `updateProductOptionValues` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateProductOptionValues(id, data, sharedContext?): Promise&#60;[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)&#62;
This method is used to update a option.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `updateProductOptions` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateProductOptions(id, data, sharedContext?): Promise&#60;[ProductOptionDTO](../../../interfaces/product.ProductOptionDTO/page.mdx)&#62;
This method is used to update a option.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `updateProductTags` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateProductTags(id, data, sharedContext?): Promise&#60;[ProductTagDTO](../../../interfaces/product.ProductTagDTO/page.mdx)&#62;
This method is used to update a tag.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `updateProductTypes` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateProductTypes(id, data, sharedContext?): Promise&#60;[ProductTypeDTO](../../../interfaces/product.ProductTypeDTO/page.mdx)&#62;
This method is used to update a type.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `updateProductVariants` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateProductVariants(id, data, sharedContext?): Promise&#60;[ProductVariantDTO](../../../interfaces/product.ProductVariantDTO/page.mdx)&#62;
This method is used to update a variant.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `updateProducts` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateProducts(id, data, sharedContext?): Promise&#60;[ProductDTO](../../../interfaces/product.ProductDTO/page.mdx)&#62;
This method is used to update a product.
@@ -27,7 +33,7 @@ const product = await productModuleService.updateProducts(
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the product to be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateProductDTO](../../../interfaces/product.UpdateProductDTO/page.mdx)","description":"The attributes of the product to be updated","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../../../interfaces/product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../../../interfaces/product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":true,"defaultValue":"","expandLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the product to be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateProductDTO](../../../interfaces/product.UpdateProductDTO/page.mdx)","description":"The attributes of the product to be updated","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"external_id","type":"`null` \\| `string`","description":"The id of the product in an external system","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../../../interfaces/product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../../../interfaces/product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":trLine truncated
### Returns
@@ -52,7 +58,7 @@ const products = await productModuleService.updateProducts(
### Parameters
<TypeList types={[{"name":"selector","type":"[FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx)","description":"The filters specifying which products to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;[FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;[FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;[FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the products' attributes, such as titles and descriptions, using this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx) \\| [ProductStatus](../../../types/product.ProductStatus/page.mdx)[]","description":"The status to filter products by","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"The titles to filter products by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"The handles to filter products by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter products by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Filters only or excluding gift card products","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"`object`","description":"Filters on a product's tags.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variants","type":"`object`","description":"Filters on a product's variant properties.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string` \\| `string`[]","description":"Filter a product by the ID of the associated type","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`object` \\| `object`","description":"Filter a product by the IDs of their associated categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/product.OperatorMap/page.mdx)&#60;string&#62;","description":"Filters a product by its associated collections.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../types/product.OperatorMap/page.mdx)&#60;string&#62;","description":"Filters a product based on when it was created","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../types/product.OperatorMap/page.mdx)&#60;string&#62;","description":"Filters a product based on when it was updated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../types/product.OperatorMap/page.mdx)&#60;string&#62;","description":"Filters soft-deleted products based on the date they were deleted at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to applLine truncated
<TypeList types={[{"name":"selector","type":"[FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx)","description":"The filters specifying which products to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;[FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;[FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;[FilterableProductProps](../../../interfaces/product.FilterableProductProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the products' attributes, such as titles and descriptions, using this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx) \\| [ProductStatus](../../../types/product.ProductStatus/page.mdx)[]","description":"The status to filter products by","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"The titles to filter products by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"The handles to filter products by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter products by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Filters only or excluding gift card products","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"`object`","description":"Filters on a product's tags.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variants","type":"`object`","description":"Filters on a product's variant properties.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string` \\| `string`[]","description":"Filter a product by the ID of the associated type","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`object` \\| `object`","description":"Filter a product by the IDs of their associated categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/product.OperatorMap/page.mdx)&#60;string&#62;","description":"Filters a product by its associated collections.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../types/product.OperatorMap/page.mdx)&#60;string&#62;","description":"Filters a product based on when it was created","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../types/product.OperatorMap/page.mdx)&#60;string&#62;","description":"Filters a product based on when it was updated","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../types/product.OperatorMap/page.mdx)&#60;string&#62;","description":"Filters soft-deleted products based on the date they were deleted at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to applLine truncated
### Returns
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `upsertProductCategories` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## upsertProductCategories(data, sharedContext?): Promise&#60;[ProductCategoryDTO](../../../interfaces/product.ProductCategoryDTO/page.mdx)[]&#62;
This method updates existing categories, or creates new ones if they don't exist.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `upsertProductCollections` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## upsertProductCollections(data, sharedContext?): Promise&#60;[ProductCollectionDTO](../../../interfaces/product.ProductCollectionDTO/page.mdx)[]&#62;
This method updates existing collections, or creates new ones if they don't exist.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `upsertProductOptions` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## upsertProductOptions(data, sharedContext?): Promise&#60;[ProductOptionDTO](../../../interfaces/product.ProductOptionDTO/page.mdx)[]&#62;
This method updates existing options, or creates new ones if they don't exist.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `upsertProductTags` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## upsertProductTags(data, sharedContext?): Promise&#60;[ProductTagDTO](../../../interfaces/product.ProductTagDTO/page.mdx)[]&#62;
This method updates existing tags, or creates new ones if they don't exist.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `upsertProductTypes` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## upsertProductTypes(data, sharedContext?): Promise&#60;[ProductTypeDTO](../../../interfaces/product.ProductTypeDTO/page.mdx)[]&#62;
This method updates existing types, or creates new ones if they don't exist.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `upsertProductVariants` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## upsertProductVariants(data, sharedContext?): Promise&#60;[ProductVariantDTO](../../../interfaces/product.ProductVariantDTO/page.mdx)[]&#62;
This method updates existing variants, or creates new ones if they don't exist.
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `upsertProducts` method. This belongs to the Product Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## upsertProducts(data, sharedContext?): Promise&#60;[ProductDTO](../../../interfaces/product.ProductDTO/page.mdx)[]&#62;
This method updates existing products, or creates new ones if they don't exist.
@@ -30,7 +36,7 @@ const products = await productModuleService.upsertProducts([
### Parameters
<TypeList types={[{"name":"data","type":"[UpsertProductDTO](../../../interfaces/product.UpsertProductDTO/page.mdx)[]","description":"The attributes to update or create for each product.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product to update. If not provided, a product\nis created instead. In that case, the `title` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../../../interfaces/product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../../../interfaces/product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type"Line truncated
<TypeList types={[{"name":"data","type":"[UpsertProductDTO](../../../interfaces/product.UpsertProductDTO/page.mdx)[]","description":"The attributes to update or create for each product.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product to update. If not provided, a product\nis created instead. In that case, the `title` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"external_id","type":"`null` \\| `string`","description":"The id of the product in an external system","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../../../interfaces/product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../../../interfaces/product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":Line truncated
### Returns
@@ -50,7 +56,7 @@ const product = await productModuleService.upsertProducts({
### Parameters
<TypeList types={[{"name":"data","type":"[UpsertProductDTO](../../../interfaces/product.UpsertProductDTO/page.mdx)","description":"The attributes to update or create for the new product.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product to update. If not provided, a product\nis created instead. In that case, the `title` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../../../interfaces/product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../../../interfaces/product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","typeLine truncated
<TypeList types={[{"name":"data","type":"[UpsertProductDTO](../../../interfaces/product.UpsertProductDTO/page.mdx)","description":"The attributes to update or create for the new product.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product to update. If not provided, a product\nis created instead. In that case, the `title` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../../../interfaces/product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"external_id","type":"`null` \\| `string`","description":"The id of the product in an external system","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../../../interfaces/product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../../../interfaces/product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children"Line truncated
### Returns
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
A product to create.
<TypeList types={[{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"Optionally pass an ID when creating a product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to created or updated.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`string`","description":"The product type id to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to be associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](../product.CreateProductOptionDTO/page.mdx)[]","description":"The product options to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The product option's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[CreateProductVariantDTO](../product.CreateProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The id of the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","description":"The barcode of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`string`","description":"The EAN of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`string`","description":"The UPC of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backLine truncated
<TypeList types={[{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"Optionally pass an ID when creating a product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to created or updated.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"external_id","type":"`string`","description":"The id of the product in an external system","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string`","description":"The product type id to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to be associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](../product.CreateProductOptionDTO/page.mdx)[]","description":"The product options to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The product option's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[CreateProductVariantDTO](../product.CreateProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The id of the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`string`","description":"The barcode of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`string`","description":"The EAN of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]}Line truncated
@@ -9,6 +9,12 @@ import { TypeList } from "docs-ui"
This section of the documentation provides a reference to the `IProductModuleService` interface’s methods. This is the interface developers use to use the functionalities provided by the Product Module.
<Note>
You should only use the methods in this reference when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
The main service interface for the Product Module.
## Methods
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
The data to update in a product.
<TypeList types={[{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"The barcode of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"The EAN of the product Line truncated
<TypeList types={[{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"external_id","type":"`null` \\| `string`","description":"The id of the product in an external system","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"The barLine truncated
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
A product to be created or updated.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the product to update. If not provided, a product\nis created instead. In that case, the `title` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"naLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the product to update. If not provided, a product\nis created instead. In that case, the `title` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product. The handle can be used to create slug URL paths.\nIf not supplied, the value of the `handle` attribute of the product is set to the slug version of the `title` attribute.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../types/product.ProductStatus/page.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[UpsertProductImageDTO](../product.UpsertProductImageDTO/page.mdx)[]","description":"The associated images to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The product image's ID. If not provided, the image is created. In\nthat case, the `url` property is required.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The new URL of the product image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"external_id","type":"`null` \\| `string`","description":"The id of the product in an external system","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The product type to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tag_ids","type":"`string`[]","description":"The tags to associate with the product","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_ids","type":"`string`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[UpsertProductOptionDTO](../product.UpsertProductOptionDTO/page.mdx)[]","description":"The associated options to create or update.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option to update. If not provided, the product\noption is created. In that case, the `title` and `values` properties are\nrequired.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product option's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string`[]","description":"The product option values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"variants","type":"[UpsertProductVariantDTO](../product.UpsertProductVariantDTO/page.mdx)[]","description":"The product variants to be created and associated with the product.\nYou can also update existing product variants associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":true,"defaultValue":"","expandable":falseLine truncated
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
**Event**: `Object`
## Properties
<TypeList types={[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../product.EventMetadata/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
**JoinerRelationship**: `Object`
## Properties
<TypeList types={[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerRelationship"/>
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
**OperatorMap**: `Object`
## Properties
<TypeList types={[{"name":"$and","type":"[Query](../product.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../product.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../product.Query/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../product.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="OperatorMap"/>
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
**RawMessageFormat**: `Object`
## Properties
<TypeList types={[{"name":"eventName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"source","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick&#60;[Context](../../interfaces/product.Context/page.mdx), \"eventGroupId\"&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RawMessageFormat"/>