chore: use framework sub paths everywhere (#9253)
This commit is contained in:
committed by
GitHub
parent
48bea267dc
commit
a8e19faf8d
@@ -17,6 +17,7 @@
|
||||
"@medusajs/event-bus-local": "workspace:*",
|
||||
"@medusajs/medusa": "workspace:*",
|
||||
"@medusajs/modules-sdk": "workspace:^",
|
||||
"@medusajs/payment": "workspace:^",
|
||||
"@medusajs/pricing": "workspace:^",
|
||||
"@medusajs/product": "workspace:^",
|
||||
"@medusajs/promotion": "workspace:^",
|
||||
@@ -26,15 +27,12 @@
|
||||
"@medusajs/user": "workspace:^",
|
||||
"@medusajs/utils": "workspace:^",
|
||||
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
||||
"faker": "^5.5.3",
|
||||
"pg": "^8.11.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/core": "^1.4.8",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"form-data": "^4.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-node": "^29.7.0",
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const path = require("path")
|
||||
const express = require("express")
|
||||
const getPort = require("get-port")
|
||||
const { isObject } = require("@medusajs/utils")
|
||||
const { isObject } = require("@medusajs/framework/utils")
|
||||
const { setContainer } = require("./use-container")
|
||||
const { setPort, setExpressServer } = require("./use-api")
|
||||
|
||||
|
||||
@@ -4,8 +4,12 @@ import {
|
||||
IAuthModuleService,
|
||||
IUserModuleService,
|
||||
MedusaContainer,
|
||||
} from "@medusajs/types"
|
||||
import { ApiKeyType, Modules, PUBLISHABLE_KEY_HEADER } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
ApiKeyType,
|
||||
Modules,
|
||||
PUBLISHABLE_KEY_HEADER,
|
||||
} from "@medusajs/framework/utils"
|
||||
import jwt from "jsonwebtoken"
|
||||
import Scrypt from "scrypt-kdf"
|
||||
import { getContainer } from "../environment-helpers/use-container"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { HttpTypes } from "@medusajs/framework/types"
|
||||
|
||||
export const getProductFixture = (
|
||||
overrides: Partial<HttpTypes.AdminCreateProduct>
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
IRegionModuleService,
|
||||
IStoreModuleService,
|
||||
MedusaContainer,
|
||||
} from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export const seedStorefrontDefaults = async (
|
||||
container: MedusaContainer,
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"@medusajs/api-key": "workspace:^",
|
||||
"@medusajs/auth": "workspace:*",
|
||||
"@medusajs/cache-inmemory": "workspace:*",
|
||||
"@medusajs/core-flows": "workspace:*",
|
||||
"@medusajs/customer": "workspace:^",
|
||||
"@medusajs/event-bus-local": "workspace:*",
|
||||
"@medusajs/fulfillment": "workspace:^",
|
||||
@@ -30,7 +31,8 @@
|
||||
"@medusajs/user": "workspace:^",
|
||||
"@medusajs/utils": "workspace:^",
|
||||
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
||||
"faker": "^5.5.3",
|
||||
"form-data": "^4.0.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"medusa-test-utils": "workspace:*",
|
||||
"pg": "^8.11.3"
|
||||
},
|
||||
@@ -39,7 +41,6 @@
|
||||
"@swc/core": "^1.4.8",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-node": "^29.7.0",
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,16 @@ module.exports = {
|
||||
"@swc/jest",
|
||||
{
|
||||
jsc: {
|
||||
parser: { syntax: "typescript", decorators: true },
|
||||
transform: { decoratorMetadata: true },
|
||||
parser: {
|
||||
syntax: "typescript",
|
||||
decorators: true,
|
||||
},
|
||||
transform: {
|
||||
useDefineForClassFields: false,
|
||||
legacyDecorator: true,
|
||||
decoratorMetadata: true,
|
||||
},
|
||||
target: "ES2021",
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
createWorkflow,
|
||||
StepResponse,
|
||||
WorkflowData,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { medusaIntegrationTestRunner } from "medusa-test-utils"
|
||||
import { createAdminUser } from "../../../helpers/create-admin-user"
|
||||
|
||||
|
||||
@@ -13,13 +13,18 @@
|
||||
"@medusajs/api-key": "workspace:^",
|
||||
"@medusajs/auth": "workspace:*",
|
||||
"@medusajs/cache-inmemory": "workspace:*",
|
||||
"@medusajs/core-flows": "workspace:^",
|
||||
"@medusajs/currency": "workspace:^",
|
||||
"@medusajs/customer": "workspace:^",
|
||||
"@medusajs/event-bus-local": "workspace:*",
|
||||
"@medusajs/framework": "workspace:^",
|
||||
"@medusajs/fulfillment": "workspace:^",
|
||||
"@medusajs/fulfillment-manual": "workspace:^",
|
||||
"@medusajs/inventory-next": "workspace:^",
|
||||
"@medusajs/link-modules": "workspace:^",
|
||||
"@medusajs/medusa": "workspace:*",
|
||||
"@medusajs/modules-sdk": "workspace:^",
|
||||
"@medusajs/payment": "workspace:^",
|
||||
"@medusajs/pricing": "workspace:^",
|
||||
"@medusajs/product": "workspace:^",
|
||||
"@medusajs/promotion": "workspace:^",
|
||||
@@ -31,15 +36,16 @@
|
||||
"@medusajs/utils": "workspace:^",
|
||||
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
||||
"faker": "^5.5.3",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"medusa-test-utils": "workspace:*",
|
||||
"pg": "^8.11.3"
|
||||
"pg": "^8.11.3",
|
||||
"scrypt-kdf": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/types": "workspace:^",
|
||||
"@swc/core": "^1.4.8",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-node": "^29.7.0",
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["es5", "es6", "es2019"],
|
||||
"target": "es2022",
|
||||
"outDir": "./dist",
|
||||
"esModuleInterop": true,
|
||||
"declarationMap": true,
|
||||
"declaration": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true,
|
||||
"noImplicitReturns": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"noImplicitThis": true,
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"downlevelIteration": true // to use ES5 specific tooling
|
||||
},
|
||||
"extends": "../../_tsconfig.base.json",
|
||||
"include": ["src", "./medusa/**/*"],
|
||||
"exclude": [
|
||||
"./dist/**/*",
|
||||
@@ -29,3 +10,4 @@
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,23 @@
|
||||
"dotenv": "^10.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@faker-js/faker": "^5.5.3",
|
||||
"testcontainers": "^8.10.1"
|
||||
"express": "^4.21.0",
|
||||
"get-port": "^7.1.0",
|
||||
"@medusajs/medusa": "^1.20.10",
|
||||
"@medusajs/core-flows": "^0.0.10",
|
||||
"axios": "^1.7.7",
|
||||
"scrypt-kdf": "^2.0.1",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"@medusajs/framework": "^0.0.1",
|
||||
"@mikro-orm/core": "5.9.7",
|
||||
"@mikro-orm/knex": "5.9.7",
|
||||
"@mikro-orm/migrations": "5.9.7",
|
||||
"@mikro-orm/postgresql": "5.9.7",
|
||||
"awilix": "^8.0.1",
|
||||
"bignumber.js": "^9.1.2",
|
||||
"ioredis": "^5.4.1",
|
||||
"pg": "^8.13.0",
|
||||
"pg-god": "^1.0.12",
|
||||
"glob": "^11.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["es5", "es6", "es2019"],
|
||||
"target": "es2022",
|
||||
"outDir": "./dist",
|
||||
"esModuleInterop": true,
|
||||
"declarationMap": true,
|
||||
"declaration": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true,
|
||||
"noImplicitReturns": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"noImplicitThis": true,
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"downlevelIteration": true // to use ES5 specific tooling
|
||||
},
|
||||
"include": ["./**/*"],
|
||||
"extends": "../_tsconfig.base.json",
|
||||
"include": ["**/*"],
|
||||
"exclude": [
|
||||
"./dist/**/*",
|
||||
"dist",
|
||||
"./**/helpers",
|
||||
"./**/__snapshots__",
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
"winston": "^3.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/types": "^1.11.16",
|
||||
"@types/chalk": "^2.2.0",
|
||||
"@types/commander": "^2.12.2",
|
||||
"@types/configstore": "^6.0.0",
|
||||
@@ -52,7 +51,7 @@
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"prettier": "^2.8.8",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.0.4"
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"esModuleInterop": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"resolveJsonModule": true,
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"ts-node": {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"cli.js",
|
||||
"dist",
|
||||
"!dist/**/__tests__",
|
||||
"!dist/**/__mocks__",
|
||||
"!dist/**/__fixtures__"
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest --passWithNoTests src",
|
||||
"build": "rimraf dist && tsc",
|
||||
"build": "rimraf dist && tsc --build",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"author": "Sebastian Rindom",
|
||||
@@ -36,18 +36,9 @@
|
||||
"@swc/jest": "^0.2.36",
|
||||
"@types/yargs": "^15.0.15",
|
||||
"jest": "^29.7.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"rimraf": "^5.0.1",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ts-node": "^10.9.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"ts-node": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/utils": "1.11.9",
|
||||
"chalk": "^4.0.0",
|
||||
|
||||
@@ -9,6 +9,7 @@ import fs from "fs-extra"
|
||||
import hostedGitInfo from "hosted-git-info"
|
||||
import isValid from "is-valid-path"
|
||||
import sysPath from "path"
|
||||
import path from "path"
|
||||
import prompts from "prompts"
|
||||
import { Pool } from "pg"
|
||||
import url from "url"
|
||||
@@ -21,8 +22,10 @@ import reporter from "../reporter"
|
||||
import { getPackageManager, setPackageManager } from "../util/package-manager"
|
||||
import { PanicId } from "../reporter/panic-handler"
|
||||
import { clearProject } from "../util/clear-project"
|
||||
import path from "path"
|
||||
import { getNodeVersion, MIN_SUPPORTED_NODE_VERSION } from "@medusajs/utils"
|
||||
import {
|
||||
getNodeVersion,
|
||||
MIN_SUPPORTED_NODE_VERSION,
|
||||
} from "@medusajs/utils"
|
||||
|
||||
const removeUndefined = (obj) => {
|
||||
return Object.fromEntries(
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
"./workflows": "./dist/workflows/index.js",
|
||||
"./links": "./dist/links/index.js",
|
||||
"./jobs": "./dist/jobs/index.js",
|
||||
"./http": "./dist/http/index.js",
|
||||
"./telemetry": "./dist/telemetry/index.js",
|
||||
"./feature-flags": "./dist/feature-flags/index.js",
|
||||
"./utils": "./dist/utils/index.js",
|
||||
"./types": "./dist/types/index.js",
|
||||
"./orchestration": "./dist/orchestration/index.js",
|
||||
|
||||
@@ -290,7 +290,7 @@ export type ProjectConfigOptions = {
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
databaseDriverOptions?: Record<string, unknown> & {
|
||||
databaseDriverOptions?: Record<string, any> & {
|
||||
connection?: {
|
||||
/**
|
||||
* Configure support for TLS/SSL connection
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"directory": "packages/medusa-test-utils"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=20"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf dist && tsc --build",
|
||||
@@ -17,7 +17,10 @@
|
||||
"test": "jest --passWithNoTests src"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
"dist",
|
||||
"!dist/**/__tests__",
|
||||
"!dist/**/__mocks__",
|
||||
"!dist/**/__fixtures__"
|
||||
],
|
||||
"author": "Medusa",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -4,7 +4,7 @@ export async function configLoaderOverride(
|
||||
entryDirectory: string,
|
||||
override: { clientUrl: string; debug?: boolean }
|
||||
) {
|
||||
const { configManager } = await import("@medusajs/framework")
|
||||
const { configManager } = await import("@medusajs/framework/config")
|
||||
const { configModule, error } = getConfigFile<
|
||||
ReturnType<typeof configManager.loadConfig>
|
||||
>(entryDirectory, "medusa-config.js")
|
||||
@@ -13,6 +13,7 @@ export async function configLoaderOverride(
|
||||
throw new Error(error.message || "Error during config loading")
|
||||
}
|
||||
|
||||
configModule.projectConfig.databaseDriverOptions
|
||||
configModule.projectConfig.databaseUrl = override.clientUrl
|
||||
configModule.projectConfig.databaseLogging = !!override.debug
|
||||
configModule.projectConfig.databaseDriverOptions =
|
||||
|
||||
@@ -6,15 +6,15 @@ import {
|
||||
} from "@medusajs/framework/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { dbTestUtilFactory, getDatabaseURL } from "./database"
|
||||
import { startApp } from "./medusa-test-runner-utils/bootstrap-app"
|
||||
import { clearInstances } from "./medusa-test-runner-utils/clear-instances"
|
||||
import { configLoaderOverride } from "./medusa-test-runner-utils/config"
|
||||
import {
|
||||
applyEnvVarsToProcess,
|
||||
clearInstances,
|
||||
configLoaderOverride,
|
||||
initDb,
|
||||
migrateDatabase,
|
||||
startApp,
|
||||
syncLinks,
|
||||
} from "./medusa-test-runner-utils/use-db"
|
||||
import { applyEnvVarsToProcess } from "./medusa-test-runner-utils/utils"
|
||||
} from "./medusa-test-runner-utils"
|
||||
|
||||
export interface MedusaSuiteOptions {
|
||||
dbConnection: any // knex instance
|
||||
@@ -161,7 +161,7 @@ export function medusaIntegrationTestRunner({
|
||||
await syncLinks(appLoader, cwd, containerRes)
|
||||
}
|
||||
|
||||
const axios = (await import("axios")).default.default
|
||||
const { default: axios } = (await import("axios")) as any
|
||||
|
||||
const cancelTokenSource = axios.CancelToken.source()
|
||||
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user