breaking: move shared HTTP utils to the framework (#9402)
Fixes: FRMW-2728, FRMW-2729 After this PR gets merged the following middleware will be exported from the `@medusajs/framework/http` import path. - applyParamsAsFilters - clearFiltersByKey - applyDefaultFilters - setContext - getQueryConfig - httpCompression - maybeApplyLinkFilter - refetchEntities - unlessPath - validateBody - validateQuery Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
co-authored by
Adrien de Peretti
parent
193f93464f
commit
48e00169d2
@@ -1,7 +1,7 @@
|
||||
import { completeCartWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { prepareRetrieveQuery } from "../../../../../utils/get-query-config"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { prepareRetrieveQuery } from "@medusajs/framework"
|
||||
import { refetchOrder } from "../../../orders/helpers"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import { defaultStoreCartFields } from "../../query-config"
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../../types/routing"
|
||||
import { prepareListQuery } from "../../../../../../utils/get-query-config"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { prepareListQuery } from "@medusajs/framework"
|
||||
import { refetchCart } from "../../../helpers"
|
||||
import { StoreUpdateCartLineItemType } from "../../../validators"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { addToCartWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import { StoreAddCartLineItemType } from "../../validators"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { updateCartPromotionsWorkflow } from "@medusajs/core-flows"
|
||||
import { PromotionActions } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import {
|
||||
StoreAddCartPromotionsType,
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
UpdateCartDataDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { refetchCart } from "../helpers"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { addShippingMethodToWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import { StoreAddCartShippingMethodsType } from "../../validators"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { updateTaxLinesWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { refetchCart } from "../../helpers"
|
||||
|
||||
export const POST = async (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { ensurePublishableKeyAndSalesChannelMatch } from "../../utils/middlewares/common/ensure-pub-key-sales-channel-match"
|
||||
import { maybeAttachPublishableKeyScopes } from "../../utils/middlewares/common/maybe-attach-pub-key-scopes"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformBody } from "@medusajs/framework"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import * as OrderQueryConfig from "../orders/query-config"
|
||||
import { StoreGetOrderParams } from "../orders/validators"
|
||||
import * as QueryConfig from "./query-config"
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { refetchCart } from "./helpers"
|
||||
|
||||
export const POST = async (
|
||||
|
||||
@@ -2,7 +2,7 @@ import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { refetchCollection } from "../helpers"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import {
|
||||
StoreGetCollectionParams,
|
||||
StoreGetCollectionsParams,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
MedusaError,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { StoreGetCurrenciesParams, StoreGetCurrencyParams } from "./validators"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { HttpTypes, MedusaContainer } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
import { createCustomerAddressesWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
import {
|
||||
StoreGetCustomerParamsType,
|
||||
|
||||
@@ -3,17 +3,19 @@ import * as QueryConfig from "./query-config"
|
||||
import {
|
||||
StoreCreateCustomer,
|
||||
StoreCreateCustomerAddress,
|
||||
StoreGetCustomerParams,
|
||||
StoreGetCustomerAddressesParams,
|
||||
StoreGetCustomerAddressParams,
|
||||
StoreGetCustomerParams,
|
||||
StoreUpdateCustomer,
|
||||
StoreUpdateCustomerAddress,
|
||||
StoreGetCustomerAddressParams,
|
||||
} from "./validators"
|
||||
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { authenticate } from "../../../utils/middlewares/authenticate-middleware"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import {
|
||||
validateAndTransformBody,
|
||||
validateAndTransformQuery,
|
||||
} from "@medusajs/framework"
|
||||
|
||||
export const storeCustomerRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ import { MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
import { createCustomerAccountWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { refetchOrder } from "../helpers"
|
||||
|
||||
// TODO: Do we want to apply some sort of authentication here? My suggestion is that we do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import { refetchEntity } from "../../utils/refetch-entity"
|
||||
import { refetchEntity } from "@medusajs/framework/http"
|
||||
|
||||
export const refetchOrder = async (
|
||||
idOrFilter: string | object,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { authenticate } from "../../../utils/middlewares/authenticate-middleware"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { StoreGetOrderParams, StoreGetOrdersParams } from "./validators"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createPaymentSessionsWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { StoreCreatePaymentSessionType } from "../../validators"
|
||||
import { refetchPaymentCollection } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
MedusaContainer,
|
||||
PaymentCollectionDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import { refetchEntity } from "../../utils/refetch-entity"
|
||||
import { refetchEntity } from "@medusajs/framework/http"
|
||||
|
||||
export const refetchPaymentCollection = async (
|
||||
id: string,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import {
|
||||
validateAndTransformBody,
|
||||
validateAndTransformQuery,
|
||||
} from "@medusajs/framework"
|
||||
import * as queryConfig from "./query-config"
|
||||
import {
|
||||
StoreCreatePaymentCollection,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import * as queryConfig from "./query-config"
|
||||
import { StoreGetPaymentProvidersParams } from "./validators"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
MedusaError,
|
||||
|
||||
@@ -3,8 +3,8 @@ import { MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../types/routing"
|
||||
import { refetchEntity } from "../../../utils/refetch-entity"
|
||||
refetchEntity,
|
||||
} from "@medusajs/framework/http"
|
||||
import { StoreProductCategoryParamsType } from "../validators"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import { applyCategoryFilters } from "./helpers"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<StoreProductCategoryListParams>,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { MedusaError, isPresent } from "@medusajs/framework/utils"
|
||||
import { MedusaResponse } from "../../../../types/routing"
|
||||
import { isPresent, MedusaError } from "@medusajs/framework/utils"
|
||||
import { MedusaResponse } from "@medusajs/framework/http"
|
||||
import { wrapVariantsWithInventoryQuantity } from "../../../utils/middlewares"
|
||||
import {
|
||||
RequestWithContext,
|
||||
refetchProduct,
|
||||
RequestWithContext,
|
||||
wrapProductsWithTaxPrices,
|
||||
} from "../helpers"
|
||||
import { StoreGetProductParamsType } from "../validators"
|
||||
|
||||
@@ -2,12 +2,16 @@ import {
|
||||
HttpTypes,
|
||||
ItemTaxLineDTO,
|
||||
MedusaContainer,
|
||||
TaxCalculationContext,
|
||||
TaxableItemDTO,
|
||||
TaxCalculationContext,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules, calculateAmountsWithTax } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest } from "../../../types/routing"
|
||||
import { refetchEntities, refetchEntity } from "../../utils/refetch-entity"
|
||||
import {
|
||||
MedusaRequest,
|
||||
refetchEntities,
|
||||
refetchEntity,
|
||||
} from "@medusajs/framework/http"
|
||||
import { calculateAmountsWithTax, Modules } from "@medusajs/framework/utils"
|
||||
import { TaxModuleService } from "@medusajs/tax/dist/services"
|
||||
|
||||
export type RequestWithContext<T> = MedusaRequest<T> & {
|
||||
taxContext: {
|
||||
@@ -64,7 +68,7 @@ export const wrapProductsWithTaxPrices = async <T>(
|
||||
return
|
||||
}
|
||||
|
||||
const taxService = req.scope.resolve(Modules.TAX)
|
||||
const taxService = req.scope.resolve<TaxModuleService>(Modules.TAX)
|
||||
|
||||
const taxRates = (await taxService.getTaxLines(
|
||||
products.map(asTaxItem).flat(),
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
import { isPresent, ProductStatus } from "@medusajs/framework/utils"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { maybeApplyLinkFilter } from "../../utils/maybe-apply-link-filter"
|
||||
import {
|
||||
applyDefaultFilters,
|
||||
applyParamsAsFilters,
|
||||
clearFiltersByKey,
|
||||
maybeApplyLinkFilter,
|
||||
MiddlewareRoute,
|
||||
setContext,
|
||||
} from "@medusajs/framework/http"
|
||||
import {
|
||||
filterByValidSalesChannels,
|
||||
normalizeDataForContext,
|
||||
setPricingContext,
|
||||
setTaxContext,
|
||||
} from "../../utils/middlewares"
|
||||
import { setContext } from "../../utils/middlewares/common/set-context"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import { maybeApplyStockLocationId } from "./helpers"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import {
|
||||
StoreGetProductsParams,
|
||||
StoreGetProductsParamsType,
|
||||
} from "./validators"
|
||||
import { applyParamsAsFilters } from "../../utils/middlewares/common/apply-params-as-filters"
|
||||
|
||||
export const storeProductRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
isPresent,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaResponse } from "../../../types/routing"
|
||||
import { MedusaResponse } from "@medusajs/framework/http"
|
||||
import { wrapVariantsWithInventoryQuantity } from "../../utils/middlewares"
|
||||
import { RequestWithContext, wrapProductsWithTaxPrices } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
MedusaError,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { StoreGetRegionParams, StoreGetRegionsParams } from "./validators"
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest<HttpTypes.StoreRegionFilters>,
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { StoreReturnReasonParamsType } from "../validators"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { StoreReturnReasonParams } from "./validators"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import {
|
||||
validateAndTransformBody,
|
||||
validateAndTransformQuery,
|
||||
} from "@medusajs/framework"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { ReturnsParams, StorePostReturnsReqSchema } from "./validators"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createAndCompleteReturnOrderWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { validateAndTransformQuery } from "@medusajs/framework"
|
||||
import { listTransformQueryConfig } from "./query-config"
|
||||
import { StoreGetShippingOptions } from "./validators"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { listShippingOptionsForCartWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes, ICartModuleService } from "@medusajs/framework/types"
|
||||
import { MedusaError, Modules } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||
import { StoreGetShippingOptionsType } from "./validators"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
Reference in New Issue
Block a user