refactor(core): align product service overloads and normalize step inputs#868
Open
vholik wants to merge 3 commits into
Open
refactor(core): align product service overloads and normalize step inputs#868vholik wants to merge 3 commits into
vholik wants to merge 3 commits into
Conversation
…puts
- Adopt Medusa-style overload declarations for createProducts,
updateProducts, and addProductAction so callers get array-in/array-out
and single-in/single-out typing without manual generics.
- Normalize workflow steps to accept batched array inputs, mirroring the
updateXxx([{ selector, data }]) shape used by MedusaService, and fix
compensation handlers to pick only scalar fields so DTO relations
don't leak into update payloads.
- Add missing brand and rejection-reason workflows/steps and wire up
submit-seller-products alongside the existing product lifecycle flows.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename steps that accept array inputs to match their batched shape: create-product-change → create-product-changes, create-product-change-action → create-product-change-actions, confirm-product-change → confirm-product-changes. decline-product-change stays singular since it still takes a single input. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename the step input key from update to data in activate-product, deactivate-product, and the update-products workflow so every caller matches the UpdateProductsStepInput shape. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Si3r4dz
approved these changes
Apr 17, 2026
Si3r4dz
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
createProducts,updateProducts, andaddProductActionso callers get array-in/array-out and single-in/single-out typing without manual generics.packages/core/src/workflows/product/steps/to accept batched array inputs and mirror theupdateXxx([{ selector, data }])shape used by MedusaService.products,product_changes,variants) into update payloads and broke typings.submit-seller-productsalongside the existing product lifecycle flows.Test plan
apps/apibuild — no TS regressions from the overloads🤖 Generated with Claude Code