feat(core-flows,fulfillment, fulfillment-manual, types): make fulfillment typings more specific (#10677)

**What**
- attempt to add more specific type definitions around fulfillment provider APIs

---

CLOSES CMRC-814
CLOSES CMRC-816
CLOSES CMRC-817
This commit is contained in:
Frane Polić
2025-01-07 08:08:45 +00:00
committed by GitHub
parent 333ed538f5
commit 16b0672f8a
12 changed files with 1358 additions and 68 deletions
@@ -1,8 +1,7 @@
import { Modules, promiseAll } from "@medusajs/framework/utils"
import {
CartDTO,
IFulfillmentModuleService,
StockLocationDTO,
ValidateFulfillmentDataContext,
} from "@medusajs/types"
import { createStep, StepResponse } from "@medusajs/workflows-sdk"
@@ -11,7 +10,7 @@ export type ValidateShippingMethodsDataInput = {
provider_id: string
option_data: Record<string, unknown>
method_data: Record<string, unknown>
context: CartDTO & { from_location: StockLocationDTO; [k: string]: unknown }
context: ValidateFulfillmentDataContext
}[]
export const validateAndReturnShippingMethodsDataStepId =
@@ -38,7 +37,7 @@ export const validateAndReturnShippingMethodsDataStep = createStep(
option.provider_id,
option.option_data,
option.method_data,
option.context
option.context as ValidateFulfillmentDataContext
)
return {