{
"name": "medusa-starter-default",
"version": "0.0.1",
"description": "A starter for Medusa projects.",
"author": "Medusa (https://medusajs.com)",
"license": "MIT",
"keywords": [
"sqlite",
"postgres",
"typescript",
"ecommerce",
"headless",
"medusa"
],
"scripts": {
"build": "medusa build && ln -s .medusa/server/public/ public",
"seed": "medusa exec ./src/scripts/seed.ts",
"start": "medusa start",
"dev": "medusa develop --host 0.0.0.0",
"migrate": "medusa db:migrate",
"dev:email": "email dev --dir ./src/modules/resend/emails",
"test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
"test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit",
"test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
},
"dependencies": {
"@medusajs/admin-sdk": "2.10.3",
"@medusajs/cli": "2.10.3",
"@medusajs/framework": "2.10.3",
"@medusajs/medusa": "2.10.3",
"@mikro-orm/core": "6.4.3",
"@mikro-orm/knex": "6.4.3",
"@mikro-orm/migrations": "6.4.3",
"@mikro-orm/postgresql": "6.4.3",
"@react-email/components": "0.5.7",
"awilix": "^8.0.1",
"pg": "^8.13.0",
"resend": "^6.2.0"
},
"devDependencies": {
"@medusajs/test-utils": "2.10.3",
"@mikro-orm/cli": "6.4.3",
"@react-email/preview-server": "4.3.1",
"@swc/core": "1.5.7",
"@swc/jest": "^0.2.36",
"@types/jest": "^29.5.13",
"@types/node": "^20.0.0",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.2.25",
"jest": "^29.7.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-email": "^4.3.1",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"vite": "^5.2.11",
"yalc": "^1.0.0-pre.53"
},
"engines": {
"node": ">=20"
},
"trustedDependencies": [
"@medusajs/telemetry",
"@swc/core",
"esbuild",
"msgpackr-extract"
]
}
v23.4.0
17.6
MacOS
No response
I'm working on a POS system that needs to be able to update line item prices on the fly. The business I'm building for allows negotiation on prices in-person.
To achieve this, I am trying to use admin.draftOrder.updateItem with an update payload like {"quantity":1,"unit_price":101,"compare_at_unit_price":110}. Then I confirm the edit with admin.draftOrder.confirmEdit.
I expect the value to be persisted and returned on refetch; or for an error to get raised to prevent this from failing silently.
It fails silently. The quantity and unit price are persisted, but the compare_at_unit_price is seemingly discarded.
I believe this is happening because we never fetch this value from the action details here. If we look at fields that are persisted, we can see they are fetched from details like unit price