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:
@@ -2,7 +2,7 @@ import { revokeApiKeysWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { AdminRevokeApiKeyType } from "../../validators"
|
||||
import { refetchApiKey } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
import { refetchApiKey } from "../helpers"
|
||||
import { AdminUpdateApiKeyType } from "../validators"
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ApiKeyType, MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { refetchApiKey } from "../../helpers"
|
||||
|
||||
export const POST = async (
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import * as QueryConfig from "./query-config"
|
||||
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import {
|
||||
validateAndTransformBody,
|
||||
validateAndTransformQuery,
|
||||
} from "@medusajs/framework"
|
||||
import {
|
||||
AdminCreateApiKey,
|
||||
AdminGetApiKeyParams,
|
||||
@@ -9,7 +12,6 @@ import {
|
||||
AdminRevokeApiKey,
|
||||
AdminUpdateApiKey,
|
||||
} from "./validators"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { createLinkBody } from "../../utils/validators"
|
||||
|
||||
export const adminApiKeyRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
} from "@medusajs/framework/http"
|
||||
import { AdminCreateApiKeyType } from "./validators"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user