Chore/rm main entity concept (#7709)
**What** Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate. This pr also includes various fixes in different modules Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2895ccfba8
commit
48963f55ef
@@ -321,7 +321,7 @@ function wrapAsyncHandler(
|
||||
* const productService = context.container.resolve(
|
||||
* "productService"
|
||||
* )
|
||||
* const product = await productService.create(input)
|
||||
* const product = await productService.createProducts(input)
|
||||
* return new StepResponse({
|
||||
* product
|
||||
* }, {
|
||||
@@ -335,7 +335,7 @@ function wrapAsyncHandler(
|
||||
* const productService = context.container.resolve(
|
||||
* "productService"
|
||||
* )
|
||||
* await productService.delete(input.product_id)
|
||||
* await productService.deleteProducts(input.product_id)
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
|
||||
@@ -66,7 +66,7 @@ export class StepResponse<TOutput, TCompensateInput = TOutput> {
|
||||
* )
|
||||
*
|
||||
* try {
|
||||
* const product = await productService.create(input)
|
||||
* const product = await productService.createProducts(input)
|
||||
* return new StepResponse({
|
||||
* product
|
||||
* }, {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { WorkflowStepHandlerArguments } from "@medusajs/orchestration"
|
||||
import { OrchestrationUtils, deepCopy } from "@medusajs/utils"
|
||||
import { resolveValue } from "./helpers"
|
||||
import {WorkflowStepHandlerArguments} from "@medusajs/orchestration"
|
||||
import {deepCopy, OrchestrationUtils} from "@medusajs/utils"
|
||||
import {resolveValue} from "./helpers"
|
||||
import {
|
||||
CreateWorkflowComposerContext,
|
||||
StepExecutionContext,
|
||||
@@ -68,7 +68,7 @@ import {
|
||||
* async (product, context: StepExecutionContext) => {
|
||||
* const productService: ProductService = context.container.resolve("productService")
|
||||
*
|
||||
* const updatedProduct = await productService.update(product.id, {
|
||||
* const updatedProduct = await productService.updateProducts(product.id, {
|
||||
* description: "a cool shirt"
|
||||
* })
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user