chore: use framework sub paths everywhere (#9253)
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
"@medusajs/event-bus-local": "workspace:*",
|
"@medusajs/event-bus-local": "workspace:*",
|
||||||
"@medusajs/medusa": "workspace:*",
|
"@medusajs/medusa": "workspace:*",
|
||||||
"@medusajs/modules-sdk": "workspace:^",
|
"@medusajs/modules-sdk": "workspace:^",
|
||||||
|
"@medusajs/payment": "workspace:^",
|
||||||
"@medusajs/pricing": "workspace:^",
|
"@medusajs/pricing": "workspace:^",
|
||||||
"@medusajs/product": "workspace:^",
|
"@medusajs/product": "workspace:^",
|
||||||
"@medusajs/promotion": "workspace:^",
|
"@medusajs/promotion": "workspace:^",
|
||||||
@@ -26,15 +27,12 @@
|
|||||||
"@medusajs/user": "workspace:^",
|
"@medusajs/user": "workspace:^",
|
||||||
"@medusajs/utils": "workspace:^",
|
"@medusajs/utils": "workspace:^",
|
||||||
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
||||||
"faker": "^5.5.3",
|
|
||||||
"pg": "^8.11.3"
|
"pg": "^8.11.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@swc/core": "^1.4.8",
|
"@swc/core": "^1.4.8",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"form-data": "^4.0.0",
|
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-environment-node": "^29.7.0",
|
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
const path = require("path")
|
const path = require("path")
|
||||||
const express = require("express")
|
const express = require("express")
|
||||||
const getPort = require("get-port")
|
const getPort = require("get-port")
|
||||||
const { isObject } = require("@medusajs/utils")
|
const { isObject } = require("@medusajs/framework/utils")
|
||||||
const { setContainer } = require("./use-container")
|
const { setContainer } = require("./use-container")
|
||||||
const { setPort, setExpressServer } = require("./use-api")
|
const { setPort, setExpressServer } = require("./use-api")
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,12 @@ import {
|
|||||||
IAuthModuleService,
|
IAuthModuleService,
|
||||||
IUserModuleService,
|
IUserModuleService,
|
||||||
MedusaContainer,
|
MedusaContainer,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { ApiKeyType, Modules, PUBLISHABLE_KEY_HEADER } from "@medusajs/utils"
|
import {
|
||||||
|
ApiKeyType,
|
||||||
|
Modules,
|
||||||
|
PUBLISHABLE_KEY_HEADER,
|
||||||
|
} from "@medusajs/framework/utils"
|
||||||
import jwt from "jsonwebtoken"
|
import jwt from "jsonwebtoken"
|
||||||
import Scrypt from "scrypt-kdf"
|
import Scrypt from "scrypt-kdf"
|
||||||
import { getContainer } from "../environment-helpers/use-container"
|
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 = (
|
export const getProductFixture = (
|
||||||
overrides: Partial<HttpTypes.AdminCreateProduct>
|
overrides: Partial<HttpTypes.AdminCreateProduct>
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import {
|
|||||||
IRegionModuleService,
|
IRegionModuleService,
|
||||||
IStoreModuleService,
|
IStoreModuleService,
|
||||||
MedusaContainer,
|
MedusaContainer,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { Modules } from "@medusajs/utils"
|
import { Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const seedStorefrontDefaults = async (
|
export const seedStorefrontDefaults = async (
|
||||||
container: MedusaContainer,
|
container: MedusaContainer,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"@medusajs/api-key": "workspace:^",
|
"@medusajs/api-key": "workspace:^",
|
||||||
"@medusajs/auth": "workspace:*",
|
"@medusajs/auth": "workspace:*",
|
||||||
"@medusajs/cache-inmemory": "workspace:*",
|
"@medusajs/cache-inmemory": "workspace:*",
|
||||||
|
"@medusajs/core-flows": "workspace:*",
|
||||||
"@medusajs/customer": "workspace:^",
|
"@medusajs/customer": "workspace:^",
|
||||||
"@medusajs/event-bus-local": "workspace:*",
|
"@medusajs/event-bus-local": "workspace:*",
|
||||||
"@medusajs/fulfillment": "workspace:^",
|
"@medusajs/fulfillment": "workspace:^",
|
||||||
@@ -30,7 +31,8 @@
|
|||||||
"@medusajs/user": "workspace:^",
|
"@medusajs/user": "workspace:^",
|
||||||
"@medusajs/utils": "workspace:^",
|
"@medusajs/utils": "workspace:^",
|
||||||
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
||||||
"faker": "^5.5.3",
|
"form-data": "^4.0.0",
|
||||||
|
"jsonwebtoken": "^9.0.2",
|
||||||
"medusa-test-utils": "workspace:*",
|
"medusa-test-utils": "workspace:*",
|
||||||
"pg": "^8.11.3"
|
"pg": "^8.11.3"
|
||||||
},
|
},
|
||||||
@@ -39,7 +41,6 @@
|
|||||||
"@swc/core": "^1.4.8",
|
"@swc/core": "^1.4.8",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-environment-node": "^29.7.0",
|
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,16 @@ module.exports = {
|
|||||||
"@swc/jest",
|
"@swc/jest",
|
||||||
{
|
{
|
||||||
jsc: {
|
jsc: {
|
||||||
parser: { syntax: "typescript", decorators: true },
|
parser: {
|
||||||
transform: { decoratorMetadata: true },
|
syntax: "typescript",
|
||||||
|
decorators: true,
|
||||||
|
},
|
||||||
|
transform: {
|
||||||
|
useDefineForClassFields: false,
|
||||||
|
legacyDecorator: true,
|
||||||
|
decoratorMetadata: true,
|
||||||
|
},
|
||||||
|
target: "ES2021",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
createWorkflow,
|
createWorkflow,
|
||||||
StepResponse,
|
StepResponse,
|
||||||
WorkflowData,
|
WorkflowData,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { medusaIntegrationTestRunner } from "medusa-test-utils"
|
import { medusaIntegrationTestRunner } from "medusa-test-utils"
|
||||||
import { createAdminUser } from "../../../helpers/create-admin-user"
|
import { createAdminUser } from "../../../helpers/create-admin-user"
|
||||||
|
|
||||||
|
|||||||
@@ -13,13 +13,18 @@
|
|||||||
"@medusajs/api-key": "workspace:^",
|
"@medusajs/api-key": "workspace:^",
|
||||||
"@medusajs/auth": "workspace:*",
|
"@medusajs/auth": "workspace:*",
|
||||||
"@medusajs/cache-inmemory": "workspace:*",
|
"@medusajs/cache-inmemory": "workspace:*",
|
||||||
|
"@medusajs/core-flows": "workspace:^",
|
||||||
|
"@medusajs/currency": "workspace:^",
|
||||||
"@medusajs/customer": "workspace:^",
|
"@medusajs/customer": "workspace:^",
|
||||||
"@medusajs/event-bus-local": "workspace:*",
|
"@medusajs/event-bus-local": "workspace:*",
|
||||||
|
"@medusajs/framework": "workspace:^",
|
||||||
"@medusajs/fulfillment": "workspace:^",
|
"@medusajs/fulfillment": "workspace:^",
|
||||||
"@medusajs/fulfillment-manual": "workspace:^",
|
"@medusajs/fulfillment-manual": "workspace:^",
|
||||||
"@medusajs/inventory-next": "workspace:^",
|
"@medusajs/inventory-next": "workspace:^",
|
||||||
|
"@medusajs/link-modules": "workspace:^",
|
||||||
"@medusajs/medusa": "workspace:*",
|
"@medusajs/medusa": "workspace:*",
|
||||||
"@medusajs/modules-sdk": "workspace:^",
|
"@medusajs/modules-sdk": "workspace:^",
|
||||||
|
"@medusajs/payment": "workspace:^",
|
||||||
"@medusajs/pricing": "workspace:^",
|
"@medusajs/pricing": "workspace:^",
|
||||||
"@medusajs/product": "workspace:^",
|
"@medusajs/product": "workspace:^",
|
||||||
"@medusajs/promotion": "workspace:^",
|
"@medusajs/promotion": "workspace:^",
|
||||||
@@ -31,15 +36,16 @@
|
|||||||
"@medusajs/utils": "workspace:^",
|
"@medusajs/utils": "workspace:^",
|
||||||
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
"@medusajs/workflow-engine-inmemory": "workspace:*",
|
||||||
"faker": "^5.5.3",
|
"faker": "^5.5.3",
|
||||||
|
"jsonwebtoken": "^9.0.2",
|
||||||
"medusa-test-utils": "workspace:*",
|
"medusa-test-utils": "workspace:*",
|
||||||
"pg": "^8.11.3"
|
"pg": "^8.11.3",
|
||||||
|
"scrypt-kdf": "^2.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "workspace:^",
|
"@medusajs/types": "workspace:^",
|
||||||
"@swc/core": "^1.4.8",
|
"@swc/core": "^1.4.8",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-environment-node": "^29.7.0",
|
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,5 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"extends": "../../_tsconfig.base.json",
|
||||||
"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": ["src", "./medusa/**/*"],
|
"include": ["src", "./medusa/**/*"],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"./dist/**/*",
|
"./dist/**/*",
|
||||||
@@ -29,3 +10,4 @@
|
|||||||
"node_modules"
|
"node_modules"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,23 @@
|
|||||||
"dotenv": "^10.0.0"
|
"dotenv": "^10.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@faker-js/faker": "^5.5.3",
|
"express": "^4.21.0",
|
||||||
"testcontainers": "^8.10.1"
|
"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": {
|
"extends": "../_tsconfig.base.json",
|
||||||
"lib": ["es5", "es6", "es2019"],
|
"include": ["**/*"],
|
||||||
"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": ["./**/*"],
|
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"./dist/**/*",
|
"dist",
|
||||||
"./**/helpers",
|
"./**/helpers",
|
||||||
"./**/__snapshots__",
|
"./**/__snapshots__",
|
||||||
"node_modules"
|
"node_modules"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
"winston": "^3.9.0"
|
"winston": "^3.9.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "^1.11.16",
|
|
||||||
"@types/chalk": "^2.2.0",
|
"@types/chalk": "^2.2.0",
|
||||||
"@types/commander": "^2.12.2",
|
"@types/commander": "^2.12.2",
|
||||||
"@types/configstore": "^6.0.0",
|
"@types/configstore": "^6.0.0",
|
||||||
@@ -52,7 +51,7 @@
|
|||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.16"
|
"node": ">=14.16"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
|
||||||
"cli.js",
|
"cli.js",
|
||||||
|
"dist",
|
||||||
"!dist/**/__tests__",
|
"!dist/**/__tests__",
|
||||||
"!dist/**/__mocks__",
|
"!dist/**/__mocks__",
|
||||||
"!dist/**/__fixtures__"
|
"!dist/**/__fixtures__"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest --passWithNoTests src",
|
"test": "jest --passWithNoTests src",
|
||||||
"build": "rimraf dist && tsc",
|
"build": "rimraf dist && tsc --build",
|
||||||
"watch": "tsc --watch"
|
"watch": "tsc --watch"
|
||||||
},
|
},
|
||||||
"author": "Sebastian Rindom",
|
"author": "Sebastian Rindom",
|
||||||
@@ -36,18 +36,9 @@
|
|||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"@types/yargs": "^15.0.15",
|
"@types/yargs": "^15.0.15",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"ts-node": "^10.9.2",
|
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
|
||||||
"ts-node": "^10.9.2"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"ts-node": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@medusajs/utils": "1.11.9",
|
"@medusajs/utils": "1.11.9",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import fs from "fs-extra"
|
|||||||
import hostedGitInfo from "hosted-git-info"
|
import hostedGitInfo from "hosted-git-info"
|
||||||
import isValid from "is-valid-path"
|
import isValid from "is-valid-path"
|
||||||
import sysPath from "path"
|
import sysPath from "path"
|
||||||
|
import path from "path"
|
||||||
import prompts from "prompts"
|
import prompts from "prompts"
|
||||||
import { Pool } from "pg"
|
import { Pool } from "pg"
|
||||||
import url from "url"
|
import url from "url"
|
||||||
@@ -21,8 +22,10 @@ import reporter from "../reporter"
|
|||||||
import { getPackageManager, setPackageManager } from "../util/package-manager"
|
import { getPackageManager, setPackageManager } from "../util/package-manager"
|
||||||
import { PanicId } from "../reporter/panic-handler"
|
import { PanicId } from "../reporter/panic-handler"
|
||||||
import { clearProject } from "../util/clear-project"
|
import { clearProject } from "../util/clear-project"
|
||||||
import path from "path"
|
import {
|
||||||
import { getNodeVersion, MIN_SUPPORTED_NODE_VERSION } from "@medusajs/utils"
|
getNodeVersion,
|
||||||
|
MIN_SUPPORTED_NODE_VERSION,
|
||||||
|
} from "@medusajs/utils"
|
||||||
|
|
||||||
const removeUndefined = (obj) => {
|
const removeUndefined = (obj) => {
|
||||||
return Object.fromEntries(
|
return Object.fromEntries(
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
"./workflows": "./dist/workflows/index.js",
|
"./workflows": "./dist/workflows/index.js",
|
||||||
"./links": "./dist/links/index.js",
|
"./links": "./dist/links/index.js",
|
||||||
"./jobs": "./dist/jobs/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",
|
"./utils": "./dist/utils/index.js",
|
||||||
"./types": "./dist/types/index.js",
|
"./types": "./dist/types/index.js",
|
||||||
"./orchestration": "./dist/orchestration/index.js",
|
"./orchestration": "./dist/orchestration/index.js",
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ export type ProjectConfigOptions = {
|
|||||||
* })
|
* })
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
databaseDriverOptions?: Record<string, unknown> & {
|
databaseDriverOptions?: Record<string, any> & {
|
||||||
connection?: {
|
connection?: {
|
||||||
/**
|
/**
|
||||||
* Configure support for TLS/SSL connection
|
* Configure support for TLS/SSL connection
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"directory": "packages/medusa-test-utils"
|
"directory": "packages/medusa-test-utils"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=20"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf dist && tsc --build",
|
"build": "rimraf dist && tsc --build",
|
||||||
@@ -17,7 +17,10 @@
|
|||||||
"test": "jest --passWithNoTests src"
|
"test": "jest --passWithNoTests src"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist",
|
||||||
|
"!dist/**/__tests__",
|
||||||
|
"!dist/**/__mocks__",
|
||||||
|
"!dist/**/__fixtures__"
|
||||||
],
|
],
|
||||||
"author": "Medusa",
|
"author": "Medusa",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export async function configLoaderOverride(
|
|||||||
entryDirectory: string,
|
entryDirectory: string,
|
||||||
override: { clientUrl: string; debug?: boolean }
|
override: { clientUrl: string; debug?: boolean }
|
||||||
) {
|
) {
|
||||||
const { configManager } = await import("@medusajs/framework")
|
const { configManager } = await import("@medusajs/framework/config")
|
||||||
const { configModule, error } = getConfigFile<
|
const { configModule, error } = getConfigFile<
|
||||||
ReturnType<typeof configManager.loadConfig>
|
ReturnType<typeof configManager.loadConfig>
|
||||||
>(entryDirectory, "medusa-config.js")
|
>(entryDirectory, "medusa-config.js")
|
||||||
@@ -13,6 +13,7 @@ export async function configLoaderOverride(
|
|||||||
throw new Error(error.message || "Error during config loading")
|
throw new Error(error.message || "Error during config loading")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configModule.projectConfig.databaseDriverOptions
|
||||||
configModule.projectConfig.databaseUrl = override.clientUrl
|
configModule.projectConfig.databaseUrl = override.clientUrl
|
||||||
configModule.projectConfig.databaseLogging = !!override.debug
|
configModule.projectConfig.databaseLogging = !!override.debug
|
||||||
configModule.projectConfig.databaseDriverOptions =
|
configModule.projectConfig.databaseDriverOptions =
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ import {
|
|||||||
} from "@medusajs/framework/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "awilix"
|
||||||
import { dbTestUtilFactory, getDatabaseURL } from "./database"
|
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 {
|
import {
|
||||||
|
applyEnvVarsToProcess,
|
||||||
|
clearInstances,
|
||||||
|
configLoaderOverride,
|
||||||
initDb,
|
initDb,
|
||||||
migrateDatabase,
|
migrateDatabase,
|
||||||
|
startApp,
|
||||||
syncLinks,
|
syncLinks,
|
||||||
} from "./medusa-test-runner-utils/use-db"
|
} from "./medusa-test-runner-utils"
|
||||||
import { applyEnvVarsToProcess } from "./medusa-test-runner-utils/utils"
|
|
||||||
|
|
||||||
export interface MedusaSuiteOptions {
|
export interface MedusaSuiteOptions {
|
||||||
dbConnection: any // knex instance
|
dbConnection: any // knex instance
|
||||||
@@ -161,7 +161,7 @@ export function medusaIntegrationTestRunner({
|
|||||||
await syncLinks(appLoader, cwd, containerRes)
|
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()
|
const cancelTokenSource = axios.CancelToken.source()
|
||||||
|
|
||||||
|
|||||||
@@ -13,15 +13,25 @@
|
|||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
"oas"
|
"oas",
|
||||||
|
"!dist/**/__tests__",
|
||||||
|
"!dist/**/__mocks__",
|
||||||
|
"!dist/**/__fixtures__"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=20"
|
||||||
},
|
},
|
||||||
"author": "Sebastian Rindom",
|
"author": "Sebastian Rindom",
|
||||||
"license": "MIT",
|
"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": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "^1.11.16",
|
"@medusajs/framework": "^0.0.1",
|
||||||
|
"@opentelemetry/api": "^1.9.0",
|
||||||
"@opentelemetry/instrumentation": "^0.53.0",
|
"@opentelemetry/instrumentation": "^0.53.0",
|
||||||
"@opentelemetry/instrumentation-pg": "^0.44.0",
|
"@opentelemetry/instrumentation-pg": "^0.44.0",
|
||||||
"@opentelemetry/resources": "^1.26.0",
|
"@opentelemetry/resources": "^1.26.0",
|
||||||
@@ -30,47 +40,28 @@
|
|||||||
"@swc/core": "^1.7.28",
|
"@swc/core": "^1.7.28",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
"@types/ioredis": "^4.28.10",
|
|
||||||
"@types/jsonwebtoken": "^8.5.9",
|
"@types/jsonwebtoken": "^8.5.9",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash": "^4.14.191",
|
||||||
"@types/multer": "^1.4.7",
|
"@types/multer": "^1.4.7",
|
||||||
"cross-env": "^5.2.1",
|
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"supertest": "^4.0.2",
|
"typescript": "^5.6.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"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@inquirer/checkbox": "^2.3.11",
|
"@inquirer/checkbox": "^2.3.11",
|
||||||
"@inquirer/input": "^2.2.9",
|
"@inquirer/input": "^2.2.9",
|
||||||
"@medusajs/admin-bundler": "0.0.1",
|
"@medusajs/admin-bundler": "0.0.1",
|
||||||
"@medusajs/core-flows": "^0.0.9",
|
"@medusajs/core-flows": "^0.0.9",
|
||||||
"@medusajs/framework": "^0.0.1",
|
|
||||||
"@medusajs/link-modules": "^0.2.11",
|
"@medusajs/link-modules": "^0.2.11",
|
||||||
"@medusajs/utils": "^1.11.9",
|
|
||||||
"@medusajs/workflows-sdk": "^0.1.6",
|
|
||||||
"@swc/core": "1.5.7",
|
"@swc/core": "1.5.7",
|
||||||
"@swc/helpers": "^0.5.11",
|
"@swc/helpers": "^0.5.11",
|
||||||
"body-parser": "^1.19.0",
|
|
||||||
"boxen": "^5.0.1",
|
"boxen": "^5.0.1",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
"chokidar": "^3.4.2",
|
"chokidar": "^3.4.2",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"connect-redis": "^5.0.0",
|
|
||||||
"cookie-parser": "^1.4.6",
|
|
||||||
"cors": "^2.8.5",
|
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"fs-exists-cached": "^1.0.0",
|
"fs-exists-cached": "^1.0.0",
|
||||||
"glob": "^7.1.6",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"medusa-telemetry": "^0.0.17",
|
"medusa-telemetry": "^0.0.17",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
@@ -81,5 +72,9 @@
|
|||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"zod": "3.22.4"
|
"zod": "3.22.4"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
|
"awilix": "^8.0.1"
|
||||||
|
},
|
||||||
"gitHead": "cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e"
|
"gitHead": "cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
import { AdminRevokeApiKeyType } from "../../validators"
|
import { AdminRevokeApiKeyType } from "../../validators"
|
||||||
import { refetchApiKey } from "../../helpers"
|
import { refetchApiKey } from "../../helpers"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminRevokeApiKeyType>,
|
req: AuthenticatedMedusaRequest<AdminRevokeApiKeyType>,
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import {
|
|||||||
|
|
||||||
import { refetchApiKey } from "../helpers"
|
import { refetchApiKey } from "../helpers"
|
||||||
import { AdminUpdateApiKeyType } from "../validators"
|
import { AdminUpdateApiKeyType } from "../validators"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { linkSalesChannelsToApiKeyWorkflow } from "@medusajs/core-flows"
|
import { linkSalesChannelsToApiKeyWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
import { HttpTypes, LinkMethodRequest } from "@medusajs/framework/types"
|
||||||
import { ApiKeyType, MedusaError } from "@medusajs/utils"
|
import { ApiKeyType, MedusaError } from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const refetchApiKey = async (
|
export const refetchApiKey = async (
|
||||||
apiKeyId: string,
|
apiKeyId: string,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
|
|
||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import {
|
import {
|
||||||
AdminCreateApiKey,
|
AdminCreateApiKey,
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import { createApiKeysWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../types/routing"
|
} from "../../../types/routing"
|
||||||
import { AdminCreateApiKeyType } from "./validators"
|
import { AdminCreateApiKeyType } from "./validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetApiKeysParams>,
|
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetApiKeysParams>,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ApiKeyType } from "@medusajs/utils"
|
import { ApiKeyType } from "@medusajs/framework/utils"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
import {
|
import {
|
||||||
createFindParams,
|
createFindParams,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
|
|
||||||
import { addOrRemoveCampaignPromotionsWorkflow } from "@medusajs/core-flows"
|
import { addOrRemoveCampaignPromotionsWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
import { HttpTypes, LinkMethodRequest } from "@medusajs/framework/types"
|
||||||
import { refetchCampaign } from "../../helpers"
|
import { refetchCampaign } from "../../helpers"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import {
|
|||||||
|
|
||||||
import { refetchCampaign } from "../helpers"
|
import { refetchCampaign } from "../helpers"
|
||||||
import { AdminUpdateCampaignType } from "../validators"
|
import { AdminUpdateCampaignType } from "../validators"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const refetchCampaign = async (
|
export const refetchCampaign = async (
|
||||||
campaignId: string,
|
campaignId: string,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import { createLinkBody } from "../../utils/validators"
|
import { createLinkBody } from "../../utils/validators"
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import { createCampaignsWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { AdminCreateCampaignType } from "./validators"
|
import { AdminCreateCampaignType } from "./validators"
|
||||||
import { refetchCampaign } from "./helpers"
|
import { refetchCampaign } from "./helpers"
|
||||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetCampaignParams>,
|
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 { z } from "zod"
|
||||||
import {
|
import {
|
||||||
createFindParams,
|
createFindParams,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { cancelOrderClaimWorkflow } from "@medusajs/core-flows"
|
import { cancelOrderClaimWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import {
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { AdminPostClaimsItemsActionReqSchemaType } from "../../../validators"
|
import { AdminPostClaimsItemsActionReqSchemaType } from "../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostClaimsItemsActionReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostClaimsItemsActionReqSchemaType>,
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import { orderClaimItemWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
import { AdminPostClaimItemsReqSchemaType } from "../../validators"
|
import { AdminPostClaimItemsReqSchemaType } from "../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostClaimItemsReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostClaimItemsReqSchemaType>,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
import { refetchEntity } from "../../../../../../utils/refetch-entity"
|
import { refetchEntity } from "../../../../../../utils/refetch-entity"
|
||||||
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
||||||
import { AdminPostReturnsRequestItemsActionReqSchemaType } from "../../../../../returns/validators"
|
import { AdminPostReturnsRequestItemsActionReqSchemaType } from "../../../../../returns/validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostReturnsRequestItemsActionReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostReturnsRequestItemsActionReqSchemaType>,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { orderClaimRequestItemReturnWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
||||||
import { AdminPostReturnsRequestItemsReqSchemaType } from "../../../../returns/validators"
|
import { AdminPostReturnsRequestItemsReqSchemaType } from "../../../../returns/validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostReturnsRequestItemsReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostReturnsRequestItemsReqSchemaType>,
|
||||||
|
|||||||
+2
-2
@@ -5,14 +5,14 @@ import {
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../../types/routing"
|
} from "../../../../../../../types/routing"
|
||||||
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
||||||
import { AdminPostClaimsShippingActionReqSchemaType } from "../../../../validators"
|
import { AdminPostClaimsShippingActionReqSchemaType } from "../../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingActionReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingActionReqSchemaType>,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { createClaimShippingMethodWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
||||||
import { AdminPostReturnsShippingReqSchemaType } from "../../../../returns/validators"
|
import { AdminPostReturnsShippingReqSchemaType } from "../../../../returns/validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostReturnsShippingReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostReturnsShippingReqSchemaType>,
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import {
|
|||||||
removeAddItemClaimActionWorkflow,
|
removeAddItemClaimActionWorkflow,
|
||||||
updateClaimAddItemWorkflow,
|
updateClaimAddItemWorkflow,
|
||||||
} from "@medusajs/core-flows"
|
} from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import { orderClaimAddNewItemWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { AdminPostClaimsAddItemsReqSchemaType } from "../../../validators"
|
import { AdminPostClaimsAddItemsReqSchemaType } from "../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostClaimsAddItemsReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostClaimsAddItemsReqSchemaType>,
|
||||||
|
|||||||
+2
-2
@@ -5,13 +5,13 @@ import {
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../../types/routing"
|
} from "../../../../../../../types/routing"
|
||||||
import { AdminPostClaimsShippingActionReqSchemaType } from "../../../../validators"
|
import { AdminPostClaimsShippingActionReqSchemaType } from "../../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingActionReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingActionReqSchemaType>,
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import { createClaimShippingMethodWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { AdminPostClaimsShippingReqSchemaType } from "../../../validators"
|
import { AdminPostClaimsShippingReqSchemaType } from "../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostClaimsShippingReqSchemaType>,
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import {
|
|||||||
cancelBeginOrderClaimWorkflow,
|
cancelBeginOrderClaimWorkflow,
|
||||||
confirmClaimRequestWorkflow,
|
confirmClaimRequestWorkflow,
|
||||||
} from "@medusajs/core-flows"
|
} from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import {
|
|||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../types/routing"
|
} from "../../../../types/routing"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import { refetchEntity } from "../../../utils/refetch-entity"
|
import { refetchEntity } from "../../../utils/refetch-entity"
|
||||||
import { AdminClaimResponse } from "@medusajs/types"
|
import { AdminClaimResponse } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { beginClaimOrderWorkflow } from "@medusajs/core-flows"
|
import { beginClaimOrderWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
Modules,
|
Modules,
|
||||||
promiseAll,
|
promiseAll,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ClaimReason, ClaimType } from "@medusajs/utils"
|
import { ClaimReason, ClaimType } from "@medusajs/framework/utils"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
import {
|
import {
|
||||||
createFindParams,
|
createFindParams,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { batchLinkProductsToCollectionWorkflow } from "@medusajs/core-flows"
|
import { batchLinkProductsToCollectionWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
import { HttpTypes, LinkMethodRequest } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import {
|
|||||||
|
|
||||||
import { AdminUpdateCollectionType } from "../validators"
|
import { AdminUpdateCollectionType } from "../validators"
|
||||||
import { refetchCollection } from "../helpers"
|
import { refetchCollection } from "../helpers"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const refetchCollection = async (
|
export const refetchCollection = async (
|
||||||
collectionId: string,
|
collectionId: string,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import {
|
import {
|
||||||
AdminCreateCollection,
|
AdminCreateCollection,
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import { createCollectionsWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { AdminCreateCollectionType } from "./validators"
|
import { AdminCreateCollectionType } from "./validators"
|
||||||
import { refetchCollection } from "./helpers"
|
import { refetchCollection } from "./helpers"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCollectionListParams>,
|
req: AuthenticatedMedusaRequest<HttpTypes.AdminCollectionListParams>,
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import {
|
|||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
MedusaError,
|
MedusaError,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: MedusaRequest,
|
req: MedusaRequest,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
import { AdminGetCurrencyParams, AdminGetCurrenciesParams } from "./validators"
|
import { AdminGetCurrencyParams, AdminGetCurrenciesParams } from "./validators"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: MedusaRequest<HttpTypes.AdminCurrencyListParams>,
|
req: MedusaRequest<HttpTypes.AdminCurrencyListParams>,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
|
|
||||||
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
import { HttpTypes, LinkMethodRequest } from "@medusajs/framework/types"
|
||||||
import { refetchCustomerGroup } from "../../helpers"
|
import { refetchCustomerGroup } from "../../helpers"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import {
|
|||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../types/routing"
|
} from "../../../../types/routing"
|
||||||
|
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import { refetchCustomerGroup } from "../helpers"
|
import { refetchCustomerGroup } from "../helpers"
|
||||||
import { AdminUpdateCustomerGroupType } from "../validators"
|
import { AdminUpdateCustomerGroupType } from "../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const refetchCustomerGroup = async (
|
export const refetchCustomerGroup = async (
|
||||||
customerGroupId: string,
|
customerGroupId: string,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import { createLinkBody } from "../../utils/validators"
|
import { createLinkBody } from "../../utils/validators"
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import { createCustomerGroupsWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { AdminCreateCustomerGroupType } from "./validators"
|
import { AdminCreateCustomerGroupType } from "./validators"
|
||||||
import { refetchCustomerGroup } from "./helpers"
|
import { refetchCustomerGroup } from "./helpers"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetCustomerGroupsParams>,
|
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetCustomerGroupsParams>,
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import {
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { AdminCreateCustomerAddressType } from "../../../validators"
|
import { AdminCreateCustomerAddressType } from "../../../validators"
|
||||||
import { refetchCustomer } from "../../../helpers"
|
import { refetchCustomer } from "../../../helpers"
|
||||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import {
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { AdminCreateCustomerAddressType } from "../../validators"
|
import { AdminCreateCustomerAddressType } from "../../validators"
|
||||||
import { refetchCustomer } from "../../helpers"
|
import { refetchCustomer } from "../../helpers"
|
||||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCustomerAddressFilters>,
|
req: AuthenticatedMedusaRequest<HttpTypes.AdminCustomerAddressFilters>,
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import {
|
|||||||
removeCustomerAccountWorkflow,
|
removeCustomerAccountWorkflow,
|
||||||
updateCustomersWorkflow,
|
updateCustomersWorkflow,
|
||||||
} from "@medusajs/core-flows"
|
} from "@medusajs/core-flows"
|
||||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const refetchCustomer = async (
|
export const refetchCustomer = async (
|
||||||
customerId: string,
|
customerId: string,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
AdminUpdateCustomerAddress,
|
AdminUpdateCustomerAddress,
|
||||||
} from "./validators"
|
} from "./validators"
|
||||||
|
|
||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { createCustomersWorkflow } from "@medusajs/core-flows"
|
import { createCustomersWorkflow } from "@medusajs/core-flows"
|
||||||
|
|
||||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
import { AdditionalData, HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
import { MedusaRequest, MedusaResponse } from "../../../../types/routing"
|
||||||
import { refetchOrder } from "../helpers"
|
import { refetchOrder } from "../helpers"
|
||||||
import { defaultAdminOrderFields } from "../query-config"
|
import { defaultAdminOrderFields } from "../query-config"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: MedusaRequest,
|
req: MedusaRequest,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const refetchOrder = async (
|
export const refetchOrder = async (
|
||||||
orderId: string,
|
orderId: string,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
OrderStatus,
|
OrderStatus,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaRequest,
|
MedusaRequest,
|
||||||
@@ -11,7 +11,11 @@ import {
|
|||||||
} from "../../../types/routing"
|
} from "../../../types/routing"
|
||||||
import { AdminCreateDraftOrderType } from "./validators"
|
import { AdminCreateDraftOrderType } from "./validators"
|
||||||
import { refetchOrder } from "./helpers"
|
import { refetchOrder } from "./helpers"
|
||||||
import { AdditionalData, CreateOrderDTO, HttpTypes } from "@medusajs/types"
|
import {
|
||||||
|
AdditionalData,
|
||||||
|
CreateOrderDTO,
|
||||||
|
HttpTypes,
|
||||||
|
} from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: MedusaRequest<HttpTypes.AdminOrderFilters>,
|
req: MedusaRequest<HttpTypes.AdminOrderFilters>,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { cancelOrderExchangeWorkflow } from "@medusajs/core-flows"
|
import { cancelOrderExchangeWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import {
|
|||||||
removeItemReturnActionWorkflow,
|
removeItemReturnActionWorkflow,
|
||||||
updateRequestItemReturnWorkflow,
|
updateRequestItemReturnWorkflow,
|
||||||
} from "@medusajs/core-flows"
|
} from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { orderExchangeRequestItemReturnWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
||||||
import { AdminPostExchangesReturnRequestItemsReqSchemaType } from "../../../validators"
|
import { AdminPostExchangesReturnRequestItemsReqSchemaType } from "../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostExchangesReturnRequestItemsReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostExchangesReturnRequestItemsReqSchemaType>,
|
||||||
|
|||||||
+2
-2
@@ -5,14 +5,14 @@ import {
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../../types/routing"
|
} from "../../../../../../../types/routing"
|
||||||
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
import { defaultAdminDetailsReturnFields } from "../../../../../returns/query-config"
|
||||||
import { AdminPostExchangesShippingActionReqSchemaType } from "../../../../validators"
|
import { AdminPostExchangesShippingActionReqSchemaType } from "../../../../validators"
|
||||||
import { AdminOrderPreview, HttpTypes } from "@medusajs/types"
|
import { AdminOrderPreview, HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingActionReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingActionReqSchemaType>,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { createExchangeShippingMethodWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
import { defaultAdminDetailsReturnFields } from "../../../../returns/query-config"
|
||||||
import { AdminPostReturnsShippingReqSchemaType } from "../../../../returns/validators"
|
import { AdminPostReturnsShippingReqSchemaType } from "../../../../returns/validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostReturnsShippingReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostReturnsShippingReqSchemaType>,
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import {
|
|||||||
removeItemExchangeActionWorkflow,
|
removeItemExchangeActionWorkflow,
|
||||||
updateExchangeAddItemWorkflow,
|
updateExchangeAddItemWorkflow,
|
||||||
} from "@medusajs/core-flows"
|
} from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import { orderExchangeAddNewItemWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { AdminPostExchangesAddItemsReqSchemaType } from "../../../validators"
|
import { AdminPostExchangesAddItemsReqSchemaType } from "../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostExchangesAddItemsReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostExchangesAddItemsReqSchemaType>,
|
||||||
|
|||||||
+2
-2
@@ -5,13 +5,13 @@ import {
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../../types/routing"
|
} from "../../../../../../../types/routing"
|
||||||
import { AdminPostExchangesShippingActionReqSchemaType } from "../../../../validators"
|
import { AdminPostExchangesShippingActionReqSchemaType } from "../../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingActionReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingActionReqSchemaType>,
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import { createExchangeShippingMethodWorkflow } from "@medusajs/core-flows"
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { AdminPostExchangesShippingReqSchemaType } from "../../../validators"
|
import { AdminPostExchangesShippingReqSchemaType } from "../../../validators"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingReqSchemaType>,
|
req: AuthenticatedMedusaRequest<AdminPostExchangesShippingReqSchemaType>,
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import {
|
|||||||
cancelBeginOrderExchangeWorkflow,
|
cancelBeginOrderExchangeWorkflow,
|
||||||
confirmExchangeRequestWorkflow,
|
confirmExchangeRequestWorkflow,
|
||||||
} from "@medusajs/core-flows"
|
} from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { AdminExchangeResponse } from "@medusajs/types"
|
import { AdminExchangeResponse } from "@medusajs/framework/types"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { beginExchangeOrderWorkflow } from "@medusajs/core-flows"
|
import { beginExchangeOrderWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
Modules,
|
Modules,
|
||||||
promiseAll,
|
promiseAll,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
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 { maybeApplyLinkFilter } from "../../utils/maybe-apply-link-filter"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { deleteFulfillmentSetsWorkflow } from "@medusajs/core-flows"
|
import { deleteFulfillmentSetsWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
|
|||||||
+2
-2
@@ -7,13 +7,13 @@ import {
|
|||||||
AdminServiceZoneResponse,
|
AdminServiceZoneResponse,
|
||||||
HttpTypes,
|
HttpTypes,
|
||||||
IFulfillmentModuleService,
|
IFulfillmentModuleService,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
MedusaError,
|
MedusaError,
|
||||||
Modules,
|
Modules,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaRequest,
|
MedusaRequest,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { createServiceZonesWorkflow } from "@medusajs/core-flows"
|
|||||||
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
import { MedusaRequest, MedusaResponse } from "../../../../../types/routing"
|
||||||
import { AdminCreateFulfillmentSetServiceZonesType } from "../../validators"
|
import { AdminCreateFulfillmentSetServiceZonesType } from "../../validators"
|
||||||
import { refetchFulfillmentSet } from "../../helpers"
|
import { refetchFulfillmentSet } from "../../helpers"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: MedusaRequest<AdminCreateFulfillmentSetServiceZonesType>,
|
req: MedusaRequest<AdminCreateFulfillmentSetServiceZonesType>,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const refetchFulfillmentSet = async (
|
export const refetchFulfillmentSet = async (
|
||||||
fulfillmentSetId: string,
|
fulfillmentSetId: string,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
import { refetchFulfillment } from "../../helpers"
|
import { refetchFulfillment } from "../../helpers"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createShipmentWorkflow } from "@medusajs/core-flows"
|
import { createShipmentWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const refetchFulfillment = async (
|
export const refetchFulfillment = async (
|
||||||
fulfillmentId: string,
|
fulfillmentId: string,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MiddlewareRoute } from "@medusajs/framework"
|
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||||
import * as QueryConfig from "./query-config"
|
import * as QueryConfig from "./query-config"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createFulfillmentWorkflow } from "@medusajs/core-flows"
|
import { createFulfillmentWorkflow } from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
|
|||||||
+2
-2
@@ -2,14 +2,14 @@ import {
|
|||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
MedusaError,
|
MedusaError,
|
||||||
remoteQueryObjectFromString,
|
remoteQueryObjectFromString,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { MedusaRequest, MedusaResponse } from "../../../../../../types/routing"
|
import { MedusaRequest, MedusaResponse } from "../../../../../../types/routing"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
deleteInventoryLevelsWorkflow,
|
deleteInventoryLevelsWorkflow,
|
||||||
updateInventoryLevelsWorkflow,
|
updateInventoryLevelsWorkflow,
|
||||||
} from "@medusajs/core-flows"
|
} from "@medusajs/core-flows"
|
||||||
import { HttpTypes } from "@medusajs/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
import { refetchInventoryItem } from "../../../helpers"
|
import { refetchInventoryItem } from "../../../helpers"
|
||||||
import { AdminUpdateInventoryLocationLevelType } from "../../../validators"
|
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