chore(docs): Generated References (#9026)
Generated the following references: - `modules` - `product` - `promotion` - `types`
This commit is contained in:
1 parent
abe7b66999
commit
a5748c6e1f
47 files changed
+1720800
-1718144
No files matched your search
+59
@@ -0,0 +1,59 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
slug: /references/product/createProductOptionValues
|
||||
sidebar_label: createProductOptionValues
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# createProductOptionValues - Product Module Reference
|
||||
|
||||
This documentation provides a reference to the `createProductOptionValues` method. This belongs to the Product Module.
|
||||
|
||||
## createProductOptionValues(data, sharedContext?): Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]>
|
||||
|
||||
This method is used to create product option values.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const options = await productModuleService.createProductOptionValues([
|
||||
{
|
||||
value: "Blue",
|
||||
option_id: "opt_123",
|
||||
},
|
||||
{
|
||||
value: "Green",
|
||||
option_id: "opt_123",
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateProductOptionValueDTO](../../../interfaces/product.CreateProductOptionValueDTO/page.mdx)[]","description":"The product option values to be created.","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":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"The metadata of the product option value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/product.Context/page.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":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/product.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createProductOptionValues"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of created product option values.","expandable":false,"children":[{"name":"ProductOptionValueDTO[]","type":"[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductOptionValueDTO","type":"`object`","description":"The product option value's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createProductOptionValues"/>
|
||||
|
||||
## createProductOptionValues(data, sharedContext?): Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)>
|
||||
|
||||
This method is used to create a product option.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const option = await productModuleService.createProductOptionValues({
|
||||
value: "Blue",
|
||||
option_id: "opt_123",
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateProductOptionValueDTO](../../../interfaces/product.CreateProductOptionValueDTO/page.mdx)","description":"The product option to be created.","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":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"The metadata of the product option value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/product.Context/page.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":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/product.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createProductOptionValues"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The created product option.","expandable":false,"children":[{"name":"ProductOptionValueDTO","type":"[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)","optional":false,"defaultValue":"","description":"The product option value's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option value.","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":"created_at","type":"`string` \\| `Date`","description":"When the product option value was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product option value was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option","type":"`null` \\| [ProductOptionDTO](../../../interfaces/product.ProductOptionDTO/page.mdx)","description":"The associated product option. It may only be available if the `option` relation is expanded.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option.","optional":false,"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](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]","description":"The associated product option values.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product option was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product option was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`null` \\| [ProductDTO](../../../interfaces/product.ProductDTO/page.mdx)","description":"The associated product.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"product_id","type":"`null` \\| `string`","description":"The associated product id.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product option was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"option_id","type":"`null` \\| `string`","description":"The associated product option id.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product option value was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createProductOptionValues"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
slug: /references/product/deleteProductOptionValues
|
||||
sidebar_label: deleteProductOptionValues
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteProductOptionValues - Product Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteProductOptionValues` method. This belongs to the Product Module.
|
||||
|
||||
This method is used to delete a product option.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await productModuleService.deleteProductOptionValues([
|
||||
"optval_123",
|
||||
"optval_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"productOptionValueIds","type":"`string`[]","description":"The IDs of the product option values to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/product.Context/page.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":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/product.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteProductOptionValues"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the product option values are successfully deleted.","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteProductOptionValues"/>
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
slug: /references/product/listAndCountProductOptionValues
|
||||
sidebar_label: listAndCountProductOptionValues
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listAndCountProductOptionValues - Product Module Reference
|
||||
|
||||
This documentation provides a reference to the `listAndCountProductOptionValues` method. This belongs to the Product Module.
|
||||
|
||||
This method is used to retrieve a paginated list of product option values along with the total count of available product option values satisfying the provided filters.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of product option values using their IDs:
|
||||
|
||||
```ts
|
||||
const [options, count] =
|
||||
await productModuleService.listAndCountProductOptionValues({
|
||||
id: ["optval_123", "optval_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the product types:
|
||||
|
||||
```ts
|
||||
const [options, count] =
|
||||
await productModuleService.listAndCountProductOptionValues(
|
||||
{
|
||||
id: ["optval_123", "optval_321"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
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
|
||||
const [options, count] =
|
||||
await productModuleService.listAndCountProductOptionValues(
|
||||
{
|
||||
id: ["optval_123", "optval_321"],
|
||||
},
|
||||
{
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)","description":"The filters applied on the retrieved product option values.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the option values' values.","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":"value","type":"`string` \\| `string`[]","description":"The values to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<T> \\| T)[]","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":"$or","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the option values' values.","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":"value","type":"`string` \\| `string`[]","description":"The values to filter product options by.","optional":true,"defaultValue":"","expandableLine truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[], number]>","optional":false,"defaultValue":"","description":"The list of product option values along with the total count.","expandable":false,"children":[{"name":"ProductOptionValueDTO[]","type":"[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountProductOptionValues"/>
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
slug: /references/product/listProductOptionValues
|
||||
sidebar_label: listProductOptionValues
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listProductOptionValues - Product Module Reference
|
||||
|
||||
This documentation provides a reference to the `listProductOptionValues` method. This belongs to the Product Module.
|
||||
|
||||
This method is used to retrieve a paginated list of product option values based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of product option values using their IDs:
|
||||
|
||||
```ts
|
||||
const options = await productModuleService.listProductOptionValues({
|
||||
id: ["optval_123", "optval_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the product option values:
|
||||
|
||||
```ts
|
||||
const options = await productModuleService.listProductOptionValues(
|
||||
{
|
||||
id: ["optval_123", "optval_321"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
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
|
||||
const options = await productModuleService.listProductOptionValues(
|
||||
{
|
||||
id: ["optval_123", "optval_321"],
|
||||
},
|
||||
{
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)","description":"The filters applied on the retrieved product option values.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the option values' values.","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":"value","type":"`string` \\| `string`[]","description":"The values to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<T> \\| T)[]","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":"$or","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the option values' values.","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":"value","type":"`string` \\| `string`[]","description":"The values to filter product options by.","optional":true,"defaultValue":"","expandableLine truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of product option values.","expandable":false,"children":[{"name":"ProductOptionValueDTO[]","type":"[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductOptionValueDTO","type":"`object`","description":"The product option value's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listProductOptionValues"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
slug: /references/product/restoreProductOptionValues
|
||||
sidebar_label: restoreProductOptionValues
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restoreProductOptionValues - Product Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreProductOptionValues` method. This belongs to the Product Module.
|
||||
|
||||
This method is used to restore options which were deleted using the softDelete method.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await productModuleService.restoreProductOptionValues([
|
||||
"optval_123",
|
||||
"optval_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"optionIds","type":"`string`[]","description":"The IDs of the options to restore.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/product.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the options. You can pass to its `returnLinkableKeys`\nproperty any of the option'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/page.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":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/product.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreProductOptionValues"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<string, string[]>>","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 option entity's relations, and its value is an array of strings, each being the ID of the record associated with the option through this relation.\n\nIf there are no related records that were restored, the promise resolved to `void`.","expandable":false,"children":[{"name":"void \\| Record<string, string[]>","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreProductOptionValues"/>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
slug: /references/product/softDeleteProductOptionValues
|
||||
sidebar_label: softDeleteProductOptionValues
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeleteProductOptionValues - Product Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeleteProductOptionValues` method. This belongs to the Product Module.
|
||||
|
||||
This method is used to delete options. Unlike the delete method, this method won't completely remove the option. It can still be accessed or retrieved using methods like retrieve if you pass the `withDeleted` property to the `config` object parameter.
|
||||
|
||||
The soft-deleted options can be restored using the restore method.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await productModuleService.softDeleteProductOptionValues([
|
||||
"optval_123",
|
||||
"optval_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"optionIds","type":"`string`[]","description":"The IDs of the options to soft-delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/product.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to soft delete along with the each of the options. You can pass to its `returnLinkableKeys`\nproperty any of the option's relation attribute names, such as `option_value_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/page.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":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/product.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteProductOptionValues"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<string, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted. The object's keys are the ID attribute names of the option entity's relations, and its value is an array of strings, each being the ID of a record associated with the option through this relation.\n\nIf there are no related records, the promise resolved to `void`.","expandable":false,"children":[{"name":"void \\| Record<string, string[]>","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteProductOptionValues"/>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
slug: /references/product/updateProductOptionValues
|
||||
sidebar_label: updateProductOptionValues
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# updateProductOptionValues - Product Module Reference
|
||||
|
||||
This documentation provides a reference to the `updateProductOptionValues` method. This belongs to the Product Module.
|
||||
|
||||
## updateProductOptionValues(id, data, sharedContext?): Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)>
|
||||
|
||||
This method is used to update a option.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const option = await productModuleService.updateProductOptionValues(
|
||||
"optval_123",
|
||||
{
|
||||
value: "Green",
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the option to be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateProductOptionValueDTO](../../../interfaces/product.UpdateProductOptionValueDTO/page.mdx)","description":"The attributes of the option to be updated","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of the product option value.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"The metadata of the product option value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/product.Context/page.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":"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":[]},{"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/product.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProductOptionValues"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The updated option.","expandable":false,"children":[{"name":"ProductOptionValueDTO","type":"[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)","optional":false,"defaultValue":"","description":"The product option value's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option value.","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":"created_at","type":"`string` \\| `Date`","description":"When the product option value was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product option value was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option","type":"`null` \\| [ProductOptionDTO](../../../interfaces/product.ProductOptionDTO/page.mdx)","description":"The associated product option. It may only be available if the `option` relation is expanded.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product option.","optional":false,"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](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]","description":"The associated product option values.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product option was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product option was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`null` \\| [ProductDTO](../../../interfaces/product.ProductDTO/page.mdx)","description":"The associated product.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"product_id","type":"`null` \\| `string`","description":"The associated product id.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product option was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"option_id","type":"`null` \\| `string`","description":"The associated product option id.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/product.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product option value was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProductOptionValues"/>
|
||||
|
||||
## updateProductOptionValues(selector, data, sharedContext?): Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]>
|
||||
|
||||
This method is used to update a list of options matching the specified filters.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const options = await productModuleService.updateProductOptionValues(
|
||||
{
|
||||
value: "Green",
|
||||
},
|
||||
{
|
||||
value: ["Red"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"selector","type":"[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)","description":"The filters specifying which options to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the option values' values.","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":"value","type":"`string` \\| `string`[]","description":"The values to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<T> \\| T)[]","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":"$or","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"$and","type":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","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":"([FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx) \\| [BaseFilterable](../../../interfaces/product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](../../../interfaces/product.FilterableProductOptionValueProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the option values' values.","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":"value","type":"`string` \\| `string`[]","description":"The values to filter product options by.","optional":true,"defaultValue":"","expandable":false,"cLine truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated options.","expandable":false,"children":[{"name":"ProductOptionValueDTO[]","type":"[ProductOptionValueDTO](../../../interfaces/product.ProductOptionValueDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductOptionValueDTO","type":"`object`","description":"The product option value's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProductOptionValues"/>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CreateProductOptionValueDTO
|
||||
|
||||
<TypeList types={[{"name":"value","type":"`string`","description":"The value of the product option value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/product.MetadataType/page.mdx)","description":"The metadata of the product option value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateProductOptionValueDTO"/>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# FilterableProductOptionValueProps
|
||||
|
||||
The filters to apply on retrieved product option values.
|
||||
|
||||
<TypeList types={[{"name":"$and","type":"([FilterableProductOptionValueProps](page.mdx) \\| [BaseFilterable](../product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionValueProps](page.mdx) \\| [BaseFilterable](../product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductOptionValueProps](page.mdx) \\| [BaseFilterable](../product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](page.mdx)>)[]","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":"([FilterableProductOptionValueProps](page.mdx) \\| [BaseFilterable](../product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the option values' values.","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":"value","type":"`string` \\| `string`[]","description":"The values to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../product.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../product.BaseFilterable/page.mdx)<T> \\| T)[]","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":"$or","type":"([FilterableProductOptionValueProps](page.mdx) \\| [BaseFilterable](../product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](page.mdx)>)[]","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":"$and","type":"([FilterableProductOptionValueProps](page.mdx) \\| [BaseFilterable](../product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](page.mdx)>)[]","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":"([FilterableProductOptionValueProps](page.mdx) \\| [BaseFilterable](../product.BaseFilterable/page.mdx)<[FilterableProductOptionValueProps](page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through the option values' values.","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":"value","type":"`string` \\| `string`[]","description":"The values to filter product options by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../product.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../product.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"q","type":"`string`","description":"Search through the option values' values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","tyLine truncated
|
||||
+7
@@ -49,6 +49,13 @@ The main service interface for the Product Module.
|
||||
- [deleteProductOptions](../../IProductModuleService/methods/product.IProductModuleService.deleteProductOptions/page.mdx)
|
||||
- [softDeleteProductOptions](../../IProductModuleService/methods/product.IProductModuleService.softDeleteProductOptions/page.mdx)
|
||||
- [restoreProductOptions](../../IProductModuleService/methods/product.IProductModuleService.restoreProductOptions/page.mdx)
|
||||
- [listProductOptionValues](../../IProductModuleService/methods/product.IProductModuleService.listProductOptionValues/page.mdx)
|
||||
- [listAndCountProductOptionValues](../../IProductModuleService/methods/product.IProductModuleService.listAndCountProductOptionValues/page.mdx)
|
||||
- [createProductOptionValues](../../IProductModuleService/methods/product.IProductModuleService.createProductOptionValues/page.mdx)
|
||||
- [updateProductOptionValues](../../IProductModuleService/methods/product.IProductModuleService.updateProductOptionValues/page.mdx)
|
||||
- [deleteProductOptionValues](../../IProductModuleService/methods/product.IProductModuleService.deleteProductOptionValues/page.mdx)
|
||||
- [softDeleteProductOptionValues](../../IProductModuleService/methods/product.IProductModuleService.softDeleteProductOptionValues/page.mdx)
|
||||
- [restoreProductOptionValues](../../IProductModuleService/methods/product.IProductModuleService.restoreProductOptionValues/page.mdx)
|
||||
- [retrieveProductVariant](../../IProductModuleService/methods/product.IProductModuleService.retrieveProductVariant/page.mdx)
|
||||
- [listProductVariants](../../IProductModuleService/methods/product.IProductModuleService.listProductVariants/page.mdx)
|
||||
- [listAndCountProductVariants](../../IProductModuleService/methods/product.IProductModuleService.listAndCountProductVariants/page.mdx)
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
---
|
||||
displayed_sidebar: productReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# UpdateProductOptionValueDTO
|
||||
|
||||
<TypeList types={[{"name":"value","type":"`string`","description":"The value of the product option value.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/product.MetadataType/page.mdx)","description":"The metadata of the product option value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateProductOptionValueDTO"/>
|
||||
Reference in new issue
Block a user