chore: use framework sub paths everywhere (#9253)
This commit is contained in:
1 parent
48bea267dc
commit
a8e19faf8d
417 files changed
+870
-934
No files matched your search
@@ -13,15 +13,25 @@
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"oas"
|
||||
"oas",
|
||||
"!dist/**/__tests__",
|
||||
"!dist/**/__mocks__",
|
||||
"!dist/**/__fixtures__"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=20"
|
||||
},
|
||||
"author": "Sebastian Rindom",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"watch": "tsc --build --watch",
|
||||
"build": "rimraf dist && tsc --build",
|
||||
"serve": "node dist/app.js",
|
||||
"test": "jest --silent --bail --maxWorkers=50% --forceExit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/types": "^1.11.16",
|
||||
"@medusajs/framework": "^0.0.1",
|
||||
"@opentelemetry/api": "^1.9.0",
|
||||
"@opentelemetry/instrumentation": "^0.53.0",
|
||||
"@opentelemetry/instrumentation-pg": "^0.44.0",
|
||||
"@opentelemetry/resources": "^1.26.0",
|
||||
@@ -30,47 +40,28 @@
|
||||
"@swc/core": "^1.7.28",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/ioredis": "^4.28.10",
|
||||
"@types/jsonwebtoken": "^8.5.9",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/multer": "^1.4.7",
|
||||
"cross-env": "^5.2.1",
|
||||
"jest": "^29.7.0",
|
||||
"rimraf": "^5.0.1",
|
||||
"supertest": "^4.0.2",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"scripts": {
|
||||
"watch": "tsc --build --watch",
|
||||
"build": "rimraf dist && tsc --build",
|
||||
"serve": "node dist/app.js",
|
||||
"test": "jest --silent --bail --maxWorkers=50% --forceExit"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"awilix": "^8.0.1"
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@inquirer/checkbox": "^2.3.11",
|
||||
"@inquirer/input": "^2.2.9",
|
||||
"@medusajs/admin-bundler": "0.0.1",
|
||||
"@medusajs/core-flows": "^0.0.9",
|
||||
"@medusajs/framework": "^0.0.1",
|
||||
"@medusajs/link-modules": "^0.2.11",
|
||||
"@medusajs/utils": "^1.11.9",
|
||||
"@medusajs/workflows-sdk": "^0.1.6",
|
||||
"@swc/core": "1.5.7",
|
||||
"@swc/helpers": "^0.5.11",
|
||||
"body-parser": "^1.19.0",
|
||||
"boxen": "^5.0.1",
|
||||
"chalk": "^4.0.0",
|
||||
"chokidar": "^3.4.2",
|
||||
"compression": "^1.7.4",
|
||||
"connect-redis": "^5.0.0",
|
||||
"cookie-parser": "^1.4.6",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.18.2",
|
||||
"fs-exists-cached": "^1.0.0",
|
||||
"glob": "^7.1.6",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"medusa-telemetry": "^0.0.17",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
@@ -81,5 +72,9 @@
|
||||
"uuid": "^9.0.0",
|
||||
"zod": "3.22.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "^0.0.1",
|
||||
"awilix": "^8.0.1"
|
||||
},
|
||||
"gitHead": "cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e"
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
} from "../../../../../types/routing"
|
||||
import { AdminRevokeApiKeyType } from "../../validators"
|
||||
import { refetchApiKey } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminRevokeApiKeyType>,
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
|
||||
import { refetchApiKey } from "../helpers"
|
||||
import { AdminUpdateApiKeyType } from "../validators"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { linkSalesChannelsToApiKeyWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
||||
import { ApiKeyType, MedusaError } from "@medusajs/utils"
|
||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/framework/types"
|
||||
import { ApiKeyType, 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 refetchApiKey = async (
|
||||
apiKeyId: string,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as QueryConfig from "./query-config"
|
||||
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import {
|
||||
AdminCreateApiKey,
|
||||
|
||||
@@ -2,13 +2,13 @@ import { createApiKeysWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
import { AdminCreateApiKeyType } from "./validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetApiKeysParams>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ApiKeyType } from "@medusajs/utils"
|
||||
import { ApiKeyType } from "@medusajs/framework/utils"
|
||||
import { z } from "zod"
|
||||
import {
|
||||
createFindParams,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
} from "../../../../../types/routing"
|
||||
|
||||
import { addOrRemoveCampaignPromotionsWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/framework/types"
|
||||
import { refetchCampaign } from "../../helpers"
|
||||
|
||||
export const POST = async (
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
|
||||
import { refetchCampaign } from "../helpers"
|
||||
import { AdminUpdateCampaignType } from "../validators"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
|
||||
@@ -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 refetchCampaign = async (
|
||||
campaignId: string,
|
||||
|
||||
@@ -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 { createLinkBody } from "../../utils/validators"
|
||||
|
||||
@@ -6,10 +6,10 @@ import { createCampaignsWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { AdminCreateCampaignType } from "./validators"
|
||||
import { refetchCampaign } from "./helpers"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetCampaignParams>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CampaignBudgetType, isPresent } from "@medusajs/utils"
|
||||
import { CampaignBudgetType, isPresent } from "@medusajs/framework/utils"
|
||||
import { z } from "zod"
|
||||
import {
|
||||
createFindParams,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { cancelOrderClaimWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -5,13 +5,13 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
import { AdminPostClaimsItemsActionReqSchemaType } from "../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostClaimsItemsActionReqSchemaType>,
|
||||
|
||||
@@ -2,13 +2,13 @@ import { orderClaimItemWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../types/routing"
|
||||
import { AdminPostClaimItemsReqSchemaType } from "../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostClaimItemsReqSchemaType>,
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { refetchEntity } from "../../../../../../utils/refetch-entity"
|
||||
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
||||
import { AdminPostReturnsRequestItemsActionReqSchemaType } from "../../../../../returns/validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostReturnsRequestItemsActionReqSchemaType>,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { orderClaimRequestItemReturnWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from "../../../../../../types/routing"
|
||||
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
||||
import { AdminPostReturnsRequestItemsReqSchemaType } from "../../../../returns/validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostReturnsRequestItemsReqSchemaType>,
|
||||
|
||||
+2
-2
@@ -5,14 +5,14 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../../types/routing"
|
||||
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
||||
import { AdminPostClaimsShippingActionReqSchemaType } from "../../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingActionReqSchemaType>,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createClaimShippingMethodWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from "../../../../../../types/routing"
|
||||
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
||||
import { AdminPostReturnsShippingReqSchemaType } from "../../../../returns/validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostReturnsShippingReqSchemaType>,
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
removeAddItemClaimActionWorkflow,
|
||||
updateClaimAddItemWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -2,14 +2,14 @@ import { orderClaimAddNewItemWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
import { AdminPostClaimsAddItemsReqSchemaType } from "../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostClaimsAddItemsReqSchemaType>,
|
||||
|
||||
+2
-2
@@ -5,13 +5,13 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../../types/routing"
|
||||
import { AdminPostClaimsShippingActionReqSchemaType } from "../../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingActionReqSchemaType>,
|
||||
|
||||
@@ -2,13 +2,13 @@ import { createClaimShippingMethodWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
import { AdminPostClaimsShippingReqSchemaType } from "../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingReqSchemaType>,
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
cancelBeginOrderClaimWorkflow,
|
||||
confirmClaimRequestWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -2,9 +2,9 @@ import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../types/routing"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { refetchEntity } from "../../../utils/refetch-entity"
|
||||
import { AdminClaimResponse } from "@medusajs/types"
|
||||
import { AdminClaimResponse } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
|
||||
@@ -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,11 +1,11 @@
|
||||
import { beginClaimOrderWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
Modules,
|
||||
promiseAll,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ClaimReason, ClaimType } from "@medusajs/utils"
|
||||
import { ClaimReason, ClaimType } from "@medusajs/framework/utils"
|
||||
import { z } from "zod"
|
||||
import {
|
||||
createFindParams,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { batchLinkProductsToCollectionWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
|
||||
import { AdminUpdateCollectionType } from "../validators"
|
||||
import { refetchCollection } from "../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
|
||||
@@ -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 {
|
||||
AdminCreateCollection,
|
||||
|
||||
@@ -7,10 +7,10 @@ import { createCollectionsWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { AdminCreateCollectionType } from "./validators"
|
||||
import { refetchCollection } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCollectionListParams>,
|
||||
|
||||
@@ -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 { AdminGetCurrencyParams, AdminGetCurrenciesParams } 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.AdminCurrencyListParams>,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
MedusaResponse,
|
||||
} from "../../../../../types/routing"
|
||||
|
||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/framework/types"
|
||||
import { refetchCustomerGroup } from "../../helpers"
|
||||
|
||||
export const POST = async (
|
||||
|
||||
@@ -7,10 +7,10 @@ import {
|
||||
MedusaResponse,
|
||||
} from "../../../../types/routing"
|
||||
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { refetchCustomerGroup } from "../helpers"
|
||||
import { AdminUpdateCustomerGroupType } from "../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
|
||||
@@ -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 refetchCustomerGroup = async (
|
||||
customerGroupId: string,
|
||||
|
||||
@@ -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 { createLinkBody } from "../../utils/validators"
|
||||
|
||||
@@ -6,10 +6,10 @@ import { createCustomerGroupsWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { AdminCreateCustomerGroupType } from "./validators"
|
||||
import { refetchCustomerGroup } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetCustomerGroupsParams>,
|
||||
|
||||
@@ -10,10 +10,10 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { AdminCreateCustomerAddressType } from "../../../validators"
|
||||
import { refetchCustomer } from "../../../helpers"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
|
||||
@@ -6,10 +6,10 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { AdminCreateCustomerAddressType } from "../../validators"
|
||||
import { refetchCustomer } from "../../helpers"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCustomerAddressFilters>,
|
||||
|
||||
@@ -2,8 +2,8 @@ import {
|
||||
removeCustomerAccountWorkflow,
|
||||
updateCustomersWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { AdditionalData, HttpTypes } 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 refetchCustomer = async (
|
||||
customerId: string,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
AdminUpdateCustomerAddress,
|
||||
} from "./validators"
|
||||
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { createCustomersWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import { refetchOrder } from "../helpers"
|
||||
import { defaultAdminOrderFields } from "../query-config"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = 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 refetchOrder = async (
|
||||
orderId: string,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
OrderStatus,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaRequest,
|
||||
@@ -11,7 +11,11 @@ import {
|
||||
} from "../../../types/routing"
|
||||
import { AdminCreateDraftOrderType } from "./validators"
|
||||
import { refetchOrder } from "./helpers"
|
||||
import { AdditionalData, CreateOrderDTO, HttpTypes } from "@medusajs/types"
|
||||
import {
|
||||
AdditionalData,
|
||||
CreateOrderDTO,
|
||||
HttpTypes,
|
||||
} from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest<HttpTypes.AdminOrderFilters>,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { cancelOrderExchangeWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
removeItemReturnActionWorkflow,
|
||||
updateRequestItemReturnWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { orderExchangeRequestItemReturnWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from "../../../../../../types/routing"
|
||||
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
||||
import { AdminPostExchangesReturnRequestItemsReqSchemaType } from "../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostExchangesReturnRequestItemsReqSchemaType>,
|
||||
|
||||
+2
-2
@@ -5,14 +5,14 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../../types/routing"
|
||||
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
||||
import { AdminPostExchangesShippingActionReqSchemaType } from "../../../../validators"
|
||||
import { AdminOrderPreview, HttpTypes } from "@medusajs/types"
|
||||
import { AdminOrderPreview, HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingActionReqSchemaType>,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createExchangeShippingMethodWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from "../../../../../../types/routing"
|
||||
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
||||
import { AdminPostReturnsShippingReqSchemaType } from "../../../../returns/validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostReturnsShippingReqSchemaType>,
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
removeItemExchangeActionWorkflow,
|
||||
updateExchangeAddItemWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -2,14 +2,14 @@ import { orderExchangeAddNewItemWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
import { AdminPostExchangesAddItemsReqSchemaType } from "../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostExchangesAddItemsReqSchemaType>,
|
||||
|
||||
+2
-2
@@ -5,13 +5,13 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../../types/routing"
|
||||
import { AdminPostExchangesShippingActionReqSchemaType } from "../../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingActionReqSchemaType>,
|
||||
|
||||
@@ -2,13 +2,13 @@ import { createExchangeShippingMethodWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../../../types/routing"
|
||||
import { AdminPostExchangesShippingReqSchemaType } from "../../../validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingReqSchemaType>,
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
cancelBeginOrderExchangeWorkflow,
|
||||
confirmExchangeRequestWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AdminExchangeResponse } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { AdminExchangeResponse } from "@medusajs/framework/types"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -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,11 +1,11 @@
|
||||
import { beginExchangeOrderWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
Modules,
|
||||
promiseAll,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiddlewareRoute } from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { maybeApplyLinkFilter } from "../../utils/maybe-apply-link-filter"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as QueryConfig from "./query-config"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { deleteFulfillmentSetsWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
|
||||
+2
-2
@@ -7,13 +7,13 @@ import {
|
||||
AdminServiceZoneResponse,
|
||||
HttpTypes,
|
||||
IFulfillmentModuleService,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
MedusaError,
|
||||
Modules,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaRequest,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createServiceZonesWorkflow } from "@medusajs/core-flows"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
import { AdminCreateFulfillmentSetServiceZonesType } from "../../validators"
|
||||
import { refetchFulfillmentSet } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest<AdminCreateFulfillmentSetServiceZonesType>,
|
||||
|
||||
@@ -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 refetchFulfillmentSet = async (
|
||||
fulfillmentSetId: string,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
MedusaResponse,
|
||||
} from "../../../../../types/routing"
|
||||
import { refetchFulfillment } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createShipmentWorkflow } from "@medusajs/core-flows"
|
||||
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 refetchFulfillment = async (
|
||||
fulfillmentId: string,
|
||||
|
||||
@@ -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,5 +1,5 @@
|
||||
import { createFulfillmentWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
+2
-2
@@ -2,14 +2,14 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
MedusaError,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../../types/routing"
|
||||
|
||||
import {
|
||||
deleteInventoryLevelsWorkflow,
|
||||
updateInventoryLevelsWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import { refetchInventoryItem } from "../../../helpers"
|
||||
import { AdminUpdateInventoryLocationLevelType } from "../../../validators"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../../types/routing"
|
||||
|
||||
import { bulkCreateDeleteLevelsWorkflow } from "@medusajs/core-flows"
|
||||
import { BatchMethodRequest } from "@medusajs/types"
|
||||
import { BatchMethodRequest } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
|
||||
import { createInventoryLevelsWorkflow } from "@medusajs/core-flows"
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
AdminGetInventoryLocationLevelsParamsType,
|
||||
} from "../../validators"
|
||||
import { refetchInventoryItem } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest<AdminCreateInventoryLocationLevelType>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||
import {
|
||||
deleteInventoryItemWorkflow,
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
AdminUpdateInventoryItemType,
|
||||
} from "../validators"
|
||||
import { refetchInventoryItem } from "../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest<AdminGetInventoryItemParamsType>,
|
||||
|
||||
@@ -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 refetchInventoryItem = async (
|
||||
inventoryItemId: 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 {
|
||||
AdminCreateInventoryItem,
|
||||
|
||||
@@ -5,11 +5,11 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
import { createInventoryItemsWorkflow } from "@medusajs/core-flows"
|
||||
import { refetchInventoryItem } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCreateInventoryItem>,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||
|
||||
import { refreshInviteTokensWorkflow } from "@medusajs/core-flows"
|
||||
import { refetchInvite } from "../../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const POST = async (
|
||||
req: MedusaRequest,
|
||||
|
||||
@@ -2,11 +2,11 @@ import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../../types/routing"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
|
||||
import { deleteInvitesWorkflow } from "@medusajs/core-flows"
|
||||
import { refetchInvite } from "../helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { acceptInviteWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes, InviteWorkflow } from "@medusajs/types"
|
||||
import { MedusaError } from "@medusajs/utils"
|
||||
import { HttpTypes, InviteWorkflow } 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 refetchInvite = async (
|
||||
inviteId: string,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
AdminInviteAccept,
|
||||
} from "./validators"
|
||||
|
||||
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 { validateAndTransformBody } from "../../utils/validate-body"
|
||||
|
||||
@@ -5,11 +5,11 @@ import {
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
import { createInvitesWorkflow } from "@medusajs/core-flows"
|
||||
import { refetchInvite } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetInvitesParams>,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
} from "../../../../types/routing"
|
||||
import { AdminGetNotificationParamsType } from "../validators"
|
||||
import { refetchEntity } from "../../../utils/refetch-entity"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<AdminGetNotificationParamsType>,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
import { refetchEntities } from "../../utils/refetch-entity"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminNotificationListParams>,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { confirmOrderEditRequestWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
removeItemOrderEditActionWorkflow,
|
||||
updateOrderEditAddItemWorkflow,
|
||||
} from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { orderEditUpdateItemQuantityWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { orderEditAddNewItemWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { requestOrderEditRequestWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { cancelBeginOrderEditWorkflow } from "@medusajs/core-flows"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
|
||||
Loaded 100 of 417 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user