feat(core-flows,types,pricing,medusa): Products API can create prices with rules (#7796)

* chore: Products API can create prices with rules

* chore: fix tests

* chore: cleanup

* chore: address comments
This commit is contained in:
Riqwan Thamir
2024-06-21 15:30:36 +02:00
committed by GitHub
parent ed104d5aac
commit 8ac74c1357
11 changed files with 131 additions and 741 deletions
@@ -43,9 +43,10 @@ export const updatePriceSetsStep = createStep(
return new StepResponse([], null)
}
const { selects, relations } = getSelectsAndRelationsFromObjectArray([
data.update,
])
const { selects, relations } = getSelectsAndRelationsFromObjectArray(
[data.update],
{ objectFields: ["rules"] }
)
const dataBeforeUpdate = await pricingModule.listPriceSets(data.selector, {
select: selects,