feat(core-flows, types): update shipping methods upon cart ops (#10382)

* feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context

* chore: add test for shipping options returning free shipping

* feat(core-flows, types): update shipping methods upon cart ops

* chore: fix specs

* chore: fix bugs + specs

* Update update-shipping-methods.ts

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update mutations.ts

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

* chore: undo refresh changes

* chore: merge with latest

* chore: address PR comments

* chore: fix conflicts

* chore: fix specs

* chore: address reviews

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Riqwan Thamir
2024-12-08 14:06:50 +01:00
committed by GitHub
parent f95c4e240c
commit 9e797dc3d2
21 changed files with 1169 additions and 1244 deletions

View File

@@ -86,7 +86,7 @@ export const AdminCreateShippingOptionTypeObject = z
const AdminPriceRules = z.array(
z.object({
attribute: z.literal("total"),
attribute: z.literal("item_total"),
operator: z.nativeEnum(PricingRuleOperator),
value: z.number(),
})