fix(types): add missing retrieveProductOptionValue to module interface (#12313)
* fix(types): add missing retrieveProductOptionValue to module interface * changeset * Update tsdoc --------- Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
1 parent
1b681a79da
commit
6634765ced
2 files changed
+47
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/types": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(types): add missing retrieveProductOptionValue to module interface
|
||||||
@@ -1433,6 +1433,48 @@ export interface IProductModuleService extends IModuleService {
|
|||||||
sharedContext?: Context
|
sharedContext?: Context
|
||||||
): Promise<Record<string, string[]> | void>
|
): Promise<Record<string, string[]> | void>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is used to retrieve a product option value by its ID.
|
||||||
|
*
|
||||||
|
* @param {string} optionValueId - The ID of the product option value to retrieve.
|
||||||
|
* @param {FindConfig<ProductOptionValueDTO>} config -
|
||||||
|
* The configurations determining how the product option value is retrieved. Its properties, such as `select` or `relations`, accept the
|
||||||
|
* attributes or relations associated with a product option value.
|
||||||
|
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
||||||
|
* @returns {Promise<ProductOptionValueDTO>} The retrieved product option value.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* A simple example that retrieves a product option value by its ID:
|
||||||
|
*
|
||||||
|
* ```ts
|
||||||
|
* const optionValue =
|
||||||
|
* await productModuleService.retrieveProductOptionValue("optval_123")
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* To specify relations that should be retrieved:
|
||||||
|
*
|
||||||
|
* :::note
|
||||||
|
*
|
||||||
|
* You can only retrieve data models defined in the same module. To retrieve linked data models
|
||||||
|
* from other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.
|
||||||
|
*
|
||||||
|
* :::
|
||||||
|
*
|
||||||
|
* ```ts
|
||||||
|
* const optionValue = await productModuleService.retrieveProductOptionValue(
|
||||||
|
* "optval_123",
|
||||||
|
* {
|
||||||
|
* relations: ["option"],
|
||||||
|
* }
|
||||||
|
* )
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
retrieveProductOptionValue(
|
||||||
|
optionValueId: string,
|
||||||
|
config?: FindConfig<ProductOptionValueDTO>,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<ProductOptionValueDTO>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is used to retrieve a paginated list of product option values based on optional filters and configuration.
|
* This method is used to retrieve a paginated list of product option values based on optional filters and configuration.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in new issue
Block a user