docs: generate medusa-react reference (#6004)

* add new plugin for better organization

* added handling in theme for mutations and query types

* added tsdoc to hooks

* added tsdocs to utility functions

* added tsdoc to providers

* generated reference

* general fixes for generated reference

* generated api reference specs + general fixes

* add missing import react

* split utilities into different directories

* added overview page

* added link to customer authentication section

* fix lint errors

* added changeset

* fix readme

* fixed build error

* added expand fields + other sections to overview

* updated what's new section

* general refactoring

* remove unnecessary query field

* fix links

* added ignoreApi option
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-01-05 17:03:38 +02:00
1 parent 6fc6a9de6a
commit 7d650771d1
2811 files changed
+231856 -455063

No files matched your search

@@ -0,0 +1,44 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/create
sidebar_label: create
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# create - Product Module Reference
This documentation provides a reference to the create method. This belongs to the Product Module.
This method is used to create a product.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function createProduct (title: string) {
const productModule = await initializeProductModule()
const products = await productModule.create([
{
title
}
])
// do something with the products or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[CreateProductDTO](../../interfaces/product.CreateProductDTO.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":"categories","type":"`object`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"collection_id","type":"`string`","description":"The product collection to be associated with 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":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","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":"height","type":"`number`","description":"The height of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string`","description":"The HS Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"`string`[] \\| `object`[]","description":"The product's images. If an array of strings is supplied, each string will be a URL and a `ProductImage` will be created\nand associated with the product. If an array of objects is supplied, you can pass along the ID of an existing `ProductImage`.","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":"length","type":"`number`","description":"The length of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string`","description":"The material of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string`","description":"The MID Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](../../interfaces/product.CreateProductOptionDTO.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":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"origin_country","type":"`string`","description":"The origin country of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"DRAFT","type":"`\"draft\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROPOSED","type":"`\"proposed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PUBLISHED","type":"`\"published\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"REJECTED","type":"`\"rejected\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[CreateProductTagDTO](../../interfaces/product.CreateProductTagDTO.mdx)[]","description":"The product tags to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of created products.","expandable":false,"children":[{"name":"ProductDTO[]","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductDTO","type":"`object`","description":"A product's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,43 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/createCategory
sidebar_label: createCategory
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# createCategory - Product Module Reference
This documentation provides a reference to the createCategory method. This belongs to the Product Module.
This method is used to create a product category.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function createCategory (name: string, parent_category_id: string | null) {
const productModule = await initializeProductModule()
const category = await productModule.createCategory({
name,
parent_category_id
})
// do something with the product category or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[CreateProductCategoryDTO](../../interfaces/product.CreateProductCategoryDTO.mdx)","description":"The product category to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The product category's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The ID of the parent product category, if it has any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The product category's handle.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The created product category.","expandable":false,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)","description":"The associated parent category.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the product category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)","description":"The associated parent category.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.",Line truncated
@@ -0,0 +1,44 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/createCollections
sidebar_label: createCollections
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# createCollections - Product Module Reference
This documentation provides a reference to the createCollections method. This belongs to the Product Module.
This method is used to create product collections.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function createCollection (title: string) {
const productModule = await initializeProductModule()
const collections = await productModule.createCollections([
{
title
}
])
// do something with the product collections or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[CreateProductCollectionDTO](../../interfaces/product.CreateProductCollectionDTO.mdx)[]","description":"The product collections to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The product collection's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The product collection's handle. If not provided, the value of this attribute is set to the slug version of the title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_ids","type":"`string`[]","description":"The products to associate with the collection.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of created product collections.","expandable":false,"children":[{"name":"ProductCollectionDTO[]","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductCollectionDTO","type":"`object`","description":"A product collection's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,45 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/createOptions
sidebar_label: createOptions
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# createOptions - Product Module Reference
This documentation provides a reference to the createOptions method. This belongs to the Product Module.
This method is used to create product options.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function createProductOption (title: string, productId: string) {
const productModule = await initializeProductModule()
const productOptions = await productModule.createOptions([
{
title,
product_id: productId
}
])
// do something with the product options or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[CreateProductOptionDTO](../../interfaces/product.CreateProductOptionDTO.mdx)[]","description":"The product options to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The product option's title.","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":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of created product options.","expandable":false,"children":[{"name":"ProductOptionDTO[]","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductOptionDTO","type":"`object`","description":"A product option's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,44 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/createTags
sidebar_label: createTags
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# createTags - Product Module Reference
This documentation provides a reference to the createTags method. This belongs to the Product Module.
This method is used to create product tags.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function createProductTags (values: string[]) {
const productModule = await initializeProductModule()
const productTags = await productModule.createTags(
values.map((value) => ({
value
}))
)
// do something with the product tags or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[CreateProductTagDTO](../../interfaces/product.CreateProductTagDTO.mdx)[]","description":"The product tags to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of product tags.","expandable":false,"children":[{"name":"ProductTagDTO[]","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductTagDTO","type":"`object`","description":"A product tag's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,44 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/createTypes
sidebar_label: createTypes
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# createTypes - Product Module Reference
This documentation provides a reference to the createTypes method. This belongs to the Product Module.
This method is used to create a product type.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function createProductType (value: string) {
const productModule = await initializeProductModule()
const productTypes = await productModule.createTypes([
{
value
}
])
// do something with the product types or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[CreateProductTypeDTO](../../interfaces/product.CreateProductTypeDTO.mdx)[]","description":"The product types to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The product type's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The product type's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of created product types.","expandable":false,"children":[{"name":"ProductTypeDTO[]","type":"[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductTypeDTO","type":"`object`","description":"A product type's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,43 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/createVariants
sidebar_label: createVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# createVariants - Product Module Reference
This documentation provides a reference to the createVariants method. This belongs to the Product Module.
This method is used to create variants for a product.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function createProductVariants (items: {
product_id: string,
title: string
}[]) {
const productModule = await initializeProductModule()
const productVariants = await productModule.createVariants(items)
// do something with the product variants or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[CreateProductVariantDTO](../../interfaces/product.CreateProductVariantDTO.mdx)[]","description":"The product variants to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the product variant can be ordered when it's out of stock.","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":"height","type":"`number`","description":"The height of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string`","description":"The HS Code of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The inventory quantiy of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`number`","description":"The length of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether the product variant's inventory should be managed by the core system.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string`","description":"The material of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string`","description":"The MID Code of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductVariantOptionDTO](../../interfaces/product.CreateProductVariantOptionDTO.mdx)[]","description":"The product variant options to create and associate with the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of a product variant option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"origin_country","type":"`string`","description":"The origin country of the product variant.","optional":true,"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":"upc","type":"`string`","description":"The UPC of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`number`","description":"The weight of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`number`","description":"The width of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","descriptiLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created product variants' details.","expandable":false,"children":[{"name":"ProductVariantDTO[]","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductVariantDTO","type":"`object`","description":"A product variant's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,38 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/delete
sidebar_label: delete
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# delete - Product Module Reference
This documentation provides a reference to the delete method. This belongs to the Product Module.
This method is used to delete products. Unlike the [softDelete](product.IProductModuleService.softDelete.mdx) method, this method will completely remove the products and they can no longer be accessed or retrieved.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteProducts (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.delete(ids)
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string`[]","description":"The IDs of the products to be deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the products are successfully deleted.","expandable":false,"children":[]}]} />
@@ -0,0 +1,38 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/deleteCategory
sidebar_label: deleteCategory
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# deleteCategory - Product Module Reference
This documentation provides a reference to the deleteCategory method. This belongs to the Product Module.
This method is used to delete a product category by its ID.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteCategory (id: string) {
const productModule = await initializeProductModule()
await productModule.deleteCategory(id)
}
```
## Parameters
<ParameterTypes parameters={[{"name":"categoryId","type":"`string`","description":"The ID of the product category to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the product category is successfully deleted.","expandable":false,"children":[]}]} />
@@ -0,0 +1,38 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/deleteCollections
sidebar_label: deleteCollections
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# deleteCollections - Product Module Reference
This documentation provides a reference to the deleteCollections method. This belongs to the Product Module.
This method is used to delete collections by their ID.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteCollection (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.deleteCollections(ids)
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productCollectionIds","type":"`string`[]","description":"The IDs of the product collections to be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the product options are successfully deleted.","expandable":false,"children":[]}]} />
@@ -0,0 +1,38 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/deleteOptions
sidebar_label: deleteOptions
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# deleteOptions - Product Module Reference
This documentation provides a reference to the deleteOptions method. This belongs to the Product Module.
This method is used to delete a product option.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteProductOptions (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.deleteOptions(ids)
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productOptionIds","type":"`string`[]","description":"The IDs of the product options to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the product options are successfully deleted.","expandable":false,"children":[]}]} />
@@ -0,0 +1,39 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/deleteTags
sidebar_label: deleteTags
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# deleteTags - Product Module Reference
This documentation provides a reference to the deleteTags method. This belongs to the Product Module.
This method is used to delete product tags by their ID.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteProductTags (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.deleteTags(ids)
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productTagIds","type":"`string`[]","description":"The IDs of the product tags to be deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the product tags are successfully deleted.","expandable":false,"children":[]}]} />
@@ -0,0 +1,38 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/deleteTypes
sidebar_label: deleteTypes
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# deleteTypes - Product Module Reference
This documentation provides a reference to the deleteTypes method. This belongs to the Product Module.
This method is used to delete a product type.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteProductTypes (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.deleteTypes(ids)
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productTypeIds","type":"`string`[]","description":"The IDs of the product types to be deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the product types are successfully deleted.","expandable":false,"children":[]}]} />
@@ -0,0 +1,38 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/deleteVariants
sidebar_label: deleteVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# deleteVariants - Product Module Reference
This documentation provides a reference to the deleteVariants method. This belongs to the Product Module.
This method is used to delete ProductVariant. This method will completely remove the ProductVariant and they can no longer be accessed or retrieved.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteProducts (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.deleteVariants(ids)
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productVariantIds","type":"`string`[]","description":"The IDs of the ProductVariant to be deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the ProductVariant are successfully deleted.","expandable":false,"children":[]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/list
sidebar_label: list
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# list - Product Module Reference
This documentation provides a reference to the list method. This belongs to the Product Module.
This method is used to retrieve a paginated list of price sets based on optional filters and configuration.
## Example
To retrieve a list of products using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProducts (ids: string[]) {
const productModule = await initializeProductModule()
const products = await productModule.list({
id: ids
})
// do something with the products or return them
}
```
To specify relations that should be retrieved within the products:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProducts (ids: string[]) {
const productModule = await initializeProductModule()
const products = await productModule.list({
id: ids
}, {
relations: ["categories"]
})
// do something with the products or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProducts (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const products = await productModule.list({
id: ids
}, {
relations: ["categories"],
skip,
take
})
// do something with the products or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProducts (ids: string[], title: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const products = await productModule.list({
$and: [
{
id: ids
},
{
q: title
}
]
}, {
relations: ["categories"],
skip,
take
})
// do something with the products or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductProps](../../interfaces/product.FilterableProductProps.mdx)","description":"The filters to apply on the retrieved products.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductProps](../../interfaces/product.FilterableProductProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductProps](../../interfaces/product.FilterableProductProps.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.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductProps](../../interfaces/product.FilterableProductProps.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":"categories","type":"`object`","description":"Filters on a product's categories.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/product.OperatorMap.mdx)&#60;string&#62;","description":"IDs to filter categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter categories by whether they're active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter categories by whether they're internal","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"category_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/product.OperatorMap.mdx)&#60;string&#62;","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.mdx)&#60;string&#62;","description":"Filters a product by its associated collections.","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":"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":"tags","type":"`object`","description":"Filters on a product's tags.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`[]","description":"Values to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductDTO](../../interfaces/product.ProductDTO.mdx)&#62;","description":"The configurations determining how the products are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should aLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of products.","expandable":false,"children":[{"name":"ProductDTO[]","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductDTO","type":"`object`","description":"A product's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listAndCount
sidebar_label: listAndCount
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listAndCount - Product Module Reference
This documentation provides a reference to the listAndCount method. This belongs to the Product Module.
This method is used to retrieve a paginated list of products along with the total count of available products satisfying the provided filters.
## Example
To retrieve a list of products using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProducts (ids: string[]) {
const productModule = await initializeProductModule()
const [products, count] = await productModule.listAndCount({
id: ids
})
// do something with the products or return them
}
```
To specify relations that should be retrieved within the products:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProducts (ids: string[]) {
const productModule = await initializeProductModule()
const [products, count] = await productModule.listAndCount({
id: ids
}, {
relations: ["categories"]
})
// do something with the products or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProducts (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const [products, count] = await productModule.listAndCount({
id: ids
}, {
relations: ["categories"],
skip,
take
})
// do something with the products or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProducts (ids: string[], title: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const [products, count] = await productModule.listAndCount({
$and: [
{
id: ids
},
{
q: title
}
]
}, {
relations: ["categories"],
skip,
take
})
// do something with the products or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductProps](../../interfaces/product.FilterableProductProps.mdx)","description":"The filters to apply on the retrieved products.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductProps](../../interfaces/product.FilterableProductProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductProps](../../interfaces/product.FilterableProductProps.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.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductProps](../../interfaces/product.FilterableProductProps.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":"categories","type":"`object`","description":"Filters on a product's categories.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/product.OperatorMap.mdx)&#60;string&#62;","description":"IDs to filter categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter categories by whether they're active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter categories by whether they're internal","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"category_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/product.OperatorMap.mdx)&#60;string&#62;","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.mdx)&#60;string&#62;","description":"Filters a product by its associated collections.","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":"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":"tags","type":"`object`","description":"Filters on a product's tags.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`[]","description":"Values to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductDTO](../../interfaces/product.ProductDTO.mdx)&#62;","description":"The configurations determining how the products are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should aLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductDTO](../../interfaces/product.ProductDTO.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of products along with the total count.","expandable":false,"children":[{"name":"ProductDTO[]","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listAndCountCategories
sidebar_label: listAndCountCategories
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listAndCountCategories - Product Module Reference
This documentation provides a reference to the listAndCountCategories method. This belongs to the Product Module.
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
To retrieve a list of product categories using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategories (ids: string[]) {
const productModule = await initializeProductModule()
const [categories, count] = await productModule.listAndCountCategories({
id: ids
})
// do something with the product category or return it
}
```
To specify relations that should be retrieved within the product categories:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategories (ids: string[]) {
const productModule = await initializeProductModule()
const [categories, count] = await productModule.listAndCountCategories({
id: ids
}, {
relations: ["parent_category"]
})
// do something with the product category or return it
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategories (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const [categories, count] = await productModule.listAndCountCategories({
id: ids
}, {
relations: ["parent_category"],
skip,
take
})
// do something with the product category or return it
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategories (ids: string[], name: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const [categories, count] = await productModule.listAndCountCategories({
$or: [
{
id: ids
},
{
name
}
]
}, {
relations: ["parent_category"],
skip,
take
})
// do something with the product category or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.mdx)","description":"The filters to apply on the retrieved product categories.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.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":"([FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.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":"handle","type":"`string` \\| `string`[]","description":"The handles to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`","description":"Whether to include children of retrieved product categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter product categories by whether they're active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter product categories by whether they're internal.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"The names to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string` \\| `string`[]","description":"Filter product categories by their parent category's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)&#62;","description":"The configurations determining how the product categories are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product category.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel"Line truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of product categories along with their total count.","expandable":false,"children":[{"name":"ProductCategoryDTO[]","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listAndCountCollections
sidebar_label: listAndCountCollections
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listAndCountCollections - Product Module Reference
This documentation provides a reference to the listAndCountCollections method. This belongs to the Product Module.
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
To retrieve a list of product collections using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollections (ids: string[]) {
const productModule = await initializeProductModule()
const [collections, count] = await productModule.listAndCountCollections({
id: ids
})
// do something with the product collections or return them
}
```
To specify relations that should be retrieved within the product collections:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollections (ids: string[]) {
const productModule = await initializeProductModule()
const [collections, count] = await productModule.listAndCountCollections({
id: ids
}, {
relations: ["products"]
})
// do something with the product collections or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollections (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const [collections, count] = await productModule.listAndCountCollections({
id: ids
}, {
relations: ["products"],
skip,
take
})
// do something with the product collections or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollections (ids: string[], title: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const [collections, count] = await productModule.listAndCountCollections({
$and: [
{
id: ids
},
{
title
}
]
}, {
relations: ["products"],
skip,
take
})
// do something with the product collections or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.mdx)","description":"The filters applied on the retrieved product collections.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.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":"([FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.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":"handle","type":"`string` \\| `string`[]","description":"The handles to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)&#62;","description":"The configurations determining how the product collections are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product collection.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","typLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of product collections along with the total count.","expandable":false,"children":[{"name":"ProductCollectionDTO[]","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listAndCountOptions
sidebar_label: listAndCountOptions
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listAndCountOptions - Product Module Reference
This documentation provides a reference to the listAndCountOptions method. This belongs to the Product Module.
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
To retrieve a list of product options using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOptions (ids: string[]) {
const productModule = await initializeProductModule()
const [productOptions, count] = await productModule.listAndCountOptions({
id: ids
})
// do something with the product options or return them
}
```
To specify relations that should be retrieved within the product types:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOptions (ids: string[]) {
const productModule = await initializeProductModule()
const [productOptions, count] = await productModule.listAndCountOptions({
id: ids
}, {
relations: ["product"]
})
// do something with the product options or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOptions (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const [productOptions, count] = await productModule.listAndCountOptions({
id: ids
}, {
relations: ["product"],
skip,
take
})
// do something with the product options or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOptions (ids: string[], title: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const [productOptions, count] = await productModule.listAndCountOptions({
$and: [
{
id: ids
},
{
title
}
]
}, {
relations: ["product"],
skip,
take
})
// do something with the product options or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.mdx)","description":"The filters applied on the retrieved product options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.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":"([FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the product options by their associated products' IDs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The titles to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)&#62;","description":"The configurations determining how the product options are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product option.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of aLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of product options along with the total count.","expandable":false,"children":[{"name":"ProductOptionDTO[]","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listAndCountTags
sidebar_label: listAndCountTags
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listAndCountTags - Product Module Reference
This documentation provides a reference to the listAndCountTags method. This belongs to the Product Module.
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
To retrieve a list of product tags using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagIds: string[]) {
const productModule = await initializeProductModule()
const [productTags, count] = await productModule.listAndCountTags({
id: tagIds
})
// do something with the product tags or return them
}
```
To specify relations that should be retrieved within the product tags:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagIds: string[]) {
const productModule = await initializeProductModule()
const [productTags, count] = await productModule.listAndCountTags({
id: tagIds
}, {
relations: ["products"]
})
// do something with the product tags or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagIds: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const [productTags, count] = await productModule.listAndCountTags({
id: tagIds
}, {
relations: ["products"],
skip,
take
})
// do something with the product tags or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagIds: string[], value: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const [productTags, count] = await productModule.listAndCountTags({
$and: [
{
id: tagIds
},
{
value
}
]
}, {
relations: ["products"],
skip,
take
})
// do something with the product tags or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.mdx)","description":"The filters applied on the retrieved product tags.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.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":"([FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)&#62;","description":"The configurations determining how the product tags are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product tag.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of product tags along with the total count.","expandable":false,"children":[{"name":"ProductTagDTO[]","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listAndCountTypes
sidebar_label: listAndCountTypes
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listAndCountTypes - Product Module Reference
This documentation provides a reference to the listAndCountTypes method. This belongs to the Product Module.
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
To retrieve a list of product types using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTypes (ids: string[]) {
const productModule = await initializeProductModule()
const [productTypes, count] = await productModule.listAndCountTypes({
id: ids
})
// do something with the product types or return them
}
```
To specify attributes that should be retrieved within the product types:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTypes (ids: string[]) {
const productModule = await initializeProductModule()
const [productTypes, count] = await productModule.listAndCountTypes({
id: ids
}, {
select: ["value"]
})
// do something with the product types or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTypes (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const [productTypes, count] = await productModule.listAndCountTypes({
id: ids
}, {
select: ["value"],
skip,
take
})
// do something with the product types or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTypes (ids: string[], value: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const [productTypes, count] = await productModule.listAndCountTypes({
$and: [
{
id: ids
},
{
value
}
]
}, {
select: ["value"],
skip,
take
})
// do something with the product types or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.mdx)","description":"The filters to be applied on the retrieved product type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.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":"([FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value to filter product types by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)&#62;","description":"The configurations determining how the product types are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of product types along with their total count.","expandable":false,"children":[{"name":"ProductTypeDTO[]","type":"[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listAndCountVariants
sidebar_label: listAndCountVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listAndCountVariants - Product Module Reference
This documentation provides a reference to the listAndCountVariants method. This belongs to the Product Module.
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
To retrieve a list of product variants using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariants (ids: string[]) {
const productModule = await initializeProductModule()
const [variants, count] = await productModule.listAndCountVariants({
id: ids
})
// do something with the product variants or return them
}
```
To specify relations that should be retrieved within the product variants:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariants (ids: string[]) {
const productModule = await initializeProductModule()
const [variants, count] = await productModule.listAndCountVariants({
id: ids
}, {
relations: ["options"]
})
// do something with the product variants or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariants (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const [variants, count] = await productModule.listAndCountVariants({
id: ids
}, {
relations: ["options"],
skip,
take
})
// do something with the product variants or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariants (ids: string[], sku: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const [variants, count] = await productModule.listAndCountVariants({
$and: [
{
id: ids
},
{
sku
}
]
}, {
relations: ["options"],
skip,
take
})
// do something with the product variants or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.mdx)","description":"The filters applied on the retrieved product variants.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.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":"([FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product variants by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`","description":"Filter product variants by their associated options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"IDs to filter options by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the product variants by their associated products' IDs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `string`[]","description":"The SKUs to filter product variants by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)&#62;","description":"The configurations determining how the product variants are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product variant.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of tLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of product variants along with their total count.","expandable":false,"children":[{"name":"ProductVariantDTO[]","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listCategories
sidebar_label: listCategories
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listCategories - Product Module Reference
This documentation provides a reference to the listCategories method. This belongs to the Product Module.
This method is used to retrieve a paginated list of product categories based on optional filters and configuration.
## Example
To retrieve a list of product categories using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategories (ids: string[]) {
const productModule = await initializeProductModule()
const categories = await productModule.listCategories({
id: ids
})
// do something with the product category or return it
}
```
To specify relations that should be retrieved within the product categories:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategories (ids: string[]) {
const productModule = await initializeProductModule()
const categories = await productModule.listCategories({
id: ids
}, {
relations: ["parent_category"]
})
// do something with the product category or return it
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategories (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const categories = await productModule.listCategories({
id: ids
}, {
relations: ["parent_category"],
skip,
take
})
// do something with the product category or return it
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategories (ids: string[], name: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const categories = await productModule.listCategories({
$or: [
{
id: ids
},
{
name
}
]
}, {
relations: ["parent_category"],
skip,
take
})
// do something with the product category or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.mdx)","description":"The filters to be applied on the retrieved product categories.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.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":"([FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductCategoryProps](../../interfaces/product.FilterableProductCategoryProps.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":"handle","type":"`string` \\| `string`[]","description":"The handles to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`","description":"Whether to include children of retrieved product categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter product categories by whether they're active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter product categories by whether they're internal.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"The names to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string` \\| `string`[]","description":"Filter product categories by their parent category's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)&#62;","description":"The configurations determining how the product categories are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product category.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of product categories.","expandable":false,"children":[{"name":"ProductCategoryDTO[]","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductCategoryDTO","type":"`object`","description":"A product category's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listCollections
sidebar_label: listCollections
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listCollections - Product Module Reference
This documentation provides a reference to the listCollections method. This belongs to the Product Module.
This method is used to retrieve a paginated list of product collections based on optional filters and configuration.
## Example
To retrieve a list of product collections using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollections (ids: string[]) {
const productModule = await initializeProductModule()
const collections = await productModule.listCollections({
id: ids
})
// do something with the product collections or return them
}
```
To specify relations that should be retrieved within the product collections:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollections (ids: string[]) {
const productModule = await initializeProductModule()
const collections = await productModule.listCollections({
id: ids
}, {
relations: ["products"]
})
// do something with the product collections or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollections (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const collections = await productModule.listCollections({
id: ids
}, {
relations: ["products"],
skip,
take
})
// do something with the product collections or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollections (ids: string[], title: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const collections = await productModule.listCollections({
$and: [
{
id: ids
},
{
title
}
]
}, {
relations: ["products"],
skip,
take
})
// do something with the product collections or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.mdx)","description":"The filters applied on the retrieved product collections.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.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":"([FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductCollectionProps](../../interfaces/product.FilterableProductCollectionProps.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":"handle","type":"`string` \\| `string`[]","description":"The handles to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)&#62;","description":"The configurations determining how the product collections are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product collection.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","typLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of product collections.","expandable":false,"children":[{"name":"ProductCollectionDTO[]","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductCollectionDTO","type":"`object`","description":"A product collection's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listOptions
sidebar_label: listOptions
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listOptions - Product Module Reference
This documentation provides a reference to the listOptions method. This belongs to the Product Module.
This method is used to retrieve a paginated list of product options based on optional filters and configuration.
## Example
To retrieve a list of product options using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOptions (ids: string[]) {
const productModule = await initializeProductModule()
const productOptions = await productModule.listOptions({
id: ids
})
// do something with the product options or return them
}
```
To specify relations that should be retrieved within the product types:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOptions (ids: string[]) {
const productModule = await initializeProductModule()
const productOptions = await productModule.listOptions({
id: ids
}, {
relations: ["product"]
})
// do something with the product options or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOptions (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const productOptions = await productModule.listOptions({
id: ids
}, {
relations: ["product"],
skip,
take
})
// do something with the product options or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOptions (ids: string[], title: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const productOptions = await productModule.listOptions({
$and: [
{
id: ids
},
{
title
}
]
}, {
relations: ["product"],
skip,
take
})
// do something with the product options or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.mdx)","description":"The filters applied on the retrieved product options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.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":"([FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductOptionProps](../../interfaces/product.FilterableProductOptionProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the product options by their associated products' IDs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The titles to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)&#62;","description":"The configurations determining how the product options are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product option.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of aLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of product options.","expandable":false,"children":[{"name":"ProductOptionDTO[]","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductOptionDTO","type":"`object`","description":"A product option's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listTags
sidebar_label: listTags
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listTags - Product Module Reference
This documentation provides a reference to the listTags method. This belongs to the Product Module.
This method is used to retrieve a paginated list of tags based on optional filters and configuration.
## Example
To retrieve a list of product tags using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagIds: string[]) {
const productModule = await initializeProductModule()
const productTags = await productModule.listTags({
id: tagIds
})
// do something with the product tags or return them
}
```
To specify relations that should be retrieved within the product tags:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagIds: string[]) {
const productModule = await initializeProductModule()
const productTags = await productModule.listTags({
id: tagIds
}, {
relations: ["products"]
})
// do something with the product tags or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagIds: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const productTags = await productModule.listTags({
id: tagIds
}, {
relations: ["products"],
skip,
take
})
// do something with the product tags or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagIds: string[], value: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const productTags = await productModule.listTags({
$and: [
{
id: tagIds
},
{
value
}
]
}, {
relations: ["products"],
skip,
take
})
// do something with the product tags or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.mdx)","description":"The filters applied on the retrieved product tags.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.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":"([FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductTagProps](../../interfaces/product.FilterableProductTagProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)&#62;","description":"The configurations determining how the product tags are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product tag.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of product tags.","expandable":false,"children":[{"name":"ProductTagDTO[]","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductTagDTO","type":"`object`","description":"A product tag's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listTypes
sidebar_label: listTypes
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listTypes - Product Module Reference
This documentation provides a reference to the listTypes method. This belongs to the Product Module.
This method is used to retrieve a paginated list of product types based on optional filters and configuration.
## Example
To retrieve a list of product types using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTypes (ids: string[]) {
const productModule = await initializeProductModule()
const productTypes = await productModule.listTypes({
id: ids
})
// do something with the product types or return them
}
```
To specify attributes that should be retrieved within the product types:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTypes (ids: string[]) {
const productModule = await initializeProductModule()
const productTypes = await productModule.listTypes({
id: ids
}, {
select: ["value"]
})
// do something with the product types or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTypes (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const productTypes = await productModule.listTypes({
id: ids
}, {
select: ["value"],
skip,
take
})
// do something with the product types or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTypes (ids: string[], value: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const productTypes = await productModule.listTypes({
$and: [
{
id: ids
},
{
value
}
]
}, {
select: ["value"],
skip,
take
})
// do something with the product types or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.mdx)","description":"The filters to apply on the retrieved product types.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.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":"([FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductTypeProps](../../interfaces/product.FilterableProductTypeProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value to filter product types by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)&#62;","description":"The configurations determining how the product types are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of product types.","expandable":false,"children":[{"name":"ProductTypeDTO[]","type":"[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductTypeDTO","type":"`object`","description":"A product type's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,115 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/listVariants
sidebar_label: listVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# listVariants - Product Module Reference
This documentation provides a reference to the listVariants method. This belongs to the Product Module.
This method is used to retrieve a paginated list of product variants based on optional filters and configuration.
## Example
To retrieve a list of product variants using their IDs:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariants (ids: string[]) {
const productModule = await initializeProductModule()
const variants = await productModule.listVariants({
id: ids
})
// do something with the product variants or return them
}
```
To specify relations that should be retrieved within the product variants:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariants (ids: string[]) {
const productModule = await initializeProductModule()
const variants = await productModule.listVariants({
id: ids
}, {
relations: ["options"]
})
// do something with the product variants or return them
}
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariants (ids: string[], skip: number, take: number) {
const productModule = await initializeProductModule()
const variants = await productModule.listVariants({
id: ids
}, {
relations: ["options"],
skip,
take
})
// do something with the product variants or return them
}
```
You can also use the `$and` or `$or` properties of the `filter` parameter to use and/or conditions in your filters. For example:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariants (ids: string[], sku: string, skip: number, take: number) {
const productModule = await initializeProductModule()
const variants = await productModule.listVariants({
$and: [
{
id: ids
},
{
sku
}
]
}, {
relations: ["options"],
skip,
take
})
// do something with the product variants or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"filters","type":"[FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.mdx)","description":"The filters applied on the retrieved product variants.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.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":"([FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.mdx) \\| [BaseFilterable](../../interfaces/product.BaseFilterable.mdx)&#60;[FilterableProductVariantProps](../../interfaces/product.FilterableProductVariantProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product variants by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`","description":"Filter product variants by their associated options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"IDs to filter options by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the product variants by their associated products' IDs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `string`[]","description":"The SKUs to filter product variants by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)&#62;","description":"The configurations determining how the product variants are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product variant.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of tLine truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of product variants.","expandable":false,"children":[{"name":"ProductVariantDTO[]","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductVariantDTO","type":"`object`","description":"A product variant's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,42 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/restore
sidebar_label: restore
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# restore - Product Module Reference
This documentation provides a reference to the restore method. This belongs to the Product Module.
This method is used to restore products which were deleted using the [softDelete](product.IProductModuleService.softDelete.mdx) method.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function restoreProducts (ids: string[]) {
const productModule = await initializeProductModule()
const cascadedEntities = await productModule.restore(ids, {
returnLinkableKeys: ["variant_id"]
})
// do something with the returned cascaded entity IDs or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string`[]","description":"The IDs of the products to restore.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../interfaces/product.RestoreReturn.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to restore along with each of the products. You can pass to its `returnLinkableKeys`\nproperty any of the product's relation attribute names, such as `variant_id`.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"`TReturnableLinkableKeys`[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored, such as the ID of associated product variants. The object's keys are the ID attribute names of the product entity's relations, such as `variant_id`, and its value is an array of strings, each being the ID of the record associated with the product through this relation, such as the IDs of associated product variants.\n\nIf there are no related records that were restored, the promise resolved to `void`.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,39 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/restoreVariants
sidebar_label: restoreVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# restoreVariants - Product Module Reference
This documentation provides a reference to the restoreVariants method. This belongs to the Product Module.
This method is used to restore product varaints that were soft deleted. Product variants are soft deleted when they're not
provided in a product's details passed to the [update](product.IProductModuleService.update.mdx) method.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function restoreProductVariants (ids: string[]) {
const productModule = await initializeProductModule()
await productModule.restoreVariants(ids)
}
```
## Parameters
<ParameterTypes parameters={[{"name":"variantIds","type":"`string`[]","description":"The IDs of the variants to restore.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../interfaces/product.RestoreReturn.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to restore along with each of the product variants. You can pass to its `returnLinkableKeys`\nproperty any of the product variant's relation attribute names.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"`TReturnableLinkableKeys`[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored. The object's keys are the ID attribute names of the product variant entity's relations \nand its value is an array of strings, each being the ID of the record associated with the product variant through this relation.\n\nIf there are no related records that were restored, the promise resolved to `void`.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,60 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/retrieve
sidebar_label: retrieve
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# retrieve - Product Module Reference
This documentation provides a reference to the retrieve method. This belongs to the Product Module.
This method is used to retrieve a product by its ID
## Example
A simple example that retrieves a product by its ID:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProduct (id: string) {
const productModule = await initializeProductModule()
const product = await productModule.retrieve(id)
// do something with the product or return it
}
```
To specify relations that should be retrieved:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProduct (id: string) {
const productModule = await initializeProductModule()
const product = await productModule.retrieve(id, {
relations: ["categories"]
})
// do something with the product or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"The ID of the product to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductDTO](../../interfaces/product.ProductDTO.mdx)&#62;","description":"The configurations determining how the product is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductDTO](../../interfaces/product.ProductDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved product.","expandable":false,"children":[{"name":"collection","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)","description":"The associated product collection.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"handle","type":"`string`","description":"The handle of the product collection. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product collection was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]","description":"The associated products.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"id","type":"`string`","description":"The ID of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[ProductImageDTO](../../interfaces/product.ProductImageDTO.mdx)[]","description":"The associated product images.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the product image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product image was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)","description":"The associated product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the product option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[ProductOptionValueDTO](../../interfaces/product.ProductOptionValueDTO.mdx)[]","description":"The associated product option values.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product option was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[ProductStatus](../../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"DRAFT","type":"`\"draft\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROPOSED","type":"`\"proposed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PUBLISHED","type":"`\"published\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"REJECTED","type":"`\"rejected\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tags","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","description":"The associated product tags.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"Line truncated
@@ -0,0 +1,60 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/retrieveCategory
sidebar_label: retrieveCategory
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# retrieveCategory - Product Module Reference
This documentation provides a reference to the retrieveCategory method. This belongs to the Product Module.
This method is used to retrieve a product category by its ID.
## Example
A simple example that retrieves a product category by its ID:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategory (id: string) {
const productModule = await initializeProductModule()
const category = await productModule.retrieveCategory(id)
// do something with the product category or return it
}
```
To specify relations that should be retrieved:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCategory (id: string) {
const productModule = await initializeProductModule()
const category = await productModule.retrieveCategory(id, {
relations: ["parent_category"]
})
// do something with the product category or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productCategoryId","type":"`string`","description":"The ID of the product category to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)&#62;","description":"The configurations determining how the product category is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product category.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved product category.","expandable":false,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)","description":"The associated parent category.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the product category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)","description":"The associated parent category.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.Line truncated
@@ -0,0 +1,60 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/retrieveCollection
sidebar_label: retrieveCollection
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# retrieveCollection - Product Module Reference
This documentation provides a reference to the retrieveCollection method. This belongs to the Product Module.
This method is used to retrieve a product collection by its ID.
## Example
A simple example that retrieves a product collection by its ID:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollection (id: string) {
const productModule = await initializeProductModule()
const collection = await productModule.retrieveCollection(id)
// do something with the product collection or return it
}
```
To specify relations that should be retrieved:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveCollection (id: string) {
const productModule = await initializeProductModule()
const collection = await productModule.retrieveCollection(id, {
relations: ["products"]
})
// do something with the product collection or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productCollectionId","type":"`string`","description":"The ID of the product collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)&#62;","description":"The configurations determining how the product collection is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product collection.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved product collection.","expandable":false,"children":[{"name":"handle","type":"`string`","description":"The handle of the product collection. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product collection was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]","description":"The associated products.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"collection","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)","description":"The associated product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[ProductImageDTO](../../interfaces/product.ProductImageDTO.mdx)[]","description":"The associated product images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"status","type":"[ProductStatus](../../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","description":"The associated product tags.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]","description":"The associated product type.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]","description":"The associated product variants.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"`null` \\| [ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated product categories.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain\na reference to the ID in the integrated service.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`null` \\| `string`","description":"The handle of the product. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `Line truncated
@@ -0,0 +1,60 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/retrieveOption
sidebar_label: retrieveOption
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# retrieveOption - Product Module Reference
This documentation provides a reference to the retrieveOption method. This belongs to the Product Module.
This method is used to retrieve a product option by its ID.
## Example
A simple example that retrieves a product option by its ID:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOption (id: string) {
const productModule = await initializeProductModule()
const productOption = await productModule.retrieveOption(id)
// do something with the product option or return it
}
```
To specify relations that should be retrieved:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductOption (id: string) {
const productModule = await initializeProductModule()
const productOption = await productModule.retrieveOption(id, {
relations: ["product"]
})
// do something with the product option or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"optionId","type":"`string`","description":"The ID of the product option to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)&#62;","description":"The configurations determining how the product option is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product option.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved product option.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)","description":"The associated product.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"collection","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)","description":"The associated product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[ProductImageDTO](../../interfaces/product.ProductImageDTO.mdx)[]","description":"The associated product images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"status","type":"[ProductStatus](../../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","description":"The associated product tags.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]","description":"The associated product type.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]","description":"The associated product variants.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"`null` \\| [ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated product categories.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain\na reference to the ID in the integrated service.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`null` \\| `string`","description":"The handle of the product. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The MID Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin country of the product.","optional":true,"defaLine truncated
@@ -0,0 +1,60 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/retrieveTag
sidebar_label: retrieveTag
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# retrieveTag - Product Module Reference
This documentation provides a reference to the retrieveTag method. This belongs to the Product Module.
This method is used to retrieve a tag by its ID.
## Example
A simple example that retrieves a product tag by its ID:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagId: string) {
const productModule = await initializeProductModule()
const productTag = await productModule.retrieveTag(tagId)
// do something with the product tag or return it
}
```
To specify relations that should be retrieved:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductTag (tagId: string) {
const productModule = await initializeProductModule()
const productTag = await productModule.retrieveTag(tagId, {
relations: ["products"]
})
// do something with the product tag or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"tagId","type":"`string`","description":"The ID of the tag to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)&#62;","description":"The configurations determining how the product tag is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product tag.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved product tag.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]","description":"The associated products.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"collection","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)","description":"The associated product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[ProductImageDTO](../../interfaces/product.ProductImageDTO.mdx)[]","description":"The associated product images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"status","type":"[ProductStatus](../../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","description":"The associated product tags.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]","description":"The associated product type.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]","description":"The associated product variants.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"`null` \\| [ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated product categories.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain\na reference to the ID in the integrated service.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`null` \\| `string`","description":"The handle of the product. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValuLine truncated
@@ -0,0 +1,60 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/retrieveType
sidebar_label: retrieveType
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# retrieveType - Product Module Reference
This documentation provides a reference to the retrieveType method. This belongs to the Product Module.
This method is used to retrieve a product type by its ID.
## Example
A simple example that retrieves a product type by its ID:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductType (id: string) {
const productModule = await initializeProductModule()
const productType = await productModule.retrieveType(id)
// do something with the product type or return it
}
```
To specify attributes that should be retrieved:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductType (id: string) {
const productModule = await initializeProductModule()
const productType = await productModule.retrieveType(id, {
select: ["value"]
})
// do something with the product type or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"typeId","type":"`string`","description":"The ID of the product type to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)&#62;","description":"The configurations determining how the product type is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved product type.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product type was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,60 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/retrieveVariant
sidebar_label: retrieveVariant
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# retrieveVariant - Product Module Reference
This documentation provides a reference to the retrieveVariant method. This belongs to the Product Module.
This method is used to retrieve a product variant by its ID.
## Example
A simple example that retrieves a product variant by its ID:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariant (id: string) {
const productModule = await initializeProductModule()
const variant = await productModule.retrieveVariant(id)
// do something with the product variant or return it
}
```
To specify relations that should be retrieved:
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function retrieveProductVariant (id: string) {
const productModule = await initializeProductModule()
const variant = await productModule.retrieveVariant(id, {
relations: ["options"]
})
// do something with the product variant or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productVariantId","type":"`string`","description":"The ID of the product variant to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../interfaces/product.FindConfig.mdx)&#60;[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)&#62;","description":"The configurations determining how the product variant is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a product variant.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved product variant.","expandable":false,"children":[{"name":"created_at","type":"`string` \\| `Date`","description":"When the product variant was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product variant was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The inventory quantiy of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionValueDTO](../../interfaces/product.ProductOptionValueDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product option value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)","description":"The associated product option. It may only be available if the `option` relation is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product option value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)","description":"The associated product variant. It may only be available if the `variant` relation is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product option value was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"product","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)","description":"The associated product.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"collection","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)","description":"The associated product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[ProductImageDTO](../../interfaces/product.ProductImageDTO.mdx)[]","description":"The associated product images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"status","type":"[ProductStatus](../../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","description":"The associated product tags.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]","description":"The associated product type.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]","description":"The associated product variants.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"`null` \\| [ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated product categories.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product was deleted.","optional":true,"defaultValue":"","expandable":false,"childreLine truncated
@@ -0,0 +1,42 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/softDelete
sidebar_label: softDelete
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# softDelete - Product Module Reference
This documentation provides a reference to the softDelete method. This belongs to the Product Module.
This method is used to delete products. Unlike the [delete](product.IProductModuleService.delete.mdx) method, this method won't completely remove the product. It can still be accessed or retrieved using methods like [retrieve](product.IProductModuleService.retrieve.mdx) if you pass the `withDeleted` property to the `config` object parameter.
The soft-deleted products can be restored using the [restore](product.IProductModuleService.restore.mdx) method.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function deleteProducts (ids: string[]) {
const productModule = await initializeProductModule()
const cascadedEntities = await productModule.softDelete(ids)
// do something with the returned cascaded entity IDs or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string`[]","description":"The IDs of the products to soft-delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../interfaces/product.SoftDeleteReturn.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to soft delete along with the each of the products. You can pass to its `returnLinkableKeys`\nproperty any of the product's relation attribute names, such as `variant_id`.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"`TReturnableLinkableKeys`[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted, such as the ID of associated product variants. The object's keys are the ID attribute names of the product entity's relations, such as `variant_id`, and its value is an array of strings, each being the ID of a record associated with the product through this relation, such as the IDs of associated product variants.\n\nIf there are no related records, the promise resolved to `void`.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} />
@@ -0,0 +1,45 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/update
sidebar_label: update
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# update - Product Module Reference
This documentation provides a reference to the update method. This belongs to the Product Module.
This method is used to update a product.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function updateProduct (id: string, title: string) {
const productModule = await initializeProductModule()
const products = await productModule.update([
{
id,
title
}
])
// do something with the products or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[UpdateProductDTO](../../interfaces/product.UpdateProductDTO.mdx)[]","description":"The products to be updated, each holding the attributes that should be updated in the product.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`object`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to be associated with 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":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","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":"height","type":"`number`","description":"The height of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string`","description":"The HS Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"`string`[] \\| `object`[]","description":"The product's images. If an array of strings is supplied, each string will be a URL and a `ProductImage` will be created\nand associated with the product. If an array of objects is supplied, you can pass along the ID of an existing `ProductImage`.","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":"length","type":"`number`","description":"The length of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string`","description":"The material of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string`","description":"The MID Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](../../interfaces/product.CreateProductOptionDTO.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":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"origin_country","type":"`string`","description":"The origin country of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"DRAFT","type":"`\"draft\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROPOSED","type":"`\"proposed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PUBLISHED","type":"`\"published\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"REJECTED","type":"`\"rejected\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[CreateProductTagDTO](../../interfaces/product.CreateProductTagDTO.mdx)[]","description":"The product tags to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]}]Line truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of updated products.","expandable":false,"children":[{"name":"ProductDTO[]","type":"[ProductDTO](../../interfaces/product.ProductDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductDTO","type":"`object`","description":"A product's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,42 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/updateCategory
sidebar_label: updateCategory
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# updateCategory - Product Module Reference
This documentation provides a reference to the updateCategory method. This belongs to the Product Module.
This method is used to update a product category by its ID.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function updateCategory (id: string, name: string) {
const productModule = await initializeProductModule()
const category = await productModule.updateCategory(id, {
name,
})
// do something with the product category or return it
}
```
## Parameters
<ParameterTypes parameters={[{"name":"categoryId","type":"`string`","description":"The ID of the product category to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateProductCategoryDTO](../../interfaces/product.UpdateProductCategoryDTO.mdx)","description":"The attributes to update in th product category.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"handle","type":"`string`","description":"The handle of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The ID of the parent product category, if it has any.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated product category.","expandable":false,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)","description":"The associated parent category.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the product category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)","description":"The associated parent category.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](../../interfaces/product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.",Line truncated
@@ -0,0 +1,45 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/updateCollections
sidebar_label: updateCollections
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# updateCollections - Product Module Reference
This documentation provides a reference to the updateCollections method. This belongs to the Product Module.
This method is used to update existing product collections.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function updateCollection (id: string, title: string) {
const productModule = await initializeProductModule()
const collections = await productModule.updateCollections([
{
id,
title
}
])
// do something with the product collections or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[UpdateProductCollectionDTO](../../interfaces/product.UpdateProductCollectionDTO.mdx)[]","description":"The product collections to be updated, each holding the attributes that should be updated in the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product collection to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product collection.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_ids","type":"`string`[]","description":"The IDs of the products to associate with the product collection.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product collection.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product collection.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of updated product collections.","expandable":false,"children":[{"name":"ProductCollectionDTO[]","type":"[ProductCollectionDTO](../../interfaces/product.ProductCollectionDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductCollectionDTO","type":"`object`","description":"A product collection's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,45 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/updateOptions
sidebar_label: updateOptions
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# updateOptions - Product Module Reference
This documentation provides a reference to the updateOptions method. This belongs to the Product Module.
This method is used to update existing product options.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function updateProductOption (id: string, title: string) {
const productModule = await initializeProductModule()
const productOptions = await productModule.updateOptions([
{
id,
title
}
])
// do something with the product options or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[UpdateProductOptionDTO](../../interfaces/product.UpdateProductOptionDTO.mdx)[]","description":"The product options to be updated, each holding the attributes that should be updated in the product option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of updated product options.","expandable":false,"children":[{"name":"ProductOptionDTO[]","type":"[ProductOptionDTO](../../interfaces/product.ProductOptionDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductOptionDTO","type":"`object`","description":"A product option's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,45 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/updateTags
sidebar_label: updateTags
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# updateTags - Product Module Reference
This documentation provides a reference to the updateTags method. This belongs to the Product Module.
This method is used to update existing product tags.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function updateProductTag (id: string, value: string) {
const productModule = await initializeProductModule()
const productTags = await productModule.updateTags([
{
id,
value
}
])
// do something with the product tags or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[UpdateProductTagDTO](../../interfaces/product.UpdateProductTagDTO.mdx)[]","description":"The product tags to be updated, each having the attributes that should be updated in a product tag.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product tag to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product tag.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of updated product tags.","expandable":false,"children":[{"name":"ProductTagDTO[]","type":"[ProductTagDTO](../../interfaces/product.ProductTagDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductTagDTO","type":"`object`","description":"A product tag's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,45 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/updateTypes
sidebar_label: updateTypes
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# updateTypes - Product Module Reference
This documentation provides a reference to the updateTypes method. This belongs to the Product Module.
This method is used to update a product type
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function updateProductType (id: string, value: string) {
const productModule = await initializeProductModule()
const productTypes = await productModule.updateTypes([
{
id,
value
}
])
// do something with the product types or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[UpdateProductTypeDTO](../../interfaces/product.UpdateProductTypeDTO.mdx)[]","description":"The product types to be updated, each having the attributes that should be updated in the product type.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product type to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The new value of the product type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of updated product types.","expandable":false,"children":[{"name":"ProductTypeDTO[]","type":"[ProductTypeDTO](../../interfaces/product.ProductTypeDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductTypeDTO","type":"`object`","description":"A product type's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -0,0 +1,43 @@
---
displayed_sidebar: productReference
badge:
variant: orange
text: Beta
slug: /references/product/updateVariants
sidebar_label: updateVariants
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# updateVariants - Product Module Reference
This documentation provides a reference to the updateVariants method. This belongs to the Product Module.
This method is used to update a product's variants.
## Example
```ts
import {
initialize as initializeProductModule,
} from "@medusajs/product"
import {
UpdateProductVariantDTO
} from "@medusajs/product/dist/types/services/product-variant"
async function updateProductVariants (items: UpdateProductVariantDTO[]) {
const productModule = await initializeProductModule()
const productVariants = await productModule.updateVariants(items)
// do something with the product variants or return them
}
```
## Parameters
<ParameterTypes parameters={[{"name":"data","type":"[UpdateProductVariantDTO](../../interfaces/product.UpdateProductVariantDTO.mdx)[]","description":"The product variants to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the product variant can be ordered when it's out of stock.","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":"height","type":"`number`","description":"The height of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string`","description":"The HS Code of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The inventory quantiy of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`number`","description":"The length of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether the product variant's inventory should be managed by the core system.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string`","description":"The material of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string`","description":"The MID Code of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductVariantOptionDTO](../../interfaces/product.CreateProductVariantOptionDTO.mdx)[]","description":"The product variant options to create and associate with the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of a product variant option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"origin_country","type":"`string`","description":"The origin country of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The tile 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":"weight","type":"`number`","description":"The weight of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`number`","description":"The width of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../interfaces/product.Context.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`"Line truncated
## Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated product variants's details.","expandable":false,"children":[{"name":"ProductVariantDTO[]","type":"[ProductVariantDTO](../../interfaces/product.ProductVariantDTO.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductVariantDTO","type":"`object`","description":"A product variant's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} />
@@ -10,35 +10,6 @@ An object used to allow specifying flexible queries with and/or conditions.
## Type parameters
<ParameterTypes parameters={[
{
"name": "T",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
<ParameterTypes parameters={[
{
"name": "$and",
"type": "(`T` \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;T&#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": "(`T` \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;T&#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": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"(`T` \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;T&#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":"(`T` \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;T&#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":[]}]} />
@@ -10,62 +10,6 @@ A shared context object that is used to share resources between the application
## Type parameters
<ParameterTypes parameters={[
{
"name": "TManager",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"TManager","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
<ParameterTypes parameters={[
{
"name": "enableNestedTransactions",
"type": "`boolean`",
"description": "A boolean value indicating whether nested transactions are enabled.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "isolationLevel",
"type": "`string`",
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manager",
"type": "`TManager`",
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionId",
"type": "`string`",
"description": "A string indicating the ID of the current transaction.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionManager",
"type": "`TManager`",
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`TManager`","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"`TManager`","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,68 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product category to create.
<ParameterTypes parameters={[
{
"name": "handle",
"type": "`string`",
"description": "The product category's handle.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The product category's name.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category_id",
"type": "`null` \\| `string`",
"description": "The ID of the parent product category, if it has any.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"name","type":"`string`","description":"The product category's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The ID of the parent product category, if it has any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The product category's handle.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,41 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product collection to create.
<ParameterTypes parameters={[
{
"name": "handle",
"type": "`string`",
"description": "The product collection's handle. If not provided, the value of this attribute is set to the slug version of the title.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_ids",
"type": "`string`[]",
"description": "The products to associate with the collection.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The product collection's title.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"title","type":"`string`","description":"The product collection's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The product collection's handle. If not provided, the value of this attribute is set to the slug version of the title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_ids","type":"`string`[]","description":"The products to associate with the collection.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,525 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product to create.
<ParameterTypes parameters={[
{
"name": "categories",
"type": "`object`[]",
"description": "The product categories to associate with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "collection_id",
"type": "`string`",
"description": "The product collection to be associated with 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": "discountable",
"type": "`boolean`",
"description": "Whether the product can be discounted.",
"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": "height",
"type": "`number`",
"description": "The height of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`string`",
"description": "The HS Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "images",
"type": "`string`[] \\| `object`[]",
"description": "The product's images. If an array of strings is supplied, each string will be a URL and a `ProductImage` will be created\nand associated with the product. If an array of objects is supplied, you can pass along the ID of an existing `ProductImage`.",
"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": "length",
"type": "`number`",
"description": "The length of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`string`",
"description": "The material of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`string`",
"description": "The MID Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[CreateProductOptionDTO](product.CreateProductOptionDTO.mdx)[]",
"description": "The product options to be created and associated with the product.",
"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": "title",
"type": "`string`",
"description": "The product option's title.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`string`",
"description": "The origin country of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[ProductStatus](../enums/product.ProductStatus.mdx)",
"description": "The status of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "DRAFT",
"type": "`\"draft\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PROPOSED",
"type": "`\"proposed\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PUBLISHED",
"type": "`\"published\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "REJECTED",
"type": "`\"rejected\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "subtitle",
"type": "`string`",
"description": "The subttle of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "[CreateProductTagDTO](product.CreateProductTagDTO.mdx)[]",
"description": "The product tags to be created and associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "value",
"type": "`string`",
"description": "The value of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "thumbnail",
"type": "`string`",
"description": "The URL of the product's thumbnail.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[CreateProductTypeDTO](product.CreateProductTypeDTO.mdx)",
"description": "The product type to create and associate with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "id",
"type": "`string`",
"description": "The product type's ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The product type's value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "type_id",
"type": "`string`",
"description": "The product type to be associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variants",
"type": "[CreateProductVariantDTO](product.CreateProductVariantDTO.mdx)[]",
"description": "The product variants to be created and associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"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": "height",
"type": "`number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[CreateProductVariantOptionDTO](product.CreateProductVariantOptionDTO.mdx)[]",
"description": "The product variant options to create and associate with the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of a product variant option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`string`",
"description": "The origin country of the product variant.",
"optional": true,
"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": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "weight",
"type": "`number`",
"description": "The weight of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`number`",
"description": "The width of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`object`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"collection_id","type":"`string`","description":"The product collection to be associated with 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":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","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":"height","type":"`number`","description":"The height of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string`","description":"The HS Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"`string`[] \\| `object`[]","description":"The product's images. If an array of strings is supplied, each string will be a URL and a `ProductImage` will be created\nand associated with the product. If an array of objects is supplied, you can pass along the ID of an existing `ProductImage`.","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":"length","type":"`number`","description":"The length of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string`","description":"The material of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string`","description":"The MID Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](product.CreateProductOptionDTO.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":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"origin_country","type":"`string`","description":"The origin country of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"DRAFT","type":"`\"draft\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROPOSED","type":"`\"proposed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PUBLISHED","type":"`\"published\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"REJECTED","type":"`\"rejected\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[CreateProductTagDTO](product.CreateProductTagDTO.mdx)[]","description":"The product tags to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[CreateProductTypeDTO](product.CreateProductTypeDTO.mdx)","description":"The product type to create and associate with the product.","optiLine truncated
@@ -8,23 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product option to create.
<ParameterTypes parameters={[
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the associated product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The product option's title.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"title","type":"`string`","description":"The product option's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,14 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product tag to create.
<ParameterTypes parameters={[
{
"name": "value",
"type": "`string`",
"description": "The value of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"value","type":"`string`","description":"The value of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,32 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product type to create.
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The product type's ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The product type's value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"value","type":"`string`","description":"The product type's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The product type's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,195 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product variant to create.
<ParameterTypes parameters={[
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"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": "height",
"type": "`number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[CreateProductVariantOptionDTO](product.CreateProductVariantOptionDTO.mdx)[]",
"description": "The product variant options to create and associate with the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of a product variant option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`string`",
"description": "The origin country of the product variant.",
"optional": true,
"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": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"title","type":"`string`","description":"The tile of the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the product variant can be ordered when it's out of stock.","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":"height","type":"`number`","description":"The height of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string`","description":"The HS Code of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The inventory quantiy of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`number`","description":"The length of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether the product variant's inventory should be managed by the core system.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string`","description":"The material of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string`","description":"The MID Code of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductVariantOptionDTO](product.CreateProductVariantOptionDTO.mdx)[]","description":"The product variant options to create and associate with the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of a product variant option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"origin_country","type":"`string`","description":"The origin country of the product variant.","optional":true,"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":"upc","type":"`string`","description":"The UPC of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`number`","description":"The weight of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`number`","description":"The width of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,23 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product variant option to create.
<ParameterTypes parameters={[
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of a product variant option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"value","type":"`string`","description":"The value of a product variant option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,86 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved product categories.
<ParameterTypes parameters={[
{
"name": "$and",
"type": "([FilterableProductCategoryProps](product.FilterableProductCategoryProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductCategoryProps](product.FilterableProductCategoryProps.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": "([FilterableProductCategoryProps](product.FilterableProductCategoryProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductCategoryProps](product.FilterableProductCategoryProps.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": "handle",
"type": "`string` \\| `string`[]",
"description": "The handles to filter product categories by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string` \\| `string`[]",
"description": "The IDs to filter product categories by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "include_descendants_tree",
"type": "`boolean`",
"description": "Whether to include children of retrieved product categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Filter product categories by whether they're active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Filter product categories by whether they're internal.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string` \\| `string`[]",
"description": "The names to filter product categories by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category_id",
"type": "`null` \\| `string` \\| `string`[]",
"description": "Filter product categories by their parent category's ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"([FilterableProductCategoryProps](product.FilterableProductCategoryProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductCategoryProps](product.FilterableProductCategoryProps.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":"([FilterableProductCategoryProps](product.FilterableProductCategoryProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductCategoryProps](product.FilterableProductCategoryProps.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":"handle","type":"`string` \\| `string`[]","description":"The handles to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`","description":"Whether to include children of retrieved product categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter product categories by whether they're active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter product categories by whether they're internal.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"The names to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string` \\| `string`[]","description":"Filter product categories by their parent category's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,50 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved product collections.
<ParameterTypes parameters={[
{
"name": "$and",
"type": "([FilterableProductCollectionProps](product.FilterableProductCollectionProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductCollectionProps](product.FilterableProductCollectionProps.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": "([FilterableProductCollectionProps](product.FilterableProductCollectionProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductCollectionProps](product.FilterableProductCollectionProps.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": "handle",
"type": "`string` \\| `string`[]",
"description": "The handles to filter product collections by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string` \\| `string`[]",
"description": "The IDs to filter product collections by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title to filter product collections by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"([FilterableProductCollectionProps](product.FilterableProductCollectionProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductCollectionProps](product.FilterableProductCollectionProps.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":"([FilterableProductCollectionProps](product.FilterableProductCollectionProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductCollectionProps](product.FilterableProductCollectionProps.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":"handle","type":"`string` \\| `string`[]","description":"The handles to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title to filter product collections by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,50 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved product options.
<ParameterTypes parameters={[
{
"name": "$and",
"type": "([FilterableProductOptionProps](product.FilterableProductOptionProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductOptionProps](product.FilterableProductOptionProps.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": "([FilterableProductOptionProps](product.FilterableProductOptionProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductOptionProps](product.FilterableProductOptionProps.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": "id",
"type": "`string` \\| `string`[]",
"description": "The IDs to filter product options by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`string` \\| `string`[]",
"description": "Filter the product options by their associated products' IDs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The titles to filter product options by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"([FilterableProductOptionProps](product.FilterableProductOptionProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductOptionProps](product.FilterableProductOptionProps.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":"([FilterableProductOptionProps](product.FilterableProductOptionProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductOptionProps](product.FilterableProductOptionProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the product options by their associated products' IDs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The titles to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,160 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved products.
<ParameterTypes parameters={[
{
"name": "$and",
"type": "([FilterableProductProps](product.FilterableProductProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductProps](product.FilterableProductProps.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](product.FilterableProductProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductProps](product.FilterableProductProps.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": "categories",
"type": "`object`",
"description": "Filters on a product's categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "id",
"type": "`string` \\| `string`[] \\| [OperatorMap](../types/product.OperatorMap.mdx)&#60;string&#62;",
"description": "IDs to filter categories by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Filter categories by whether they're active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Filter categories by whether they're internal",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "categories.id",
"type": "`string` \\| `string`[] \\| [OperatorMap](../types/product.OperatorMap.mdx)&#60;string&#62;",
"description": "IDs to filter categories by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "categories.is_active",
"type": "`boolean`",
"description": "Filter categories by whether they're active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "categories.is_internal",
"type": "`boolean`",
"description": "Filter categories by whether they're internal",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "category_id",
"type": "`string` \\| `string`[] \\| [OperatorMap](../types/product.OperatorMap.mdx)&#60;string&#62;",
"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.mdx)&#60;string&#62;",
"description": "Filters a product by its associated collections.",
"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": "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": "tags",
"type": "`object`",
"description": "Filters on a product's tags.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "value",
"type": "`string`[]",
"description": "Values to filter product tags by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "tags.value",
"type": "`string`[]",
"description": "Values to filter product tags by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"([FilterableProductProps](product.FilterableProductProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductProps](product.FilterableProductProps.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](product.FilterableProductProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductProps](product.FilterableProductProps.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":"categories","type":"`object`","description":"Filters on a product's categories.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../types/product.OperatorMap.mdx)&#60;string&#62;","description":"IDs to filter categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter categories by whether they're active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter categories by whether they're internal","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"categories.id","type":"`string` \\| `string`[] \\| [OperatorMap](../types/product.OperatorMap.mdx)&#60;string&#62;","description":"IDs to filter categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"categories.is_active","type":"`boolean`","description":"Filter categories by whether they're active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"categories.is_internal","type":"`boolean`","description":"Filter categories by whether they're internal","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_id","type":"`string` \\| `string`[] \\| [OperatorMap](../types/product.OperatorMap.mdx)&#60;string&#62;","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.mdx)&#60;string&#62;","description":"Filters a product by its associated collections.","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":"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":"tags","type":"`object`","description":"Filters on a product's tags.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`[]","description":"Values to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tags.value","type":"`string`[]","description":"Values to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,41 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved product tags.
<ParameterTypes parameters={[
{
"name": "$and",
"type": "([FilterableProductTagProps](product.FilterableProductTagProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductTagProps](product.FilterableProductTagProps.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": "([FilterableProductTagProps](product.FilterableProductTagProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductTagProps](product.FilterableProductTagProps.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": "id",
"type": "`string` \\| `string`[]",
"description": "The IDs to filter product tags by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value to filter product tags by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"([FilterableProductTagProps](product.FilterableProductTagProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductTagProps](product.FilterableProductTagProps.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":"([FilterableProductTagProps](product.FilterableProductTagProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductTagProps](product.FilterableProductTagProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value to filter product tags by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,41 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved product types.
<ParameterTypes parameters={[
{
"name": "$and",
"type": "([FilterableProductTypeProps](product.FilterableProductTypeProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductTypeProps](product.FilterableProductTypeProps.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": "([FilterableProductTypeProps](product.FilterableProductTypeProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductTypeProps](product.FilterableProductTypeProps.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": "id",
"type": "`string` \\| `string`[]",
"description": "The IDs to filter product types by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value to filter product types by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"([FilterableProductTypeProps](product.FilterableProductTypeProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductTypeProps](product.FilterableProductTypeProps.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":"([FilterableProductTypeProps](product.FilterableProductTypeProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductTypeProps](product.FilterableProductTypeProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value to filter product types by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,78 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The filters to apply on retrieved product variants.
<ParameterTypes parameters={[
{
"name": "$and",
"type": "([FilterableProductVariantProps](product.FilterableProductVariantProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductVariantProps](product.FilterableProductVariantProps.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": "([FilterableProductVariantProps](product.FilterableProductVariantProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductVariantProps](product.FilterableProductVariantProps.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": "id",
"type": "`string` \\| `string`[]",
"description": "The IDs to filter product variants by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`object`",
"description": "Filter product variants by their associated options.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "id",
"type": "`string`[]",
"description": "IDs to filter options by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "options.id",
"type": "`string`[]",
"description": "IDs to filter options by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`string` \\| `string`[]",
"description": "Filter the product variants by their associated products' IDs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`string` \\| `string`[]",
"description": "The SKUs to filter product variants by.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"([FilterableProductVariantProps](product.FilterableProductVariantProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductVariantProps](product.FilterableProductVariantProps.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":"([FilterableProductVariantProps](product.FilterableProductVariantProps.mdx) \\| [BaseFilterable](product.BaseFilterable.mdx)&#60;[FilterableProductVariantProps](product.FilterableProductVariantProps.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":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product variants by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`","description":"Filter product variants by their associated options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"IDs to filter options by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options.id","type":"`string`[]","description":"IDs to filter options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the product variants by their associated products' IDs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string` \\| `string`[]","description":"The SKUs to filter product variants by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -11,71 +11,6 @@ which provides correct typing of field names in its properties.
## Type parameters
<ParameterTypes parameters={[
{
"name": "Entity",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Entity","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
<ParameterTypes parameters={[
{
"name": "order",
"type": "`object`",
"description": "An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "relations",
"type": "`string`[]",
"description": "An array of strings, each being relation names of the entity to retrieve in the result.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "select",
"type": "(`string` \\| keyof `Entity`)[]",
"description": "An array of strings, each being attribute names of the entity to retrieve in the result.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "skip",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to skip before retrieving the results.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "take",
"type": "`null` \\| `number`",
"description": "A number indicating the number of records to return in the result.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "withDeleted",
"type": "`boolean`",
"description": "A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"(`string` \\| keyof `Entity`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -14,48 +14,48 @@ This section of the documentation provides a reference to the `IProductModuleSer
## Methods
- [create](../../IProductModuleService/methods/product.IProductModuleService.create.mdx)
- [createCategory](../../IProductModuleService/methods/product.IProductModuleService.createCategory.mdx)
- [createCollections](../../IProductModuleService/methods/product.IProductModuleService.createCollections.mdx)
- [createOptions](../../IProductModuleService/methods/product.IProductModuleService.createOptions.mdx)
- [createTags](../../IProductModuleService/methods/product.IProductModuleService.createTags.mdx)
- [createTypes](../../IProductModuleService/methods/product.IProductModuleService.createTypes.mdx)
- [createVariants](../../IProductModuleService/methods/product.IProductModuleService.createVariants.mdx)
- [delete](../../IProductModuleService/methods/product.IProductModuleService.delete.mdx)
- [deleteCategory](../../IProductModuleService/methods/product.IProductModuleService.deleteCategory.mdx)
- [deleteCollections](../../IProductModuleService/methods/product.IProductModuleService.deleteCollections.mdx)
- [deleteOptions](../../IProductModuleService/methods/product.IProductModuleService.deleteOptions.mdx)
- [deleteTags](../../IProductModuleService/methods/product.IProductModuleService.deleteTags.mdx)
- [deleteTypes](../../IProductModuleService/methods/product.IProductModuleService.deleteTypes.mdx)
- [deleteVariants](../../IProductModuleService/methods/product.IProductModuleService.deleteVariants.mdx)
- [list](../../IProductModuleService/methods/product.IProductModuleService.list.mdx)
- [listAndCount](../../IProductModuleService/methods/product.IProductModuleService.listAndCount.mdx)
- [listAndCountCategories](../../IProductModuleService/methods/product.IProductModuleService.listAndCountCategories.mdx)
- [listAndCountCollections](../../IProductModuleService/methods/product.IProductModuleService.listAndCountCollections.mdx)
- [listAndCountOptions](../../IProductModuleService/methods/product.IProductModuleService.listAndCountOptions.mdx)
- [listAndCountTags](../../IProductModuleService/methods/product.IProductModuleService.listAndCountTags.mdx)
- [listAndCountTypes](../../IProductModuleService/methods/product.IProductModuleService.listAndCountTypes.mdx)
- [listAndCountVariants](../../IProductModuleService/methods/product.IProductModuleService.listAndCountVariants.mdx)
- [listCategories](../../IProductModuleService/methods/product.IProductModuleService.listCategories.mdx)
- [listCollections](../../IProductModuleService/methods/product.IProductModuleService.listCollections.mdx)
- [listOptions](../../IProductModuleService/methods/product.IProductModuleService.listOptions.mdx)
- [listTags](../../IProductModuleService/methods/product.IProductModuleService.listTags.mdx)
- [listTypes](../../IProductModuleService/methods/product.IProductModuleService.listTypes.mdx)
- [listVariants](../../IProductModuleService/methods/product.IProductModuleService.listVariants.mdx)
- [restore](../../IProductModuleService/methods/product.IProductModuleService.restore.mdx)
- [restoreVariants](../../IProductModuleService/methods/product.IProductModuleService.restoreVariants.mdx)
- [retrieve](../../IProductModuleService/methods/product.IProductModuleService.retrieve.mdx)
- [retrieveCategory](../../IProductModuleService/methods/product.IProductModuleService.retrieveCategory.mdx)
- [retrieveCollection](../../IProductModuleService/methods/product.IProductModuleService.retrieveCollection.mdx)
- [retrieveOption](../../IProductModuleService/methods/product.IProductModuleService.retrieveOption.mdx)
- [retrieveTag](../../IProductModuleService/methods/product.IProductModuleService.retrieveTag.mdx)
- [retrieveType](../../IProductModuleService/methods/product.IProductModuleService.retrieveType.mdx)
- [retrieveVariant](../../IProductModuleService/methods/product.IProductModuleService.retrieveVariant.mdx)
- [softDelete](../../IProductModuleService/methods/product.IProductModuleService.softDelete.mdx)
- [update](../../IProductModuleService/methods/product.IProductModuleService.update.mdx)
- [updateCategory](../../IProductModuleService/methods/product.IProductModuleService.updateCategory.mdx)
- [updateCollections](../../IProductModuleService/methods/product.IProductModuleService.updateCollections.mdx)
- [updateOptions](../../IProductModuleService/methods/product.IProductModuleService.updateOptions.mdx)
- [updateTags](../../IProductModuleService/methods/product.IProductModuleService.updateTags.mdx)
- [updateTypes](../../IProductModuleService/methods/product.IProductModuleService.updateTypes.mdx)
- [updateVariants](../../IProductModuleService/methods/product.IProductModuleService.updateVariants.mdx)
- [create](../IProductModuleService/methods/product.IProductModuleService.create.mdx)
- [createCategory](../IProductModuleService/methods/product.IProductModuleService.createCategory.mdx)
- [createCollections](../IProductModuleService/methods/product.IProductModuleService.createCollections.mdx)
- [createOptions](../IProductModuleService/methods/product.IProductModuleService.createOptions.mdx)
- [createTags](../IProductModuleService/methods/product.IProductModuleService.createTags.mdx)
- [createTypes](../IProductModuleService/methods/product.IProductModuleService.createTypes.mdx)
- [createVariants](../IProductModuleService/methods/product.IProductModuleService.createVariants.mdx)
- [delete](../IProductModuleService/methods/product.IProductModuleService.delete.mdx)
- [deleteCategory](../IProductModuleService/methods/product.IProductModuleService.deleteCategory.mdx)
- [deleteCollections](../IProductModuleService/methods/product.IProductModuleService.deleteCollections.mdx)
- [deleteOptions](../IProductModuleService/methods/product.IProductModuleService.deleteOptions.mdx)
- [deleteTags](../IProductModuleService/methods/product.IProductModuleService.deleteTags.mdx)
- [deleteTypes](../IProductModuleService/methods/product.IProductModuleService.deleteTypes.mdx)
- [deleteVariants](../IProductModuleService/methods/product.IProductModuleService.deleteVariants.mdx)
- [list](../IProductModuleService/methods/product.IProductModuleService.list.mdx)
- [listAndCount](../IProductModuleService/methods/product.IProductModuleService.listAndCount.mdx)
- [listAndCountCategories](../IProductModuleService/methods/product.IProductModuleService.listAndCountCategories.mdx)
- [listAndCountCollections](../IProductModuleService/methods/product.IProductModuleService.listAndCountCollections.mdx)
- [listAndCountOptions](../IProductModuleService/methods/product.IProductModuleService.listAndCountOptions.mdx)
- [listAndCountTags](../IProductModuleService/methods/product.IProductModuleService.listAndCountTags.mdx)
- [listAndCountTypes](../IProductModuleService/methods/product.IProductModuleService.listAndCountTypes.mdx)
- [listAndCountVariants](../IProductModuleService/methods/product.IProductModuleService.listAndCountVariants.mdx)
- [listCategories](../IProductModuleService/methods/product.IProductModuleService.listCategories.mdx)
- [listCollections](../IProductModuleService/methods/product.IProductModuleService.listCollections.mdx)
- [listOptions](../IProductModuleService/methods/product.IProductModuleService.listOptions.mdx)
- [listTags](../IProductModuleService/methods/product.IProductModuleService.listTags.mdx)
- [listTypes](../IProductModuleService/methods/product.IProductModuleService.listTypes.mdx)
- [listVariants](../IProductModuleService/methods/product.IProductModuleService.listVariants.mdx)
- [restore](../IProductModuleService/methods/product.IProductModuleService.restore.mdx)
- [restoreVariants](../IProductModuleService/methods/product.IProductModuleService.restoreVariants.mdx)
- [retrieve](../IProductModuleService/methods/product.IProductModuleService.retrieve.mdx)
- [retrieveCategory](../IProductModuleService/methods/product.IProductModuleService.retrieveCategory.mdx)
- [retrieveCollection](../IProductModuleService/methods/product.IProductModuleService.retrieveCollection.mdx)
- [retrieveOption](../IProductModuleService/methods/product.IProductModuleService.retrieveOption.mdx)
- [retrieveTag](../IProductModuleService/methods/product.IProductModuleService.retrieveTag.mdx)
- [retrieveType](../IProductModuleService/methods/product.IProductModuleService.retrieveType.mdx)
- [retrieveVariant](../IProductModuleService/methods/product.IProductModuleService.retrieveVariant.mdx)
- [softDelete](../IProductModuleService/methods/product.IProductModuleService.softDelete.mdx)
- [update](../IProductModuleService/methods/product.IProductModuleService.update.mdx)
- [updateCategory](../IProductModuleService/methods/product.IProductModuleService.updateCategory.mdx)
- [updateCollections](../IProductModuleService/methods/product.IProductModuleService.updateCollections.mdx)
- [updateOptions](../IProductModuleService/methods/product.IProductModuleService.updateOptions.mdx)
- [updateTags](../IProductModuleService/methods/product.IProductModuleService.updateTags.mdx)
- [updateTypes](../IProductModuleService/methods/product.IProductModuleService.updateTypes.mdx)
- [updateVariants](../IProductModuleService/methods/product.IProductModuleService.updateVariants.mdx)
@@ -6,233 +6,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# JoinerServiceConfig
<ParameterTypes parameters={[
{
"name": "alias",
"type": "[JoinerServiceConfigAlias](product.JoinerServiceConfigAlias.mdx) \\| [JoinerServiceConfigAlias](product.JoinerServiceConfigAlias.mdx)[]",
"description": "Property name to use as entrypoint to the service",
"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": []
},
{
"name": "extends",
"type": "`object`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "relationship",
"type": "[JoinerRelationship](../types/product.JoinerRelationship.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "alias",
"type": "`string`",
"description": "",
"optional": false,
"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": []
},
{
"name": "foreignKey",
"type": "`string`",
"description": "",
"optional": false,
"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": "isInternalService",
"type": "`boolean`",
"description": "If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services",
"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": "primaryKey",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "serviceName",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "serviceName",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "fieldAlias",
"type": "`Record<string, string \\| object>`",
"description": "alias for deeper nested relationships (e.g. &#123; 'price': 'prices.calculated\\_price\\_set.amount' &#125;)",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "primaryKeys",
"type": "`string`[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "relationships",
"type": "[JoinerRelationship](../types/product.JoinerRelationship.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "alias",
"type": "`string`",
"description": "",
"optional": false,
"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": []
},
{
"name": "foreignKey",
"type": "`string`",
"description": "",
"optional": false,
"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": "isInternalService",
"type": "`boolean`",
"description": "If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services",
"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": "primaryKey",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "serviceName",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "serviceName",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"alias","type":"[JoinerServiceConfigAlias](product.JoinerServiceConfigAlias.mdx) \\| [JoinerServiceConfigAlias](product.JoinerServiceConfigAlias.mdx)[]","description":"Property name to use as entrypoint to the service","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":[]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"relationship","type":"[JoinerRelationship](../types/product.JoinerRelationship.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"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":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","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":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","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":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. &#123; 'price': 'prices.calculated\\_price\\_set.amount' &#125;)","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../types/product.JoinerRelationship.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"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":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","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":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} />
@@ -6,23 +6,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# JoinerServiceConfigAlias
<ParameterTypes parameters={[
{
"name": "args",
"type": "`Record<string, any>`",
"description": "Extra arguments to pass to the remoteFetchData callback",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string` \\| `string`[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"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":[]}]} />
@@ -8,704 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product category's data.
<ParameterTypes parameters={[
{
"name": "category_children",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated child categories.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "category_children",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated child categories.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "category_children",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated child categories.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product category was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The description of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product category. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)",
"description": "The associated parent category.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the product category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product category was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product category was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The description of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product category. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)",
"description": "The associated parent category.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "category_children",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated child categories.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product category was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The description of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product category. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)",
"description": "The associated parent category.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the product category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product category was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the product category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product category was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product category was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The description of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product category. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)",
"description": "The associated parent category.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "category_children",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated child categories.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "category_children",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated child categories.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product category was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The description of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product category. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)",
"description": "The associated parent category.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the product category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product category was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product category was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The description of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product category. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)",
"description": "The associated parent category.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "category_children",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated child categories.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product category was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`string`",
"description": "The description of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product category. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the product category.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category",
"type": "[ProductCategoryDTO](product.ProductCategoryDTO.mdx)",
"description": "The associated parent category.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the product category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product category was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the product category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product category was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the product category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product category was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"category_children","type":"[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"[ProductCategoryDTO](product.ProductCategoryDTO.mdx)","description":"The associated parent category.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the product category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"[ProductCategoryDTO](product.ProductCategoryDTO.mdx)","description":"The associated parent category.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"category_children","type":"[ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`strinLine truncated
@@ -8,805 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product collection's data.
<ParameterTypes parameters={[
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product collection was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product collection. The handle can be used to create slug URL paths.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[ProductDTO](product.ProductDTO.mdx)[]",
"description": "The associated products.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "categories",
"type": "`null` \\| [ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated product categories.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "collection",
"type": "[ProductCollectionDTO](product.ProductCollectionDTO.mdx)",
"description": "The associated product collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product collection was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product collection. The handle can be used to create slug URL paths.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[ProductDTO](product.ProductDTO.mdx)[]",
"description": "The associated products.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product was created.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "The description of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discountable",
"type": "`boolean`",
"description": "Whether the product can be discounted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "external_id",
"type": "`null` \\| `string`",
"description": "The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain\na reference to the ID in the integrated service.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`null` \\| `string`",
"description": "The handle of the product. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "images",
"type": "[ProductImageDTO](product.ProductImageDTO.mdx)[]",
"description": "The associated product images.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product image was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product image.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "url",
"type": "`string`",
"description": "The URL of the product image.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "is_giftcard",
"type": "`boolean`",
"description": "Whether the product is a gift card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionDTO](product.ProductOptionDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product option was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[ProductDTO](product.ProductDTO.mdx)",
"description": "The associated product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "values",
"type": "[ProductOptionValueDTO](product.ProductOptionValueDTO.mdx)[]",
"description": "The associated product option values.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[ProductStatus](../enums/product.ProductStatus.mdx)",
"description": "The status of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "DRAFT",
"type": "`\"draft\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PROPOSED",
"type": "`\"proposed\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PUBLISHED",
"type": "`\"published\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "REJECTED",
"type": "`\"rejected\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "subtitle",
"type": "`null` \\| `string`",
"description": "The subttle of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "[ProductTagDTO](product.ProductTagDTO.mdx)[]",
"description": "The associated product tags.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "id",
"type": "`string`",
"description": "The ID of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[ProductDTO](product.ProductDTO.mdx)[]",
"description": "The associated products.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "thumbnail",
"type": "`null` \\| `string`",
"description": "The URL of the product's thumbnail.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[ProductTypeDTO](product.ProductTypeDTO.mdx)[]",
"description": "The associated product type.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product type was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product type.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product type.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product was updated.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variants",
"type": "[ProductVariantDTO](product.ProductVariantDTO.mdx)[]",
"description": "The associated product variants.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"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": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`null` \\| `string`",
"description": "The EAN of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionValueDTO](product.ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[ProductDTO](product.ProductDTO.mdx)",
"description": "The associated product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the associated product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`null` \\| `string`",
"description": "The SKU of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`null` \\| `string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant_rank",
"type": "`null` \\| `number`",
"description": "he ranking of the variant among other variants associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"handle","type":"`string`","description":"The handle of the product collection. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product collection was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[ProductDTO](product.ProductDTO.mdx)[]","description":"The associated products.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"collection","type":"[ProductCollectionDTO](product.ProductCollectionDTO.mdx)","description":"The associated product collection.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"handle","type":"`string`","description":"The handle of the product collection. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product collection was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[ProductDTO](product.ProductDTO.mdx)[]","description":"The associated products.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"id","type":"`string`","description":"The ID of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[ProductImageDTO](product.ProductImageDTO.mdx)[]","description":"The associated product images.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the product image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product image was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionDTO](product.ProductOptionDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[ProductDTO](product.ProductDTO.mdx)","description":"The associated product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the product option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[ProductOptionValueDTO](product.ProductOptionValueDTO.mdx)[]","description":"The associated product option values.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product option was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[ProductStatus](../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"DRAFT","type":"`\"draft\"`","description":"","optional":true,"defaultValue":"","expandable":false,"chilLine truncated
File diff suppressed because it is too large. Load diff
@@ -8,41 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The product image's data.
<ParameterTypes parameters={[
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product image was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product image.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "url",
"type": "`string`",
"description": "The URL of the product image.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the product image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product image was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
File diff suppressed because it is too large. Load diff
@@ -8,974 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The product option value's data.
<ParameterTypes parameters={[
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product option value was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product option value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "option",
"type": "[ProductOptionDTO](product.ProductOptionDTO.mdx)",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product option was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[ProductDTO](product.ProductDTO.mdx)",
"description": "The associated product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "categories",
"type": "`null` \\| [ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated product categories.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "collection",
"type": "[ProductCollectionDTO](product.ProductCollectionDTO.mdx)",
"description": "The associated product collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product was created.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "The description of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discountable",
"type": "`boolean`",
"description": "Whether the product can be discounted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "external_id",
"type": "`null` \\| `string`",
"description": "The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain\na reference to the ID in the integrated service.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`null` \\| `string`",
"description": "The handle of the product. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "images",
"type": "[ProductImageDTO](product.ProductImageDTO.mdx)[]",
"description": "The associated product images.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "is_giftcard",
"type": "`boolean`",
"description": "Whether the product is a gift card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionDTO](product.ProductOptionDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[ProductStatus](../enums/product.ProductStatus.mdx)",
"description": "The status of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subtitle",
"type": "`null` \\| `string`",
"description": "The subttle of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "[ProductTagDTO](product.ProductTagDTO.mdx)[]",
"description": "The associated product tags.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "thumbnail",
"type": "`null` \\| `string`",
"description": "The URL of the product's thumbnail.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[ProductTypeDTO](product.ProductTypeDTO.mdx)[]",
"description": "The associated product type.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product was updated.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variants",
"type": "[ProductVariantDTO](product.ProductVariantDTO.mdx)[]",
"description": "The associated product variants.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "values",
"type": "[ProductOptionValueDTO](product.ProductOptionValueDTO.mdx)[]",
"description": "The associated product option values.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product option value was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product option value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "option",
"type": "[ProductOptionDTO](product.ProductOptionDTO.mdx)",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product option value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant",
"type": "[ProductVariantDTO](product.ProductVariantDTO.mdx)",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product option value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant",
"type": "[ProductVariantDTO](product.ProductVariantDTO.mdx)",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"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": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`null` \\| `string`",
"description": "The EAN of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionValueDTO](product.ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product option value was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product option value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "option",
"type": "[ProductOptionDTO](product.ProductOptionDTO.mdx)",
"description": "The associated product option. It may only be available if the `option` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product option value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant",
"type": "[ProductVariantDTO](product.ProductVariantDTO.mdx)",
"description": "The associated product variant. It may only be available if the `variant` relation is expanded.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[ProductDTO](product.ProductDTO.mdx)",
"description": "The associated product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "categories",
"type": "`null` \\| [ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated product categories.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "collection",
"type": "[ProductCollectionDTO](product.ProductCollectionDTO.mdx)",
"description": "The associated product collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product was created.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "The description of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discountable",
"type": "`boolean`",
"description": "Whether the product can be discounted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "external_id",
"type": "`null` \\| `string`",
"description": "The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain\na reference to the ID in the integrated service.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`null` \\| `string`",
"description": "The handle of the product. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "images",
"type": "[ProductImageDTO](product.ProductImageDTO.mdx)[]",
"description": "The associated product images.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "is_giftcard",
"type": "`boolean`",
"description": "Whether the product is a gift card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionDTO](product.ProductOptionDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[ProductStatus](../enums/product.ProductStatus.mdx)",
"description": "The status of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subtitle",
"type": "`null` \\| `string`",
"description": "The subttle of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "[ProductTagDTO](product.ProductTagDTO.mdx)[]",
"description": "The associated product tags.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "thumbnail",
"type": "`null` \\| `string`",
"description": "The URL of the product's thumbnail.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[ProductTypeDTO](product.ProductTypeDTO.mdx)[]",
"description": "The associated product type.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product was updated.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variants",
"type": "[ProductVariantDTO](product.ProductVariantDTO.mdx)[]",
"description": "The associated product variants.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the associated product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`null` \\| `string`",
"description": "The SKU of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`null` \\| `string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant_rank",
"type": "`null` \\| `number`",
"description": "he ranking of the variant among other variants associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product option value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option","type":"[ProductOptionDTO](product.ProductOptionDTO.mdx)","description":"The associated product option. It may only be available if the `option` relation is expanded.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[ProductDTO](product.ProductDTO.mdx)","description":"The associated product.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"collection","type":"[ProductCollectionDTO](product.ProductCollectionDTO.mdx)","description":"The associated product collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[ProductImageDTO](product.ProductImageDTO.mdx)[]","description":"The associated product images.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionDTO](product.ProductOptionDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"status","type":"[ProductStatus](../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[ProductTagDTO](product.ProductTagDTO.mdx)[]","description":"The associated product tags.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ProductTypeDTO](product.ProductTypeDTO.mdx)[]","description":"The associated product type.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariantDTO](product.ProductVariantDTO.mdx)[]","description":"The associated product variants.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"categories","type":"`null` \\| [ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]","description":"The associated product categories.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain\na reference to the ID in the integrated service.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`null` \\| `string`","description":"The handle of the product. The handle can be used to create slug URL paths.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The MID Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin counLine truncated
@@ -8,787 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product tag's data.
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[ProductDTO](product.ProductDTO.mdx)[]",
"description": "The associated products.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "categories",
"type": "`null` \\| [ProductCategoryDTO](product.ProductCategoryDTO.mdx)[]",
"description": "The associated product categories.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "collection",
"type": "[ProductCollectionDTO](product.ProductCollectionDTO.mdx)",
"description": "The associated product collection.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product collection was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product collection. The handle can be used to create slug URL paths.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[ProductDTO](product.ProductDTO.mdx)[]",
"description": "The associated products.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product collection.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product was created.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "description",
"type": "`null` \\| `string`",
"description": "The description of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discountable",
"type": "`boolean`",
"description": "Whether the product can be discounted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "external_id",
"type": "`null` \\| `string`",
"description": "The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain\na reference to the ID in the integrated service.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handle",
"type": "`null` \\| `string`",
"description": "The handle of the product. The handle can be used to create slug URL paths.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "images",
"type": "[ProductImageDTO](product.ProductImageDTO.mdx)[]",
"description": "The associated product images.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product image was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product image.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "url",
"type": "`string`",
"description": "The URL of the product image.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "is_giftcard",
"type": "`boolean`",
"description": "Whether the product is a gift card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionDTO](product.ProductOptionDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product option was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[ProductDTO](product.ProductDTO.mdx)",
"description": "The associated product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "values",
"type": "[ProductOptionValueDTO](product.ProductOptionValueDTO.mdx)[]",
"description": "The associated product option values.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[ProductStatus](../enums/product.ProductStatus.mdx)",
"description": "The status of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "DRAFT",
"type": "`\"draft\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PROPOSED",
"type": "`\"proposed\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PUBLISHED",
"type": "`\"published\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "REJECTED",
"type": "`\"rejected\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "subtitle",
"type": "`null` \\| `string`",
"description": "The subttle of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "[ProductTagDTO](product.ProductTagDTO.mdx)[]",
"description": "The associated product tags.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "id",
"type": "`string`",
"description": "The ID of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "products",
"type": "[ProductDTO](product.ProductDTO.mdx)[]",
"description": "The associated products.",
"optional": true,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "thumbnail",
"type": "`null` \\| `string`",
"description": "The URL of the product's thumbnail.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[ProductTypeDTO](product.ProductTypeDTO.mdx)[]",
"description": "The associated product type.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product type was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product type.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product type.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product was updated.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variants",
"type": "[ProductVariantDTO](product.ProductVariantDTO.mdx)[]",
"description": "The associated product variants.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": [
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"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": "created_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ean",
"type": "`null` \\| `string`",
"description": "The EAN of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "height",
"type": "`null` \\| `number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`null` \\| `string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`null` \\| `number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`null` \\| `string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`null` \\| `string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[ProductOptionValueDTO](product.ProductOptionValueDTO.mdx)[]",
"description": "The associated product options.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "origin_country",
"type": "`null` \\| `string`",
"description": "The origin country of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product",
"type": "[ProductDTO](product.ProductDTO.mdx)",
"description": "The associated product.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "The ID of the associated product.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`null` \\| `string`",
"description": "The SKU of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The tile of the product variant.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "upc",
"type": "`null` \\| `string`",
"description": "The UPC of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`string` \\| `Date`",
"description": "When the product variant was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variant_rank",
"type": "`null` \\| `number`",
"description": "he ranking of the variant among other variants associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "weight",
"type": "`null` \\| `number`",
"description": "The weight of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`null` \\| `number`",
"description": "The width of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[ProductDTO](product.ProductDTO.mdx)[]","description":"The associated products.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"collection","type":"[ProductCollectionDTO](product.ProductCollectionDTO.mdx)","description":"The associated product collection.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"handle","type":"`string`","description":"The handle of the product collection. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product collection was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"products","type":"[ProductDTO](product.ProductDTO.mdx)[]","description":"The associated products.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"id","type":"`string`","description":"The ID of the product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"[ProductImageDTO](product.ProductImageDTO.mdx)[]","description":"The associated product images.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the product image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product image was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ProductOptionDTO](product.ProductOptionDTO.mdx)[]","description":"The associated product options.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"[ProductDTO](product.ProductDTO.mdx)","description":"The associated product.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`string`","description":"The title of the product option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[ProductOptionValueDTO](product.ProductOptionValueDTO.mdx)[]","description":"The associated product option values.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product option was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[ProductStatus](../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"DRAFT","type":"`\"draft\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROPOSED","type":"`\"proposed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PUBLISHED","type":"`\"published\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"REJECTED","type":"`\"rejected\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]Line truncated
@@ -8,41 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A product type's data.
<ParameterTypes parameters={[
{
"name": "deleted_at",
"type": "`string` \\| `Date`",
"description": "When the product type was deleted.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product type.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`null` \\| `Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product type.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product type was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
File diff suppressed because it is too large. Load diff
@@ -10,26 +10,6 @@ An object that is used to specify an entity's related entities that should be re
## Type parameters
<ParameterTypes parameters={[
{
"name": "TReturnableLinkableKeys",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
<ParameterTypes parameters={[
{
"name": "returnLinkableKeys",
"type": "`TReturnableLinkableKeys`[]",
"description": "An array of strings, each being the ID attribute names of the entity's relations.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"returnLinkableKeys","type":"`TReturnableLinkableKeys`[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -10,26 +10,6 @@ An object that is used to specify an entity's related entities that should be so
## Type parameters
<ParameterTypes parameters={[
{
"name": "TReturnableLinkableKeys",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
<ParameterTypes parameters={[
{
"name": "returnLinkableKeys",
"type": "`TReturnableLinkableKeys`[]",
"description": "An array of strings, each being the ID attribute names of the entity's relations.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"returnLinkableKeys","type":"`TReturnableLinkableKeys`[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,68 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The data to update in a product category.
<ParameterTypes parameters={[
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_active",
"type": "`boolean`",
"description": "Whether the product category is active.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_internal",
"type": "`boolean`",
"description": "Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the product category.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent_category_id",
"type": "`null` \\| `string`",
"description": "The ID of the parent product category, if it has any.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "rank",
"type": "`number`",
"description": "The ranking of the category among sibling categories.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"handle","type":"`string`","description":"The handle of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The ID of the parent product category, if it has any.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,59 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The data to update in a product collection. The `id` is used to identify which product collection to update.
<ParameterTypes parameters={[
{
"name": "handle",
"type": "`string`",
"description": "The handle of the product collection.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product collection to update.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_ids",
"type": "`string`[]",
"description": "The IDs of the products to associate with the product collection.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product collection.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product collection.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product collection to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product collection.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_ids","type":"`string`[]","description":"The IDs of the products to associate with the product collection.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product collection.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product collection.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,343 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The data to update in a product. The `id` is used to identify which product to update.
<ParameterTypes parameters={[
{
"name": "categories",
"type": "`object`[]",
"description": "The product categories to associate with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "collection_id",
"type": "`null` \\| `string`",
"description": "The product collection to be associated with 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": "discountable",
"type": "`boolean`",
"description": "Whether the product can be discounted.",
"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": "height",
"type": "`number`",
"description": "The height of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`string`",
"description": "The HS Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product to update.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "images",
"type": "`string`[] \\| `object`[]",
"description": "The product's images. If an array of strings is supplied, each string will be a URL and a `ProductImage` will be created\nand associated with the product. If an array of objects is supplied, you can pass along the ID of an existing `ProductImage`.",
"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": "length",
"type": "`number`",
"description": "The length of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`string`",
"description": "The material of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`string`",
"description": "The MID Code of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[CreateProductOptionDTO](product.CreateProductOptionDTO.mdx)[]",
"description": "The product options to be created and associated with the product.",
"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": "title",
"type": "`string`",
"description": "The product option's title.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`string`",
"description": "The origin country of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[ProductStatus](../enums/product.ProductStatus.mdx)",
"description": "The status of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "DRAFT",
"type": "`\"draft\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PROPOSED",
"type": "`\"proposed\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PUBLISHED",
"type": "`\"published\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "REJECTED",
"type": "`\"rejected\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "subtitle",
"type": "`string`",
"description": "The subttle of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tags",
"type": "[CreateProductTagDTO](product.CreateProductTagDTO.mdx)[]",
"description": "The product tags to be created and associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "value",
"type": "`string`",
"description": "The value of the product tag.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "thumbnail",
"type": "`string`",
"description": "The URL of the product's thumbnail.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The title of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "type",
"type": "[CreateProductTypeDTO](product.CreateProductTypeDTO.mdx)",
"description": "The product type to create and associate with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "id",
"type": "`string`",
"description": "The product type's ID.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The product type's value.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "type_id",
"type": "`null` \\| `string`",
"description": "The product type to be associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "variants",
"type": "([CreateProductVariantDTO](product.CreateProductVariantDTO.mdx) \\| [UpdateProductVariantDTO](product.UpdateProductVariantDTO.mdx))[]",
"description": "The product variants to be created and associated with the product. You can also update existing product variants associated with the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "weight",
"type": "`number`",
"description": "The weight of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`number`",
"description": "The width of the product.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`object`[]","description":"The product categories to associate with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"collection_id","type":"`null` \\| `string`","description":"The product collection to be associated with 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":"discountable","type":"`boolean`","description":"Whether the product can be discounted.","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":"height","type":"`number`","description":"The height of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string`","description":"The HS Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"`string`[] \\| `object`[]","description":"The product's images. If an array of strings is supplied, each string will be a URL and a `ProductImage` will be created\nand associated with the product. If an array of objects is supplied, you can pass along the ID of an existing `ProductImage`.","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":"length","type":"`number`","description":"The length of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string`","description":"The material of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string`","description":"The MID Code of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductOptionDTO](product.CreateProductOptionDTO.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":"product_id","type":"`string`","description":"The ID of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"origin_country","type":"`string`","description":"The origin country of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../enums/product.ProductStatus.mdx)","description":"The status of the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"DRAFT","type":"`\"draft\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PROPOSED","type":"`\"proposed\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"PUBLISHED","type":"`\"published\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"REJECTED","type":"`\"rejected\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"subtitle","type":"`string`","description":"The subttle of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"[CreateProductTagDTO](product.CreateProductTagDTO.mdx)[]","description":"The product tags to be created and associated with the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of the product tag.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"thumbnail","type":"`string`","description":"The URL of the product's thumbnail.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"Line truncated
@@ -6,32 +6,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# UpdateProductOptionDTO
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,23 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The data to update in a product tag. The `id` is used to identify which product tag to update.
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the product tag to update.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of the product tag.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product tag to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the product tag.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,32 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The data to update in a product type. The `id` is used to identify which product type to update.
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "The ID of the product type to update.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The new value of the product type.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product type to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The new value of the product type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -8,195 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The data to update in a product variant. The `id` is used to identify which product variant to update.
<ParameterTypes parameters={[
{
"name": "allow_backorder",
"type": "`boolean`",
"description": "Whether the product variant can be ordered when it's out of stock.",
"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": "height",
"type": "`number`",
"description": "The height of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hs_code",
"type": "`string`",
"description": "The HS Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The ID of the product variant to update.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "inventory_quantity",
"type": "`number`",
"description": "The inventory quantiy of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "length",
"type": "`number`",
"description": "The length of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "manage_inventory",
"type": "`boolean`",
"description": "Whether the product variant's inventory should be managed by the core system.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "material",
"type": "`string`",
"description": "The material of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "Holds custom data in key-value pairs.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "mid_code",
"type": "`string`",
"description": "The MID Code of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "[CreateProductVariantOptionDTO](product.CreateProductVariantOptionDTO.mdx)[]",
"description": "The product variant options to create and associate with the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "option_id",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "The value of a product variant option.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "origin_country",
"type": "`string`",
"description": "The origin country of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "sku",
"type": "`string`",
"description": "The SKU of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "title",
"type": "`string`",
"description": "The tile 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": "weight",
"type": "`number`",
"description": "The weight of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "width",
"type": "`number`",
"description": "The width of the product variant.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"The ID of the product variant to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether the product variant can be ordered when it's out of stock.","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":"height","type":"`number`","description":"The height of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`string`","description":"The HS Code of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The inventory quantiy of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`number`","description":"The length of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manage_inventory","type":"`boolean`","description":"Whether the product variant's inventory should be managed by the core system.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`string`","description":"The material of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`string`","description":"The MID Code of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[CreateProductVariantOptionDTO](product.CreateProductVariantOptionDTO.mdx)[]","description":"The product variant options to create and associate with the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of a product variant option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"origin_country","type":"`string`","description":"The origin country of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`string`","description":"The SKU of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The tile 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":"weight","type":"`number`","description":"The weight of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`number`","description":"The width of the product variant.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -10,77 +10,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Type declaration
<ParameterTypes parameters={[
{
"name": "alias",
"type": "`string`",
"description": "",
"optional": false,
"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": []
},
{
"name": "foreignKey",
"type": "`string`",
"description": "",
"optional": false,
"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": "isInternalService",
"type": "`boolean`",
"description": "If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services",
"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": "primaryKey",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "serviceName",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"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":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","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":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
@@ -10,176 +10,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Type declaration
<ParameterTypes parameters={[
{
"name": "$and",
"type": "[Query](product.Query.mdx)&#60;T&#62;[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$contained",
"type": "`string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$contains",
"type": "`string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$eq",
"type": "[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62; \\| [ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$exists",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$fulltext",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$gt",
"type": "[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$gte",
"type": "[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$ilike",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$in",
"type": "[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$like",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$lt",
"type": "[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$lte",
"type": "[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$ne",
"type": "[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$nin",
"type": "[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$not",
"type": "[Query](product.Query.mdx)&#60;T&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$or",
"type": "[Query](product.Query.mdx)&#60;T&#62;[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$overlap",
"type": "`string`[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "$re",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"$and","type":"[Query](product.Query.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62; \\| [ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](product.ExpandScalar.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](product.Query.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](product.Query.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />