feat(core-flows,dashboard,js-sdk,medusa,types): support Fulfillment Options (#10622)
**What** - add a list point for fetching fulfillment options for a provider - add FO support on SO create & update on dashboard - pass `cart` and `stockLocation` to `validateFufillmentData` context --- CLOSES CMRC-789 CLOSES CMRC-790
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
FilterableFulfillmentSetProps,
|
||||
FindConfig,
|
||||
FulfillmentDTO,
|
||||
FulfillmentOption,
|
||||
FulfillmentTypes,
|
||||
IFulfillmentModuleService,
|
||||
InternalModuleDeclaration,
|
||||
@@ -1946,7 +1947,7 @@ export default class FulfillmentModuleService
|
||||
|
||||
async retrieveFulfillmentOptions(
|
||||
providerId: string
|
||||
): Promise<Record<string, any>[]> {
|
||||
): Promise<FulfillmentOption[]> {
|
||||
return await this.fulfillmentProviderService_.getFulfillmentOptions(
|
||||
providerId
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@ import {
|
||||
CalculateShippingOptionPriceDTO,
|
||||
Constructor,
|
||||
DAL,
|
||||
FulfillmentOption,
|
||||
FulfillmentTypes,
|
||||
IFulfillmentProvider,
|
||||
Logger,
|
||||
@@ -81,7 +82,7 @@ export default class FulfillmentProviderService extends ModulesSdkUtils.MedusaIn
|
||||
|
||||
async getFulfillmentOptions(
|
||||
providerId: string
|
||||
): Promise<Record<string, unknown>[]> {
|
||||
): Promise<FulfillmentOption[]> {
|
||||
const provider = this.retrieveProviderRegistration(providerId)
|
||||
return await provider.getFulfillmentOptions()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user