chore: use framework sub paths everywhere (#9253)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { completeCartWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { prepareRetrieveQuery } from "../../../../../utils/get-query-config"
|
||||
import { refetchOrder } from "../../../orders/helpers"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import { defaultStoreCartFields } from "../../query-config"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest,
|
||||
|
||||
@@ -2,8 +2,8 @@ import {
|
||||
deleteLineItemsWorkflow,
|
||||
updateLineItemInCartWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
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 { refetchCart } from "../../../helpers"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { addToCartWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import { StoreAddCartLineItemType } from "../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest<StoreAddCartLineItemType>,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { updateCartPromotionsWorkflow } from "@medusajs/core-flows"
|
||||
import { PromotionActions } from "@medusajs/utils"
|
||||
import { PromotionActions } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import {
|
||||
StoreAddCartPromotionsType,
|
||||
StoreRemoveCartPromotionsType,
|
||||
} from "../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest<StoreAddCartPromotionsType>,
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { updateCartWorkflow } from "@medusajs/core-flows"
|
||||
import { AdditionalData, HttpTypes, UpdateCartDataDTO } from "@medusajs/types"
|
||||
import {
|
||||
AdditionalData,
|
||||
HttpTypes,
|
||||
UpdateCartDataDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { refetchCart } from "../helpers"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { addShippingMethodToWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import { StoreAddCartShippingMethodsType } from "../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest<StoreAddCartShippingMethodsType>,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { updateTaxLinesWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { refetchCart } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { MedusaContainer } from "@medusajs/types"
|
||||
import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
export const refetchCart = async (
|
||||
id: string,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
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"
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
AdditionalData,
|
||||
CreateCartWorkflowInputDTO,
|
||||
HttpTypes,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { MedusaContainer } from "@medusajs/types"
|
||||
import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
export const refetchCollection = async (
|
||||
collectionId: string,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import {
|
||||
StoreGetCollectionParams,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.StoreCollectionFilters>,
|
||||
|
||||
@@ -2,9 +2,9 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
MedusaError,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { StoreGetCurrenciesParams, StoreGetCurrencyParams } from "./validators"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest<HttpTypes.StoreGetCurrencyListParams>,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { MedusaContainer } from "@medusajs/types"
|
||||
import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
export const refetchCustomer = async (
|
||||
customerId: string,
|
||||
|
||||
@@ -6,12 +6,12 @@ import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
import { HttpTypes, MedusaContainer } from "@medusajs/types"
|
||||
import { HttpTypes, MedusaContainer } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
MedusaError,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { refetchCustomer } from "../../../helpers"
|
||||
import {
|
||||
StoreGetCustomerAddressParamsType,
|
||||
|
||||
@@ -11,9 +11,9 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { refetchCustomer } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<StoreGetCustomerAddressesParamsType>,
|
||||
|
||||
@@ -8,9 +8,9 @@ import {
|
||||
StoreUpdateCustomerType,
|
||||
} from "../validators"
|
||||
import { refetchCustomer } from "../helpers"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { updateCustomersWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<StoreGetCustomerParamsType>,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
StoreGetCustomerAddressParams,
|
||||
} from "./validators"
|
||||
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
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"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
|
||||
import { createCustomerAccountWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import { refetchCustomer } from "./helpers"
|
||||
|
||||
export const POST = async (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { ensurePublishableApiKey } from "../../utils/middlewares/ensure-publishable-api-key"
|
||||
|
||||
export const storeRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { refetchOrder } from "../helpers"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MedusaContainer } from "@medusajs/types"
|
||||
import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import { refetchEntity } from "../../utils/refetch-entity"
|
||||
|
||||
export const refetchOrder = async (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { authenticate } from "../../../utils/middlewares/authenticate-middleware"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as QueryConfig from "./query-config"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.StoreOrderFilters>,
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
} from "../../../../../types/routing"
|
||||
import { StoreCreatePaymentSessionType } from "../../validators"
|
||||
import { refetchPaymentCollection } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<StoreCreatePaymentSessionType>,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { MedusaContainer, PaymentCollectionDTO } from "@medusajs/types"
|
||||
import {
|
||||
MedusaContainer,
|
||||
PaymentCollectionDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import { refetchEntity } from "../../utils/refetch-entity"
|
||||
|
||||
export const refetchPaymentCollection = async (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as queryConfig from "./query-config"
|
||||
|
||||
@@ -2,12 +2,12 @@ import { createPaymentCollectionForCartWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.StoreCreatePaymentCollection>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as queryConfig from "./query-config"
|
||||
import { StoreGetPaymentProvidersParams } from "./validators"
|
||||
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
MedusaError,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
// TODO: Add more fields to provider, such as default name and maybe logo.
|
||||
export const GET = async (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { StoreProductCategoryResponse } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { StoreProductCategoryResponse } from "@medusajs/framework/types"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { MedusaContainer } from "@medusajs/types"
|
||||
import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
export const refetchCategory = async (
|
||||
categoryId: string,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { applyCategoryFilters } from "./helpers"
|
||||
import * as QueryConfig from "./query-config"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import {
|
||||
StoreProductCategoryListParams,
|
||||
StoreProductCategoryListResponse,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MedusaError, isPresent } from "@medusajs/utils"
|
||||
import { MedusaError, isPresent } from "@medusajs/framework/utils"
|
||||
import { MedusaResponse } from "../../../../types/routing"
|
||||
import { wrapVariantsWithInventoryQuantity } from "../../../utils/middlewares"
|
||||
import {
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
wrapProductsWithTaxPrices,
|
||||
} from "../helpers"
|
||||
import { StoreGetProductParamsType } from "../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: RequestWithContext<StoreGetProductParamsType>,
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
MedusaContainer,
|
||||
TaxCalculationContext,
|
||||
TaxableItemDTO,
|
||||
} from "@medusajs/types"
|
||||
import { Modules, calculateAmountsWithTax } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules, calculateAmountsWithTax } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest } from "../../../types/routing"
|
||||
import { refetchEntities, refetchEntity } from "../../utils/refetch-entity"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { isPresent, ProductStatus } from "@medusajs/utils"
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { isPresent, ProductStatus } from "@medusajs/framework/utils"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { maybeApplyLinkFilter } from "../../utils/maybe-apply-link-filter"
|
||||
import {
|
||||
applyDefaultFilters,
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
isPresent,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaResponse } from "../../../types/routing"
|
||||
import { wrapVariantsWithInventoryQuantity } from "../../utils/middlewares"
|
||||
import { RequestWithContext, wrapProductsWithTaxPrices } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: RequestWithContext<HttpTypes.StoreProductParams>,
|
||||
|
||||
@@ -2,9 +2,9 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
MedusaError,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { StoreGetRegionParams, StoreGetRegionsParams } from "./validators"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest<HttpTypes.StoreRegionFilters>,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { StoreReturnReasonParamsType } from "../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest<StoreReturnReasonParamsType>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as QueryConfig from "./query-config"
|
||||
import { StoreReturnReasonParams } from "./validators"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as QueryConfig from "./query-config"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createAndCompleteReturnOrderWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest<HttpTypes.StoreCreateReturn>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import { listTransformQueryConfig } from "./query-config"
|
||||
import { StoreGetShippingOptions } from "./validators"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { listShippingOptionsForCartWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes, ICartModuleService } from "@medusajs/types"
|
||||
import { MedusaError, Modules } from "@medusajs/utils"
|
||||
import { HttpTypes, ICartModuleService } from "@medusajs/framework/types"
|
||||
import { MedusaError, Modules } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
|
||||
export const GET = async (
|
||||
|
||||
Reference in New Issue
Block a user