feat(core-flows, medusa): add shipping methods to cart API (#7150)
* feat(core-flows, medusa): add shipping methods to cart API * chore: change id to option_id * chore: use list listShippingOptionsForContext instead of validateShippingOption * chore: remove comment * chore: add refresh shipping methods step * chore: set cart step * chore: update all workflows to refresh shipping methods * chore: add tests + cleanup
This commit is contained in:
1 parent
4b57c5d286
commit
d2393f004e
19 files changed
+688
-80
No files matched your search
@@ -1145,7 +1145,7 @@ export interface FilterableShippingMethodProps
|
||||
/**
|
||||
* Filter the shipping methods by the ID of their associated shipping option.
|
||||
*/
|
||||
shipping_option_id?: string | string[]
|
||||
shipping_option_id?: string | string[] | OperatorMap<string>
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -673,6 +673,11 @@ export interface CreateShippingMethodDTO {
|
||||
*/
|
||||
amount: BigNumberInput
|
||||
|
||||
/**
|
||||
* The amount of the shipping method.
|
||||
*/
|
||||
shipping_option_id?: string
|
||||
|
||||
/**
|
||||
* The data of the shipping method.
|
||||
*/
|
||||
@@ -703,6 +708,11 @@ export interface CreateShippingMethodForSingleCartDTO {
|
||||
*/
|
||||
amount: BigNumberInput
|
||||
|
||||
/**
|
||||
* The amount of the shipping method.
|
||||
*/
|
||||
shipping_option_id?: string
|
||||
|
||||
/**
|
||||
* The data of the shipping method.
|
||||
*/
|
||||
|
||||
@@ -743,7 +743,7 @@ export interface ICartModuleService extends IModuleService {
|
||||
*/
|
||||
listShippingMethods(
|
||||
filters: FilterableShippingMethodProps,
|
||||
config: FindConfig<CartShippingMethodDTO>,
|
||||
config?: FindConfig<CartShippingMethodDTO>,
|
||||
sharedContext?: Context
|
||||
): Promise<CartShippingMethodDTO[]>
|
||||
|
||||
|
||||
Reference in new issue
Block a user