Merge branch 'develop' into docs/change-arch
This commit is contained in:
commit
8d23c97af9
571 files changed
+381138
-373922
No files matched your search
@@ -1,7 +0,0 @@
|
||||
---
|
||||
"@medusajs/product": patch
|
||||
"@medusajs/framework": patch
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
chore(product): Improve product normalization
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
"@medusajs/notification-sendgrid": patch
|
||||
"@medusajs/fulfillment-manual": patch
|
||||
"@medusajs/notification-local": patch
|
||||
"@medusajs/locking-postgres": patch
|
||||
"@medusajs/auth-emailpass": patch
|
||||
"@medusajs/payment-stripe": patch
|
||||
"@medusajs/workflow-engine-inmemory": patch
|
||||
"@medusajs/locking-redis": patch
|
||||
"@medusajs/auth-github": patch
|
||||
"@medusajs/auth-google": patch
|
||||
"@medusajs/workflow-engine-redis": patch
|
||||
"@medusajs/file-local": patch
|
||||
"@medusajs/file-s3": patch
|
||||
"@medusajs/ui-preset": patch
|
||||
"@medusajs/event-bus-local": patch
|
||||
"@medusajs/event-bus-redis": patch
|
||||
"@medusajs/medusa-oas-cli": patch
|
||||
"@medusajs/cache-inmemory": patch
|
||||
"@medusajs/stock-location": patch
|
||||
"create-medusa-app": patch
|
||||
"@medusajs/sales-channel": patch
|
||||
"@medusajs/link-modules": patch
|
||||
"@medusajs/notification": patch
|
||||
"@medusajs/admin-bundler": patch
|
||||
"@medusajs/icons": patch
|
||||
"@medusajs/cache-redis": patch
|
||||
"@medusajs/fulfillment": patch
|
||||
"@medusajs/orchestration": patch
|
||||
"@medusajs/workflows-sdk": patch
|
||||
"@medusajs/test-utils": patch
|
||||
"@medusajs/inventory": patch
|
||||
"@medusajs/promotion": patch
|
||||
"@medusajs/modules-sdk": patch
|
||||
"@medusajs/ui": patch
|
||||
"@medusajs/currency": patch
|
||||
"@medusajs/customer": patch
|
||||
"@medusajs/admin-sdk": patch
|
||||
"@medusajs/dashboard": patch
|
||||
"@medusajs/core-flows": patch
|
||||
"@medusajs/api-key": patch
|
||||
"@medusajs/locking": patch
|
||||
"@medusajs/payment": patch
|
||||
"@medusajs/pricing": patch
|
||||
"@medusajs/product": patch
|
||||
"@medusajs/cli": patch
|
||||
"@medusajs/framework": patch
|
||||
"@medusajs/region": patch
|
||||
"@medusajs/index": patch
|
||||
"@medusajs/order": patch
|
||||
"@medusajs/store": patch
|
||||
"@medusajs/auth": patch
|
||||
"@medusajs/cart": patch
|
||||
"@medusajs/file": patch
|
||||
"@medusajs/user": patch
|
||||
"@medusajs/js-sdk": patch
|
||||
"@medusajs/tax": patch
|
||||
"@medusajs/utils": patch
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
chore: Remove ranges on Medusa packages
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@medusajs/framework": patch
|
||||
---
|
||||
|
||||
Fix(framework): http cors middleware order and options
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"@medusajs/core-flows": patch
|
||||
"@medusajs/workflows-sdk": patch
|
||||
---
|
||||
|
||||
feat(workflows-sdk): Allow when then in parallelize
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
chore: pin swc to 1.5.7
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@medusajs/pricing": patch
|
||||
---
|
||||
|
||||
fix(pricing): emit events
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@medusajs/workflow-engine-redis": patch
|
||||
---
|
||||
|
||||
fix(workflow-engine-redis): Split the queues and respect worker mode for job executions
|
||||
@@ -331,6 +331,17 @@ medusaIntegrationTestRunner({
|
||||
},
|
||||
])
|
||||
|
||||
// create reservation for inventory item that is initially on the order
|
||||
const inventoryModule = container.resolve(Modules.INVENTORY)
|
||||
await inventoryModule.createReservationItems([
|
||||
{
|
||||
inventory_item_id: inventoryItem.id,
|
||||
location_id: location.id,
|
||||
quantity: 2,
|
||||
line_item_id: order.items[0].id,
|
||||
},
|
||||
])
|
||||
|
||||
const shippingOptionPayload = {
|
||||
name: "Return shipping",
|
||||
service_zone_id: fulfillmentSet.service_zones[0].id,
|
||||
|
||||
@@ -325,6 +325,17 @@ medusaIntegrationTestRunner({
|
||||
},
|
||||
])
|
||||
|
||||
// create reservation for inventory item that is initially on the order
|
||||
const inventoryModule = container.resolve(Modules.INVENTORY)
|
||||
await inventoryModule.createReservationItems([
|
||||
{
|
||||
inventory_item_id: inventoryItem.id,
|
||||
location_id: location.id,
|
||||
quantity: 2,
|
||||
line_item_id: order.items[0].id,
|
||||
},
|
||||
])
|
||||
|
||||
const shippingOptionPayload = {
|
||||
name: "Return shipping",
|
||||
service_zone_id: fulfillmentSet.service_zones[0].id,
|
||||
|
||||
@@ -17,6 +17,7 @@ medusaIntegrationTestRunner({
|
||||
let location
|
||||
let item
|
||||
let returnShippingOption
|
||||
let outboundShippingOption
|
||||
const shippingProviderId = "manual_test-provider"
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -135,7 +136,7 @@ medusaIntegrationTestRunner({
|
||||
prices: [
|
||||
{
|
||||
currency_code: "usd",
|
||||
amount: 20,
|
||||
amount: 0, // Free shipping
|
||||
},
|
||||
],
|
||||
rules: [
|
||||
@@ -160,7 +161,7 @@ medusaIntegrationTestRunner({
|
||||
)
|
||||
).data.shipping_option
|
||||
|
||||
const outboundShippingOption = (
|
||||
outboundShippingOption = (
|
||||
await api.post(
|
||||
"/admin/shipping-options",
|
||||
outboundShippingOptionPayload,
|
||||
@@ -289,6 +290,15 @@ medusaIntegrationTestRunner({
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
// If claim has outbound items, we need to set the outbound shipping method for reservation to be created
|
||||
// TODO: change condition in confirm workfow to crate reservation depending on shipping since we can have
|
||||
// reservations for inventory items that don't require shipping
|
||||
await api.post(
|
||||
`/admin/claims/${singleOutboundClaim.id}/outbound/shipping-method`,
|
||||
{ shipping_option_id: outboundShippingOption.id },
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
await api.post(
|
||||
`/admin/claims/${singleOutboundClaim.id}/request`,
|
||||
{},
|
||||
|
||||
@@ -239,6 +239,17 @@ medusaIntegrationTestRunner({
|
||||
},
|
||||
])
|
||||
|
||||
// create reservation for inventory item that is initially on the order
|
||||
const inventoryModule = container.resolve(Modules.INVENTORY)
|
||||
await inventoryModule.createReservationItems([
|
||||
{
|
||||
inventory_item_id: inventoryItem.id,
|
||||
location_id: location.id,
|
||||
quantity: 2,
|
||||
line_item_id: order.items[0].id,
|
||||
},
|
||||
])
|
||||
|
||||
const shippingOptionPayload = {
|
||||
name: "Return shipping",
|
||||
service_zone_id: fulfillmentSet.service_zones[0].id,
|
||||
@@ -866,7 +877,9 @@ medusaIntegrationTestRunner({
|
||||
adminHeaders
|
||||
)
|
||||
).data.inventory_levels
|
||||
expect(inventoryLevel[0].stocked_quantity).toEqual(2)
|
||||
|
||||
// we had 2 items in stock that were reserved for the order and then fulfilled
|
||||
expect(inventoryLevel[0].stocked_quantity).toEqual(0)
|
||||
|
||||
let result = await api.post(
|
||||
`/admin/returns/${returnId}/receive`,
|
||||
@@ -987,7 +1000,7 @@ medusaIntegrationTestRunner({
|
||||
adminHeaders
|
||||
)
|
||||
).data.inventory_levels
|
||||
expect(inventoryLevel[0].stocked_quantity).toEqual(3)
|
||||
expect(inventoryLevel[0].stocked_quantity).toEqual(1)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -486,6 +486,9 @@ medusaIntegrationTestRunner({
|
||||
it("should revert an order fulfillment when it fails and recreate it when tried again", async () => {
|
||||
const order = await createOrderFixture({ container, product, location })
|
||||
|
||||
const itemId = order.items?.find((i) => i.title === "Custom Item 2")!
|
||||
.id as string
|
||||
|
||||
// Create a fulfillment
|
||||
const createOrderFulfillmentData: OrderWorkflow.CreateOrderFulfillmentWorkflowInput =
|
||||
{
|
||||
@@ -493,7 +496,7 @@ medusaIntegrationTestRunner({
|
||||
created_by: "user_1",
|
||||
items: [
|
||||
{
|
||||
id: order.items![0].id,
|
||||
id: itemId,
|
||||
quantity: 1,
|
||||
},
|
||||
],
|
||||
@@ -540,12 +543,14 @@ medusaIntegrationTestRunner({
|
||||
|
||||
const [orderFulfill] = await remoteQuery(remoteQueryObject)
|
||||
|
||||
const fulfilledItem = orderFulfill.items?.find((i) => i.id === itemId)
|
||||
|
||||
expect(orderFulfill.fulfillments).toHaveLength(1)
|
||||
expect(orderFulfill.items[0].detail.fulfilled_quantity).toEqual(1)
|
||||
expect(fulfilledItem?.detail.fulfilled_quantity).toEqual(1)
|
||||
|
||||
const inventoryModule = container.resolve(Modules.INVENTORY)
|
||||
const reservation = await inventoryModule.listReservationItems({
|
||||
line_item_id: order.items![0].id,
|
||||
line_item_id: itemId,
|
||||
})
|
||||
expect(reservation).toHaveLength(0)
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @medusajs/admin-bundler
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`4c28efaadc01fd0782721924c3c2eff0f6f9ba7a`](https://github.com/medusajs/medusa/commit/4c28efaadc01fd0782721924c3c2eff0f6f9ba7a), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
|
||||
- @medusajs/dashboard@2.6.1
|
||||
- @medusajs/admin-shared@2.6.1
|
||||
- @medusajs/admin-vite-plugin@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/admin-bundler",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Bundler for the Medusa admin dashboard.",
|
||||
"author": "Kasper Kristensen <kasper@medusajs.com>",
|
||||
"scripts": {
|
||||
@@ -18,7 +18,7 @@
|
||||
"package.json"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/types": "2.6.1",
|
||||
"@types/compression": "^1.7.5",
|
||||
"copyfiles": "^2.4.1",
|
||||
"express": "^4.21.0",
|
||||
@@ -26,9 +26,9 @@
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/admin-shared": "2.6.0",
|
||||
"@medusajs/admin-vite-plugin": "2.6.0",
|
||||
"@medusajs/dashboard": "2.6.0",
|
||||
"@medusajs/admin-shared": "2.6.1",
|
||||
"@medusajs/admin-vite-plugin": "2.6.1",
|
||||
"@medusajs/dashboard": "2.6.1",
|
||||
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"autoprefixer": "^10.4.16",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/admin-sdk
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies []:
|
||||
- @medusajs/admin-shared@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@medusajs/admin-sdk",
|
||||
"description": "SDK for building extension for the Medusa admin dashboard.",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"author": "Kasper Kristensen <kasper@medusajs.com>",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.js",
|
||||
@@ -24,7 +24,7 @@
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/admin-shared": "2.6.0",
|
||||
"@medusajs/admin-shared": "2.6.1",
|
||||
"zod": "3.22.4"
|
||||
},
|
||||
"packageManager": "yarn@3.2.1"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @medusajs/admin-shared
|
||||
|
||||
## 2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@medusajs/admin-shared",
|
||||
"description": "Shared code for Medusa admin packages.",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"author": "Kasper Kristensen <kasper@medusajs.com>",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @medusajs/admin-vite-plugin
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @medusajs/admin-shared@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/admin-vite-plugin",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -40,7 +40,7 @@
|
||||
"@babel/parser": "7.25.6",
|
||||
"@babel/traverse": "7.25.6",
|
||||
"@babel/types": "7.25.6",
|
||||
"@medusajs/admin-shared": "2.6.0",
|
||||
"@medusajs/admin-shared": "2.6.1",
|
||||
"chokidar": "3.5.3",
|
||||
"fdir": "6.1.1",
|
||||
"magic-string": "0.30.5",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @medusajs/dashboard
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11731](https://github.com/medusajs/medusa/pull/11731) [`4c28efaadc01fd0782721924c3c2eff0f6f9ba7a`](https://github.com/medusajs/medusa/commit/4c28efaadc01fd0782721924c3c2eff0f6f9ba7a) Thanks [@fPolic](https://github.com/fPolic)! - fix(dashboard): correctly format date cell time
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
|
||||
- @medusajs/icons@2.6.1
|
||||
- @medusajs/ui@4.0.7
|
||||
- @medusajs/js-sdk@2.6.1
|
||||
- @medusajs/admin-shared@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/dashboard",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"scripts": {
|
||||
"generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
|
||||
"dev": "vite",
|
||||
@@ -45,10 +45,10 @@
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
"@hookform/error-message": "^2.0.1",
|
||||
"@hookform/resolvers": "3.4.2",
|
||||
"@medusajs/admin-shared": "2.6.0",
|
||||
"@medusajs/icons": "2.6.0",
|
||||
"@medusajs/js-sdk": "2.6.0",
|
||||
"@medusajs/ui": "4.0.6",
|
||||
"@medusajs/admin-shared": "2.6.1",
|
||||
"@medusajs/icons": "2.6.1",
|
||||
"@medusajs/js-sdk": "2.6.1",
|
||||
"@medusajs/ui": "4.0.7",
|
||||
"@tanstack/react-query": "5.64.2",
|
||||
"@tanstack/react-table": "8.20.5",
|
||||
"@tanstack/react-virtual": "^3.8.3",
|
||||
@@ -75,10 +75,10 @@
|
||||
"zod": "3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/admin-shared": "2.6.0",
|
||||
"@medusajs/admin-vite-plugin": "2.6.0",
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/ui-preset": "2.6.0",
|
||||
"@medusajs/admin-shared": "2.6.1",
|
||||
"@medusajs/admin-vite-plugin": "2.6.1",
|
||||
"@medusajs/types": "2.6.1",
|
||||
"@medusajs/ui-preset": "2.6.1",
|
||||
"@types/node": "^20.11.15",
|
||||
"@types/react": "^18.2.79",
|
||||
"@types/react-dom": "^18.2.25",
|
||||
|
||||
+10
-12
@@ -1,35 +1,33 @@
|
||||
import { Tooltip } from "@medusajs/ui"
|
||||
import { format } from "date-fns/format"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { PlaceholderCell } from "../placeholder-cell"
|
||||
import { useDate } from "../../../../../hooks/use-date"
|
||||
|
||||
type DateCellProps = {
|
||||
date?: Date | string | null
|
||||
}
|
||||
|
||||
export const DateCell = ({ date }: DateCellProps) => {
|
||||
const { getFullDate } = useDate()
|
||||
|
||||
if (!date) {
|
||||
return <PlaceholderCell />
|
||||
}
|
||||
|
||||
const value = new Date(date)
|
||||
value.setMinutes(value.getMinutes() - value.getTimezoneOffset())
|
||||
|
||||
const hour12 = Intl.DateTimeFormat().resolvedOptions().hour12
|
||||
const timestampFormat = hour12 ? "dd MMM yyyy hh:MM a" : "dd MMM yyyy HH:MM"
|
||||
|
||||
return (
|
||||
<div className="flex h-full w-full items-center overflow-hidden">
|
||||
<Tooltip
|
||||
className="z-10"
|
||||
content={
|
||||
<span className="text-pretty">{`${format(
|
||||
value,
|
||||
timestampFormat
|
||||
)}`}</span>
|
||||
<span className="text-pretty">{`${getFullDate({
|
||||
date,
|
||||
includeTime: true,
|
||||
})}`}</span>
|
||||
}
|
||||
>
|
||||
<span className="truncate">{format(value, "dd MMM yyyy")}</span>
|
||||
<span className="truncate">
|
||||
{getFullDate({ date, includeTime: false })}
|
||||
</span>
|
||||
</Tooltip>
|
||||
</div>
|
||||
)
|
||||
|
||||
+20
-20
@@ -111,30 +111,28 @@ export function OrderCreateFulfillmentForm({
|
||||
return
|
||||
}
|
||||
|
||||
const selectedShippingProfileId =
|
||||
selectedShippingOption?.shipping_profile_id
|
||||
|
||||
const itemShippingProfileMap = order.items.reduce(
|
||||
(acc, item) => {
|
||||
acc[item.id] = item.variant?.product?.shipping_profile?.id
|
||||
return acc
|
||||
},
|
||||
{} as Record<string, string | null>
|
||||
)
|
||||
|
||||
const items = Object.entries(data.quantity)
|
||||
.filter(
|
||||
([id, value]) =>
|
||||
!!value && itemShippingProfileMap[id] === selectedShippingProfileId
|
||||
)
|
||||
let items = Object.entries(data.quantity)
|
||||
.map(([id, quantity]) => ({
|
||||
id,
|
||||
quantity,
|
||||
}))
|
||||
.filter(({ quantity }) => !!quantity)
|
||||
|
||||
if (!items.length) {
|
||||
toast.error(t("orders.fulfillment.error.noItems"))
|
||||
return
|
||||
/**
|
||||
* If items require shipping fulfill only items with matching shipping profile.
|
||||
*/
|
||||
if (requiresShipping) {
|
||||
const selectedShippingProfileId =
|
||||
selectedShippingOption?.shipping_profile_id
|
||||
|
||||
const itemShippingProfileMap = order.items.reduce((acc, item) => {
|
||||
acc[item.id] = item.variant?.product?.shipping_profile?.id
|
||||
return acc
|
||||
}, {} as any)
|
||||
|
||||
items = items.filter(
|
||||
({ id }) => itemShippingProfileMap[id] === selectedShippingProfileId
|
||||
)
|
||||
}
|
||||
|
||||
const payload: HttpTypes.AdminCreateOrderFulfillment = {
|
||||
@@ -357,7 +355,9 @@ export function OrderCreateFulfillmentForm({
|
||||
form={form}
|
||||
item={item}
|
||||
locationId={selectedLocationId}
|
||||
disabled={!isShippingProfileMatching}
|
||||
disabled={
|
||||
requiresShipping && !isShippingProfileMatching
|
||||
}
|
||||
itemReservedQuantitiesMap={
|
||||
itemReservedQuantitiesMap
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# Change Log
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies []:
|
||||
- @medusajs/telemetry@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "create-medusa-app",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Create a Medusa project using a single command.",
|
||||
"type": "module",
|
||||
"exports": "./dist/index.js",
|
||||
@@ -13,7 +13,7 @@
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/telemetry": "2.6.0",
|
||||
"@medusajs/telemetry": "2.6.1",
|
||||
"boxen": "^5",
|
||||
"chalk": "^5.2.0",
|
||||
"commander": "^10.0.1",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# Change Log
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
|
||||
- @medusajs/utils@2.6.1
|
||||
- @medusajs/telemetry@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/cli",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Command Line interface for Medusa Commerce",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@@ -46,8 +46,8 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/telemetry": "2.6.0",
|
||||
"@medusajs/utils": "2.6.0",
|
||||
"@medusajs/telemetry": "2.6.1",
|
||||
"@medusajs/utils": "2.6.1",
|
||||
"@types/express": "^4.17.17",
|
||||
"chalk": "^4.0.0",
|
||||
"configstore": "5.0.1",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Change Log
|
||||
|
||||
## 2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "medusa-dev-cli",
|
||||
"description": "CLI helpers for contributors working on Medusa",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"author": "Sebastian Rindom <skrindom@gmail.com>",
|
||||
"bin": {
|
||||
"medusa-dev": "./dist/index.js"
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @medusajs/oas-cli
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`62e429178f3abe0a528f7a574eb6a09ac525bf9c`](https://github.com/medusajs/medusa/commit/62e429178f3abe0a528f7a574eb6a09ac525bf9c), [`90964a404edbb079d7de332a11ab97c4f5643d67`](https://github.com/medusajs/medusa/commit/90964a404edbb079d7de332a11ab97c4f5643d67), [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`2a0bd86204c9dd51a012763016f2de822d3c45b6`](https://github.com/medusajs/medusa/commit/2a0bd86204c9dd51a012763016f2de822d3c45b6)]:
|
||||
- @medusajs/medusa@2.6.1
|
||||
- @medusajs/utils@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/medusa-oas-cli",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "OAS CLI",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@@ -21,7 +21,7 @@
|
||||
"author": "Medusa",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/types": "2.6.1",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"jest": "^29.1.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
@@ -35,8 +35,8 @@
|
||||
"medusa-oas": "ts-node src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/medusa": "2.6.0",
|
||||
"@medusajs/utils": "2.6.0",
|
||||
"@medusajs/medusa": "2.6.1",
|
||||
"@medusajs/utils": "2.6.1",
|
||||
"@readme/json-schema-ref-parser": "^1.2.0",
|
||||
"@readme/openapi-parser": "^2.4.0",
|
||||
"@redocly/cli": "^1.7.0",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @medusajs/oas-github-ci
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
|
||||
- @medusajs/medusa-oas-cli@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/oas-github-ci",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "OAS Github CI",
|
||||
"main": "scripts/build-openapi.js",
|
||||
"files": [
|
||||
@@ -21,7 +21,7 @@
|
||||
"test": "jest --passWithNoTests"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/medusa-oas-cli": "2.6.0",
|
||||
"@medusajs/medusa-oas-cli": "2.6.1",
|
||||
"execa": "^5.1.1"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,20 @@
|
||||
# @medusajs/core-flows
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11715](https://github.com/medusajs/medusa/pull/11715) [`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7) Thanks [@carlos-r-l-rodrigues](https://github.com/carlos-r-l-rodrigues)! - chore: improve tax lines
|
||||
|
||||
- [#11735](https://github.com/medusajs/medusa/pull/11735) [`70eaaa91965dbe3a641dc634b4e81069d73846ed`](https://github.com/medusajs/medusa/commit/70eaaa91965dbe3a641dc634b4e81069d73846ed) Thanks [@fPolic](https://github.com/fPolic)! - fix(core-flows): fulfillment reservation check
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- [#11756](https://github.com/medusajs/medusa/pull/11756) [`84f991192ec288f90af36c5352448b2785901d1a`](https://github.com/medusajs/medusa/commit/84f991192ec288f90af36c5352448b2785901d1a) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(workflows-sdk): Allow when then in parallelize
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/core-flows",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Set of workflow definitions for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"exports": {
|
||||
@@ -26,7 +26,7 @@
|
||||
"author": "Medusa",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/knex": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
@@ -44,7 +44,7 @@
|
||||
"json-2-csv": "^5.5.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"awilix": "^8.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
ItemTaxLineDTO,
|
||||
ShippingTaxLineDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { Modules, promiseAll } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
/**
|
||||
@@ -64,21 +64,31 @@ export const setTaxLinesForItemsStep = createStep(
|
||||
const { cart, item_tax_lines, shipping_tax_lines } = data
|
||||
const cartService = container.resolve<ICartModuleService>(Modules.CART)
|
||||
|
||||
const existingShippingMethodTaxLines =
|
||||
await cartService.listShippingMethodTaxLines({
|
||||
shipping_method_id: shipping_tax_lines.map((t) => t.shipping_line_id),
|
||||
const [existingShippingMethodTaxLines, existingLineItemTaxLines] =
|
||||
await promiseAll([
|
||||
shipping_tax_lines.length
|
||||
? cartService.listShippingMethodTaxLines({
|
||||
shipping_method_id: shipping_tax_lines.map(
|
||||
(t) => t.shipping_line_id
|
||||
),
|
||||
})
|
||||
: [],
|
||||
|
||||
const existingLineItemTaxLines = await cartService.listLineItemTaxLines({
|
||||
item_tax_lines.length
|
||||
? cartService.listLineItemTaxLines({
|
||||
item_id: item_tax_lines.map((t) => t.line_item_id),
|
||||
})
|
||||
: [],
|
||||
])
|
||||
|
||||
const itemsTaxLinesData = normalizeItemTaxLinesForCart(item_tax_lines)
|
||||
await cartService.setLineItemTaxLines(cart.id, itemsTaxLinesData)
|
||||
|
||||
const shippingTaxLinesData =
|
||||
normalizeShippingTaxLinesForCart(shipping_tax_lines)
|
||||
await cartService.setShippingMethodTaxLines(cart.id, shippingTaxLinesData)
|
||||
|
||||
await promiseAll([
|
||||
cartService.setLineItemTaxLines(cart.id, itemsTaxLinesData),
|
||||
cartService.setShippingMethodTaxLines(cart.id, shippingTaxLinesData),
|
||||
])
|
||||
|
||||
return new StepResponse(null, {
|
||||
cart,
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
import {
|
||||
CartWorkflowDTO,
|
||||
CreateLineItemTaxLineDTO,
|
||||
CreateShippingMethodTaxLineDTO,
|
||||
ICartModuleService,
|
||||
ItemTaxLineDTO,
|
||||
LineItemTaxLineDTO,
|
||||
ShippingMethodTaxLineDTO,
|
||||
ShippingTaxLineDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Modules, promiseAll } from "@medusajs/framework/utils"
|
||||
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
/**
|
||||
* The details of the tax lines to set in a cart.
|
||||
*/
|
||||
export interface SetTaxLinesForItemsStepInput {
|
||||
/**
|
||||
* The cart's details.
|
||||
*/
|
||||
cart: CartWorkflowDTO
|
||||
/**
|
||||
* The tax lines to set for line items.
|
||||
*/
|
||||
item_tax_lines: ItemTaxLineDTO[]
|
||||
/**
|
||||
* The tax lines to set for shipping methods.
|
||||
*/
|
||||
shipping_tax_lines: ShippingTaxLineDTO[]
|
||||
}
|
||||
|
||||
export const upsertTaxLinesForItemsStepId = "set-tax-lines-for-items"
|
||||
/**
|
||||
* This step sets the tax lines of shipping methods and line items in a cart.
|
||||
*
|
||||
* :::tip
|
||||
*
|
||||
* You can use the {@link retrieveCartStep} to retrieve a cart's details.
|
||||
*
|
||||
* :::
|
||||
*
|
||||
* @example
|
||||
* const data = upsertTaxLinesForItemsStep({
|
||||
* // retrieve the details of the cart from another workflow
|
||||
* // or in another step using the Cart Module's service
|
||||
* cart,
|
||||
* "item_tax_lines": [{
|
||||
* "rate": 48,
|
||||
* "code": "CODE123",
|
||||
* "name": "Tax rate 2",
|
||||
* "provider_id": "provider_1",
|
||||
* "line_item_id": "litem_123"
|
||||
* }],
|
||||
* "shipping_tax_lines": [{
|
||||
* "rate": 49,
|
||||
* "code": "CODE456",
|
||||
* "name": "Tax rate 1",
|
||||
* "provider_id": "provider_1",
|
||||
* "shipping_line_id": "sm_123"
|
||||
* }]
|
||||
* })
|
||||
*/
|
||||
export const upsertTaxLinesForItemsStep = createStep(
|
||||
upsertTaxLinesForItemsStepId,
|
||||
async (data: SetTaxLinesForItemsStepInput, { container }) => {
|
||||
const { cart, item_tax_lines, shipping_tax_lines } = data
|
||||
const cartService = container.resolve<ICartModuleService>(Modules.CART)
|
||||
|
||||
const [existingShippingMethodTaxLines, existingLineItemTaxLines] =
|
||||
await promiseAll([
|
||||
shipping_tax_lines.length
|
||||
? cartService.listShippingMethodTaxLines({
|
||||
shipping_method_id: shipping_tax_lines.map(
|
||||
(t) => t.shipping_line_id
|
||||
),
|
||||
})
|
||||
: [],
|
||||
|
||||
item_tax_lines.length
|
||||
? cartService.listLineItemTaxLines({
|
||||
item_id: item_tax_lines.map((t) => t.line_item_id),
|
||||
})
|
||||
: [],
|
||||
])
|
||||
|
||||
const itemsTaxLinesData = normalizeItemTaxLinesForCart(
|
||||
item_tax_lines,
|
||||
existingLineItemTaxLines
|
||||
)
|
||||
const shippingTaxLinesData = normalizeShippingTaxLinesForCart(
|
||||
shipping_tax_lines,
|
||||
existingShippingMethodTaxLines
|
||||
)
|
||||
|
||||
await promiseAll([
|
||||
itemsTaxLinesData.length
|
||||
? cartService.upsertLineItemTaxLines(itemsTaxLinesData)
|
||||
: [],
|
||||
shippingTaxLinesData.length
|
||||
? cartService.upsertShippingMethodTaxLines(shippingTaxLinesData)
|
||||
: [],
|
||||
])
|
||||
|
||||
return new StepResponse(null, {
|
||||
cart,
|
||||
existingLineItemTaxLines,
|
||||
existingShippingMethodTaxLines,
|
||||
})
|
||||
},
|
||||
async (revertData, { container }) => {
|
||||
if (!revertData) {
|
||||
return
|
||||
}
|
||||
|
||||
const { existingLineItemTaxLines, existingShippingMethodTaxLines } =
|
||||
revertData
|
||||
|
||||
const cartService = container.resolve<ICartModuleService>(Modules.CART)
|
||||
|
||||
if (existingLineItemTaxLines) {
|
||||
await cartService.upsertLineItemTaxLines(
|
||||
existingLineItemTaxLines.map((taxLine) => ({
|
||||
description: taxLine.description,
|
||||
tax_rate_id: taxLine.tax_rate_id,
|
||||
code: taxLine.code,
|
||||
rate: taxLine.rate,
|
||||
provider_id: taxLine.provider_id,
|
||||
item_id: taxLine.item_id,
|
||||
}))
|
||||
)
|
||||
}
|
||||
|
||||
await cartService.upsertShippingMethodTaxLines(
|
||||
existingShippingMethodTaxLines.map((taxLine) => ({
|
||||
description: taxLine.description,
|
||||
tax_rate_id: taxLine.tax_rate_id,
|
||||
code: taxLine.code,
|
||||
rate: taxLine.rate,
|
||||
provider_id: taxLine.provider_id,
|
||||
shipping_method_id: taxLine.shipping_method_id,
|
||||
}))
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
function normalizeItemTaxLinesForCart(
|
||||
taxLines: ItemTaxLineDTO[],
|
||||
existingTaxLines: LineItemTaxLineDTO[]
|
||||
): CreateLineItemTaxLineDTO[] {
|
||||
return taxLines.map((taxLine: ItemTaxLineDTO & { id?: string }) => ({
|
||||
id: existingTaxLines.find((t) => t.item_id === taxLine.line_item_id)?.id,
|
||||
description: taxLine.name,
|
||||
tax_rate_id: taxLine.rate_id,
|
||||
code: taxLine.code!,
|
||||
rate: taxLine.rate!,
|
||||
provider_id: taxLine.provider_id,
|
||||
item_id: taxLine.line_item_id,
|
||||
}))
|
||||
}
|
||||
|
||||
function normalizeShippingTaxLinesForCart(
|
||||
taxLines: ShippingTaxLineDTO[],
|
||||
existingTaxLines: ShippingMethodTaxLineDTO[]
|
||||
): CreateShippingMethodTaxLineDTO[] {
|
||||
return taxLines.map((taxLine: ShippingTaxLineDTO & { id?: string }) => ({
|
||||
id: existingTaxLines.find(
|
||||
(t) => t.shipping_method_id === taxLine.shipping_line_id
|
||||
)?.id,
|
||||
description: taxLine.name,
|
||||
tax_rate_id: taxLine.rate_id,
|
||||
code: taxLine.code!,
|
||||
rate: taxLine.rate!,
|
||||
provider_id: taxLine.provider_id,
|
||||
shipping_method_id: taxLine.shipping_line_id,
|
||||
}))
|
||||
}
|
||||
@@ -186,7 +186,7 @@ export const addShippingMethodToCartWorkflow = createWorkflow(
|
||||
cart.shipping_methods.map((sm) => sm.id)
|
||||
)
|
||||
|
||||
parallelize(
|
||||
const [, createdShippingMethods] = parallelize(
|
||||
removeShippingMethodFromCartStep({
|
||||
shipping_method_ids: currentShippingMethods,
|
||||
}),
|
||||
@@ -200,7 +200,7 @@ export const addShippingMethodToCartWorkflow = createWorkflow(
|
||||
)
|
||||
|
||||
refreshCartItemsWorkflow.runAsStep({
|
||||
input: { cart_id: cart.id },
|
||||
input: { cart_id: cart.id, shipping_methods: createdShippingMethods },
|
||||
})
|
||||
|
||||
return new WorkflowResponse(void 0, {
|
||||
|
||||
@@ -173,7 +173,7 @@ export const addToCartWorkflow = createWorkflow(
|
||||
},
|
||||
})
|
||||
|
||||
parallelize(
|
||||
const [createdLineItems, updatedLineItems] = parallelize(
|
||||
createLineItemsStep({
|
||||
id: cart.id,
|
||||
items: itemsToCreate,
|
||||
@@ -184,8 +184,15 @@ export const addToCartWorkflow = createWorkflow(
|
||||
})
|
||||
)
|
||||
|
||||
const allItems = transform(
|
||||
{ createdLineItems, updatedLineItems },
|
||||
({ createdLineItems = [], updatedLineItems = [] }) => {
|
||||
return createdLineItems.concat(updatedLineItems)
|
||||
}
|
||||
)
|
||||
|
||||
refreshCartItemsWorkflow.runAsStep({
|
||||
input: { cart_id: cart.id },
|
||||
input: { cart_id: cart.id, items: allItems },
|
||||
})
|
||||
|
||||
emitEventStep({
|
||||
|
||||
@@ -26,6 +26,7 @@ import { refreshCartShippingMethodsWorkflow } from "./refresh-cart-shipping-meth
|
||||
import { refreshPaymentCollectionForCartWorkflow } from "./refresh-payment-collection"
|
||||
import { updateCartPromotionsWorkflow } from "./update-cart-promotions"
|
||||
import { updateTaxLinesWorkflow } from "./update-tax-lines"
|
||||
import { upsertTaxLinesWorkflow } from "./upsert-tax-lines"
|
||||
|
||||
/**
|
||||
* The details of the cart to refresh.
|
||||
@@ -44,6 +45,23 @@ export type RefreshCartItemsWorkflowInput = {
|
||||
* Force refresh the cart items
|
||||
*/
|
||||
force_refresh?: boolean
|
||||
|
||||
/**
|
||||
* The items to refresh.
|
||||
*/
|
||||
items?: any[]
|
||||
|
||||
/**
|
||||
* The shipping methods to refresh.
|
||||
*/
|
||||
shipping_methods?: any[]
|
||||
|
||||
/**
|
||||
* Whether to force re-calculating tax amounts, which
|
||||
* may include sending requests to a third-part tax provider, depending
|
||||
* on the configurations of the cart's tax region.
|
||||
*/
|
||||
force_tax_calculation?: boolean
|
||||
}
|
||||
|
||||
export const refreshCartItemsWorkflowId = "refresh-cart-items"
|
||||
@@ -162,9 +180,34 @@ export const refreshCartItemsWorkflow = createWorkflow(
|
||||
input: refreshCartInput,
|
||||
})
|
||||
|
||||
when({ input }, ({ input }) => {
|
||||
return !!input.force_refresh
|
||||
}).then(() => {
|
||||
updateTaxLinesWorkflow.runAsStep({
|
||||
input: refreshCartInput,
|
||||
})
|
||||
})
|
||||
|
||||
when({ input }, ({ input }) => {
|
||||
return (
|
||||
!input.force_refresh &&
|
||||
(!!input.items?.length || !!input.shipping_methods?.length)
|
||||
)
|
||||
}).then(() => {
|
||||
upsertTaxLinesWorkflow.runAsStep({
|
||||
input: transform(
|
||||
{ refetchedCart, input },
|
||||
({ refetchedCart, input }) => {
|
||||
return {
|
||||
cart: refetchedCart,
|
||||
items: input.items ?? [],
|
||||
shipping_methods: input.shipping_methods ?? [],
|
||||
force_tax_calculation: input.force_tax_calculation,
|
||||
}
|
||||
}
|
||||
),
|
||||
})
|
||||
})
|
||||
|
||||
const cartPromoCodes = transform(
|
||||
{ refetchedCart, input },
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
import {
|
||||
CartLineItemDTO,
|
||||
CartShippingMethodDTO,
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
WorkflowData,
|
||||
createWorkflow,
|
||||
transform,
|
||||
when,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { useRemoteQueryStep } from "../../common"
|
||||
import { getItemTaxLinesStep } from "../../tax/steps/get-item-tax-lines"
|
||||
import { upsertTaxLinesForItemsStep } from "../steps/upsert-tax-lines-for-items"
|
||||
|
||||
const cartFields = [
|
||||
"id",
|
||||
"currency_code",
|
||||
"email",
|
||||
"region.id",
|
||||
"region.automatic_taxes",
|
||||
"items.id",
|
||||
"items.variant_id",
|
||||
"items.product_id",
|
||||
"items.product_title",
|
||||
"items.product_description",
|
||||
"items.product_subtitle",
|
||||
"items.product_type",
|
||||
"items.product_type_id",
|
||||
"items.product_collection",
|
||||
"items.product_handle",
|
||||
"items.variant_sku",
|
||||
"items.variant_barcode",
|
||||
"items.variant_title",
|
||||
"items.title",
|
||||
"items.quantity",
|
||||
"items.unit_price",
|
||||
"items.tax_lines.id",
|
||||
"items.tax_lines.description",
|
||||
"items.tax_lines.code",
|
||||
"items.tax_lines.rate",
|
||||
"items.tax_lines.provider_id",
|
||||
"shipping_methods.tax_lines.id",
|
||||
"shipping_methods.tax_lines.description",
|
||||
"shipping_methods.tax_lines.code",
|
||||
"shipping_methods.tax_lines.rate",
|
||||
"shipping_methods.tax_lines.provider_id",
|
||||
"shipping_methods.shipping_option_id",
|
||||
"shipping_methods.amount",
|
||||
"customer.id",
|
||||
"customer.email",
|
||||
"customer.metadata",
|
||||
"customer.groups.id",
|
||||
"shipping_address.id",
|
||||
"shipping_address.address_1",
|
||||
"shipping_address.address_2",
|
||||
"shipping_address.city",
|
||||
"shipping_address.postal_code",
|
||||
"shipping_address.country_code",
|
||||
"shipping_address.region_code",
|
||||
"shipping_address.province",
|
||||
"shipping_address.metadata",
|
||||
]
|
||||
|
||||
/**
|
||||
* The details of the cart to upsert tax lines for.
|
||||
*/
|
||||
export type UpsertTaxLinesWorkflowInput = {
|
||||
/**
|
||||
* The cart's ID.
|
||||
*/
|
||||
cart_id?: string
|
||||
/**
|
||||
* The Cart reference.
|
||||
*/
|
||||
cart?: any
|
||||
/**
|
||||
* The items to upsert their tax lines.
|
||||
* If not specified, taxes are upsertd for all of the cart's
|
||||
* line items.
|
||||
*/
|
||||
items: CartLineItemDTO[]
|
||||
/**
|
||||
* The shipping methods to upsert their tax lines.
|
||||
* If not specified, taxes are upsertd for all of the cart's
|
||||
* shipping methods.
|
||||
*/
|
||||
shipping_methods: CartShippingMethodDTO[]
|
||||
|
||||
/**
|
||||
* Whether to force re-calculating tax amounts, which
|
||||
* may include sending requests to a third-part tax provider, depending
|
||||
* on the configurations of the cart's tax region.
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
force_tax_calculation?: boolean
|
||||
}
|
||||
|
||||
export const upsertTaxLinesWorkflowId = "upsert-tax-lines"
|
||||
/**
|
||||
* This workflow upserts a cart's tax lines that are applied on line items and shipping methods. You can upsert the line item's quantity, unit price, and more. This workflow is executed
|
||||
* by the [Calculate Taxes Store API Route](https://docs.medusajs.com/api/store#carts_postcartsidtaxes).
|
||||
*
|
||||
* You can use this workflow within your own customizations or custom workflows, allowing you to upsert a cart's tax lines in your custom flows.
|
||||
*
|
||||
* @example
|
||||
* const { result } = await upsertTaxLinesWorkflow(container)
|
||||
* .run({
|
||||
* input: {
|
||||
* cart_id: "cart_123",
|
||||
* items: [],
|
||||
* shipping_methods: [],
|
||||
* }
|
||||
* })
|
||||
*
|
||||
* @summary
|
||||
*
|
||||
* Update a cart's tax lines.
|
||||
*/
|
||||
export const upsertTaxLinesWorkflow = createWorkflow(
|
||||
upsertTaxLinesWorkflowId,
|
||||
(input: WorkflowData<UpsertTaxLinesWorkflowInput>): WorkflowData<void> => {
|
||||
const fetchCart = when({ input }, ({ input }) => {
|
||||
return !input.cart
|
||||
}).then(() => {
|
||||
return useRemoteQueryStep({
|
||||
entry_point: "cart",
|
||||
fields: cartFields,
|
||||
variables: { id: input.cart_id },
|
||||
throw_if_key_not_found: true,
|
||||
list: false,
|
||||
})
|
||||
})
|
||||
|
||||
const cart = transform({ fetchCart, input }, ({ fetchCart, input }) => {
|
||||
return input.cart ?? fetchCart
|
||||
})
|
||||
|
||||
const taxLineItems = getItemTaxLinesStep(
|
||||
transform({ input, cart }, (data) => ({
|
||||
orderOrCart: data.cart,
|
||||
items: data.input.items ?? [],
|
||||
shipping_methods: data.input.shipping_methods ?? [],
|
||||
force_tax_calculation: data.input.force_tax_calculation,
|
||||
}))
|
||||
)
|
||||
|
||||
upsertTaxLinesForItemsStep({
|
||||
cart,
|
||||
item_tax_lines: taxLineItems.lineItemTaxLines,
|
||||
shipping_tax_lines: taxLineItems.shippingMethodsTaxLines,
|
||||
})
|
||||
}
|
||||
)
|
||||
@@ -239,7 +239,7 @@ function extractShippingOption({ orderPreview, orderClaim, returnId }) {
|
||||
|
||||
for (const action of modifiedShippingMethod_.actions) {
|
||||
if (action.action === ChangeActionType.SHIPPING_ADD) {
|
||||
if (action.return?.id === returnId) {
|
||||
if (!!action.return_id && action.return_id === returnId) {
|
||||
returnShippingMethod = shippingMethod
|
||||
} else if (action.claim_id === orderClaim.id) {
|
||||
claimShippingMethod = shippingMethod
|
||||
|
||||
@@ -241,10 +241,14 @@ function prepareInventoryUpdate({
|
||||
}[] = []
|
||||
|
||||
const allItems = itemsList ?? order.items
|
||||
for (const item of allItems) {
|
||||
const itemsToFulfill = allItems.filter((i) => i.id in inputItemsMap)
|
||||
|
||||
// iterate over items that are being fulfilled
|
||||
for (const item of itemsToFulfill) {
|
||||
const reservation = reservationMap[item.id]
|
||||
|
||||
if (!reservation) {
|
||||
if (item.manage_inventory) {
|
||||
if (item.variant?.manage_inventory) {
|
||||
throw new Error(
|
||||
`No stock reservation found for item ${item.id} - ${item.title} (${item.variant_title})`
|
||||
)
|
||||
@@ -345,6 +349,7 @@ export const createOrderFulfillmentWorkflow = createWorkflow(
|
||||
"items.variant.height",
|
||||
"items.variant.width",
|
||||
"items.variant.material",
|
||||
"items.variant_title",
|
||||
"shipping_address.*",
|
||||
"shipping_methods.id",
|
||||
"shipping_methods.shipping_option_id",
|
||||
@@ -394,9 +399,11 @@ export const createOrderFulfillmentWorkflow = createWorkflow(
|
||||
}).config({ name: "get-shipping-option" })
|
||||
|
||||
const lineItemIds = transform(
|
||||
{ order, itemsList: input.items_list },
|
||||
({ order, itemsList }) => {
|
||||
return (itemsList ?? order.items)!.map((i) => i.id)
|
||||
{ order, itemsList: input.items_list, inputItemsMap },
|
||||
({ order, itemsList, inputItemsMap }) => {
|
||||
return (itemsList ?? order.items)!
|
||||
.map((i) => i.id)
|
||||
.filter((i) => i in inputItemsMap)
|
||||
}
|
||||
)
|
||||
const reservations = useRemoteQueryStep({
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
# @medusajs/framework
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11724](https://github.com/medusajs/medusa/pull/11724) [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e) Thanks [@adrien2p](https://github.com/adrien2p)! - chore(product): Improve product normalization
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- [#11765](https://github.com/medusajs/medusa/pull/11765) [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf) Thanks [@adrien2p](https://github.com/adrien2p)! - Fix(framework): http cors middleware order and options
|
||||
|
||||
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`84f991192ec288f90af36c5352448b2785901d1a`](https://github.com/medusajs/medusa/commit/84f991192ec288f90af36c5352448b2785901d1a)]:
|
||||
- @medusajs/types@2.6.1
|
||||
- @medusajs/orchestration@2.6.1
|
||||
- @medusajs/workflows-sdk@2.6.1
|
||||
- @medusajs/modules-sdk@2.6.1
|
||||
- @medusajs/cli@2.6.1
|
||||
- @medusajs/utils@2.6.1
|
||||
- @medusajs/telemetry@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/framework",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Framework",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -54,7 +54,7 @@
|
||||
"test": "jest --runInBand --bail --forceExit -- src/**/__tests__/**/*.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/cli": "2.6.0",
|
||||
"@medusajs/cli": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/knex": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
@@ -74,12 +74,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@jercle/yargonaut": "^1.1.5",
|
||||
"@medusajs/modules-sdk": "2.6.0",
|
||||
"@medusajs/orchestration": "2.6.0",
|
||||
"@medusajs/telemetry": "2.6.0",
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/utils": "2.6.0",
|
||||
"@medusajs/workflows-sdk": "2.6.0",
|
||||
"@medusajs/modules-sdk": "2.6.1",
|
||||
"@medusajs/orchestration": "2.6.1",
|
||||
"@medusajs/telemetry": "2.6.1",
|
||||
"@medusajs/types": "2.6.1",
|
||||
"@medusajs/utils": "2.6.1",
|
||||
"@medusajs/workflows-sdk": "2.6.1",
|
||||
"@opentelemetry/api": "^1.9.0",
|
||||
"@types/express": "^4.17.17",
|
||||
"chokidar": "^3.4.2",
|
||||
@@ -98,7 +98,7 @@
|
||||
"zod": "3.22.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/cli": "2.6.0",
|
||||
"@medusajs/cli": "2.6.1",
|
||||
"@mikro-orm/cli": "6.4.3",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/knex": "6.4.3",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/js-sdk
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7)]:
|
||||
- @medusajs/types@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/js-sdk",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "SDK for the Medusa API",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
@@ -35,7 +35,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/types": "2.6.1",
|
||||
"fetch-event-stream": "^0.1.5",
|
||||
"qs": "^6.12.1"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @medusajs/modules-sdk
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
|
||||
- @medusajs/types@2.6.1
|
||||
- @medusajs/orchestration@2.6.1
|
||||
- @medusajs/utils@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/modules-sdk",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "SDK for medusa modules",
|
||||
"main": "dist/index.js",
|
||||
"export": {
|
||||
@@ -45,9 +45,9 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/orchestration": "2.6.0",
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/utils": "2.6.0"
|
||||
"@medusajs/orchestration": "2.6.1",
|
||||
"@medusajs/types": "2.6.1",
|
||||
"@medusajs/utils": "2.6.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @medusajs/orchestration
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
|
||||
- @medusajs/types@2.6.1
|
||||
- @medusajs/utils@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/orchestration",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa utilities to orchestrate modules",
|
||||
"main": "dist/index.js",
|
||||
"exports": {
|
||||
@@ -39,8 +39,8 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/utils": "2.6.0"
|
||||
"@medusajs/types": "2.6.1",
|
||||
"@medusajs/utils": "2.6.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @medusajs/types
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11715](https://github.com/medusajs/medusa/pull/11715) [`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7) Thanks [@carlos-r-l-rodrigues](https://github.com/carlos-r-l-rodrigues)! - chore: improve tax lines
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/types",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa Types definition",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -430,12 +430,24 @@ export interface UpdateTaxLineDTO {
|
||||
/**
|
||||
* The shipping method tax line to be created.
|
||||
*/
|
||||
export interface CreateShippingMethodTaxLineDTO extends CreateTaxLineDTO {}
|
||||
export interface CreateShippingMethodTaxLineDTO
|
||||
extends Omit<CreateTaxLineDTO, "item_id"> {
|
||||
/**
|
||||
* The associated shipping method's ID.
|
||||
*/
|
||||
shipping_method_id: string
|
||||
}
|
||||
|
||||
/**
|
||||
* The attributes to update in the shipping method tax line.
|
||||
*/
|
||||
export interface UpdateShippingMethodTaxLineDTO extends UpdateTaxLineDTO {}
|
||||
export interface UpdateShippingMethodTaxLineDTO
|
||||
extends Omit<UpdateTaxLineDTO, "item_id"> {
|
||||
/**
|
||||
* The associated shipping method's ID.
|
||||
*/
|
||||
shipping_method_id?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* The line item tax line to be created.
|
||||
|
||||
@@ -2075,4 +2075,123 @@ export interface ICartModuleService extends IModuleService {
|
||||
config?: RestoreReturn<TReturnableLinkableKeys>,
|
||||
sharedContext?: Context
|
||||
): Promise<Record<TReturnableLinkableKeys, string[]> | void>
|
||||
|
||||
/**
|
||||
* This method upserts line item adjustments.
|
||||
*
|
||||
* @param {UpsertLineItemAdjustmentDTO[]} data - The line item adjustments to create or update. If the `id` property is provided
|
||||
* in an object, it means an existing line item adjustment will be updated. Otherwise, a new one is created.
|
||||
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
||||
* @returns {Promise<LineItemAdjustmentDTO[]>} The line item adjustments.
|
||||
*
|
||||
* @example
|
||||
* const lineItemAdjustments = await orderModuleService.upsertLineItemAdjustments(
|
||||
* [
|
||||
* {
|
||||
* item_id: "1234",
|
||||
* amount: 10
|
||||
* },
|
||||
* {
|
||||
* id: "123",
|
||||
* item_id: "4321",
|
||||
* amount: 20
|
||||
* }
|
||||
* ]
|
||||
* )
|
||||
*
|
||||
*/
|
||||
upsertLineItemAdjustments(
|
||||
data: UpsertLineItemAdjustmentDTO[],
|
||||
sharedContext?: Context
|
||||
): Promise<LineItemAdjustmentDTO[]>
|
||||
|
||||
/**
|
||||
* This method upserts shipping method adjustments.
|
||||
*
|
||||
* @param {(CreateShippingMethodAdjustmentDTO | UpdateShippingMethodAdjustmentDTO)[]} data - The shipping method adjustments to be created
|
||||
* or updated. If an adjustment object has an `id` property, it's updated. Otherwise, a new adjustment is created.
|
||||
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
||||
* @returns {Promise<ShippingMethodAdjustmentDTO[]>} The shipping method adjustments.
|
||||
*
|
||||
* @example
|
||||
* const shippingMethodAdjustments = await orderModuleService
|
||||
* .upsertShippingMethodAdjustments(
|
||||
* [
|
||||
* {
|
||||
* shipping_method_id: "123",
|
||||
* code: "50OFF",
|
||||
* amount: 5
|
||||
* },
|
||||
* {
|
||||
* id: "321",
|
||||
* amount: 5
|
||||
* }
|
||||
* ]
|
||||
* )
|
||||
*
|
||||
*/
|
||||
upsertShippingMethodAdjustments(
|
||||
data: (
|
||||
| CreateShippingMethodAdjustmentDTO
|
||||
| UpdateShippingMethodAdjustmentDTO
|
||||
)[],
|
||||
sharedContext?: Context
|
||||
): Promise<ShippingMethodAdjustmentDTO[]>
|
||||
|
||||
/**
|
||||
* This method upserts line item tax lines.
|
||||
*
|
||||
* @param {(CreateLineItemTaxLineDTO | UpdateLineItemTaxLineDTO)[]} taxLines - The line item tax lines to create or update. If the
|
||||
* tax line object has an `id` property, it'll be updated. Otherwise, a tax line is created.
|
||||
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
||||
* @returns {Promise<LineItemTaxLineDTO[]>} The line item tax lines.
|
||||
*
|
||||
* @example
|
||||
* const lineItemTaxLines = await orderModuleService
|
||||
* .upsertLineItemTaxLines(
|
||||
* [
|
||||
* {
|
||||
* code: "123",
|
||||
* rate: 2
|
||||
* }
|
||||
* ]
|
||||
* )
|
||||
*
|
||||
*/
|
||||
upsertLineItemTaxLines(
|
||||
taxLines: (CreateLineItemTaxLineDTO | UpdateLineItemTaxLineDTO)[],
|
||||
sharedContext?: Context
|
||||
): Promise<LineItemTaxLineDTO[]>
|
||||
|
||||
/**
|
||||
* This method upsert shipping method tax lines.
|
||||
*
|
||||
* @param {(CreateShippingMethodTaxLineDTO | UpdateShippingMethodTaxLineDTO)[]} taxLines - The shipping method tax lines to create or update.
|
||||
* If a tax line object has an `id` property, it's updated. Otherwise, a tax line is created.
|
||||
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
||||
* @returns {Promise<ShippingMethodTaxLineDTO[]>} The shipping method tax lines.
|
||||
*
|
||||
* @example
|
||||
* const shippingMethodTaxLines = await orderModuleService
|
||||
* .upsertShippingMethodTaxLines(
|
||||
* [
|
||||
* {
|
||||
* code: "123",
|
||||
* rate: 2
|
||||
* },
|
||||
* {
|
||||
* id: "321",
|
||||
* rate: 2
|
||||
* }
|
||||
* ]
|
||||
* )
|
||||
*
|
||||
*/
|
||||
upsertShippingMethodTaxLines(
|
||||
taxLines: (
|
||||
| CreateShippingMethodTaxLineDTO
|
||||
| UpdateShippingMethodTaxLineDTO
|
||||
)[],
|
||||
sharedContext?: Context
|
||||
): Promise<ShippingMethodTaxLineDTO[]>
|
||||
}
|
||||
@@ -552,6 +552,16 @@ export interface PaymentSessionDTO {
|
||||
*/
|
||||
authorized_at?: Date
|
||||
|
||||
/**
|
||||
* When the payment session was created
|
||||
*/
|
||||
created_at: Date | string
|
||||
|
||||
/**
|
||||
* When the payment session was updated
|
||||
*/
|
||||
updated_at: Date | string
|
||||
|
||||
/**
|
||||
* The ID of the associated payment collection.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/utils
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7)]:
|
||||
- @medusajs/types@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/utils",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa utilities functions shared by Medusa core and Modules",
|
||||
"main": "dist/index.js",
|
||||
"exports": {
|
||||
@@ -47,7 +47,7 @@
|
||||
"@graphql-codegen/typescript": "^4.0.9",
|
||||
"@graphql-tools/merge": "^9.0.7",
|
||||
"@graphql-tools/schema": "^10.0.6",
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/types": "2.6.1",
|
||||
"@types/pluralize": "^0.0.33",
|
||||
"bignumber.js": "^9.1.2",
|
||||
"dotenv": "^16.4.5",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @medusajs/workflows-sdk
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- [#11756](https://github.com/medusajs/medusa/pull/11756) [`84f991192ec288f90af36c5352448b2785901d1a`](https://github.com/medusajs/medusa/commit/84f991192ec288f90af36c5352448b2785901d1a) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(workflows-sdk): Allow when then in parallelize
|
||||
|
||||
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
|
||||
- @medusajs/types@2.6.1
|
||||
- @medusajs/orchestration@2.6.1
|
||||
- @medusajs/modules-sdk@2.6.1
|
||||
- @medusajs/utils@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/workflows-sdk",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Set of workflows tooling for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"exports": {
|
||||
@@ -40,10 +40,10 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/modules-sdk": "2.6.0",
|
||||
"@medusajs/orchestration": "2.6.0",
|
||||
"@medusajs/types": "2.6.0",
|
||||
"@medusajs/utils": "2.6.0",
|
||||
"@medusajs/modules-sdk": "2.6.1",
|
||||
"@medusajs/orchestration": "2.6.1",
|
||||
"@medusajs/types": "2.6.1",
|
||||
"@medusajs/utils": "2.6.1",
|
||||
"ulid": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @medusajs/icons
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/icons",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa UI React icon library",
|
||||
"author": "Kasper Kristensen <kasper@medusajs.com>",
|
||||
"license": "MIT",
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@atomico/rollup-plugin-sizes": "^1.1.4",
|
||||
"@medusajs/toolbox": "2.6.0",
|
||||
"@medusajs/toolbox": "2.6.1",
|
||||
"@rollup/plugin-node-resolve": "^15.1.0",
|
||||
"@rollup/plugin-replace": "^5.0.2",
|
||||
"@testing-library/dom": "^9.3.1",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @medusajs/toolbox
|
||||
|
||||
## 2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@medusajs/toolbox",
|
||||
"private": true,
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "CLI tool for importing Figma designs for Medusa UI",
|
||||
"license": "MIT",
|
||||
"author": "Kasper Kristensen <kasper@medusajs.com>",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @medusajs/ui-preset
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/ui-preset",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa UI preset",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -30,7 +30,7 @@
|
||||
"tailwindcss": ">=3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/toolbox": "2.6.0",
|
||||
"@medusajs/toolbox": "2.6.1",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"tsup": "^7.1.0",
|
||||
"typescript": "^5.1.6"
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/ui
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
|
||||
- @medusajs/icons@2.6.1
|
||||
|
||||
## 4.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/ui",
|
||||
"version": "4.0.6",
|
||||
"version": "4.0.7",
|
||||
"author": "Kasper Kristensen <kasper@medusajs.com>",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@faker-js/faker": "^9.2.0",
|
||||
"@medusajs/ui-preset": "2.6.0",
|
||||
"@medusajs/ui-preset": "2.6.1",
|
||||
"@storybook/addon-essentials": "^8.3.5",
|
||||
"@storybook/addon-interactions": "^8.3.5",
|
||||
"@storybook/addon-links": "^8.3.5",
|
||||
@@ -81,7 +81,7 @@
|
||||
"vitest": "^3.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/icons": "2.6.0",
|
||||
"@medusajs/icons": "2.6.1",
|
||||
"@tanstack/react-table": "8.20.5",
|
||||
"clsx": "^1.2.1",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Change Log
|
||||
|
||||
## 2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/telemetry",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Telemetry for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"repository": {
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# Change Log
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`62e429178f3abe0a528f7a574eb6a09ac525bf9c`](https://github.com/medusajs/medusa/commit/62e429178f3abe0a528f7a574eb6a09ac525bf9c), [`90964a404edbb079d7de332a11ab97c4f5643d67`](https://github.com/medusajs/medusa/commit/90964a404edbb079d7de332a11ab97c4f5643d67), [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf), [`2a0bd86204c9dd51a012763016f2de822d3c45b6`](https://github.com/medusajs/medusa/commit/2a0bd86204c9dd51a012763016f2de822d3c45b6)]:
|
||||
- @medusajs/medusa@2.6.1
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/test-utils",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Test utils for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"repository": {
|
||||
@@ -25,7 +25,7 @@
|
||||
"author": "Medusa",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/knex": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
@@ -45,8 +45,8 @@
|
||||
"randomatic": "^3.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/medusa": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@medusajs/medusa": "2.6.1",
|
||||
"@mikro-orm/postgresql": "6.4.3",
|
||||
"awilix": "^8.0.1"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,65 @@
|
||||
# Change Log
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11789](https://github.com/medusajs/medusa/pull/11789) [`62e429178f3abe0a528f7a574eb6a09ac525bf9c`](https://github.com/medusajs/medusa/commit/62e429178f3abe0a528f7a574eb6a09ac525bf9c) Thanks [@kasperkristensen](https://github.com/kasperkristensen)! - fix(medusa): Use correct query config for customer address
|
||||
|
||||
- [#11788](https://github.com/medusajs/medusa/pull/11788) [`90964a404edbb079d7de332a11ab97c4f5643d67`](https://github.com/medusajs/medusa/commit/90964a404edbb079d7de332a11ab97c4f5643d67) Thanks [@kasperkristensen](https://github.com/kasperkristensen)! - fix(medusa): Apply middleware to GET customers/:id/addresses/:address_id
|
||||
|
||||
- [#11724](https://github.com/medusajs/medusa/pull/11724) [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e) Thanks [@adrien2p](https://github.com/adrien2p)! - chore(product): Improve product normalization
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- [#11759](https://github.com/medusajs/medusa/pull/11759) [`2a0bd86204c9dd51a012763016f2de822d3c45b6`](https://github.com/medusajs/medusa/commit/2a0bd86204c9dd51a012763016f2de822d3c45b6) Thanks [@thetutlage](https://github.com/thetutlage)! - chore: pin swc to 1.5.7
|
||||
|
||||
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`70eaaa91965dbe3a641dc634b4e81069d73846ed`](https://github.com/medusajs/medusa/commit/70eaaa91965dbe3a641dc634b4e81069d73846ed), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf), [`84f991192ec288f90af36c5352448b2785901d1a`](https://github.com/medusajs/medusa/commit/84f991192ec288f90af36c5352448b2785901d1a), [`16d7294de805e314f36b302c7b3bbdb126ae5c96`](https://github.com/medusajs/medusa/commit/16d7294de805e314f36b302c7b3bbdb126ae5c96), [`cc8422d3a163d18492e1bd6de50e0796ca34a41f`](https://github.com/medusajs/medusa/commit/cc8422d3a163d18492e1bd6de50e0796ca34a41f)]:
|
||||
- @medusajs/core-flows@2.6.1
|
||||
- @medusajs/cart@2.6.1
|
||||
- @medusajs/product@2.6.1
|
||||
- @medusajs/framework@2.6.1
|
||||
- @medusajs/notification-sendgrid@2.6.1
|
||||
- @medusajs/fulfillment-manual@2.6.1
|
||||
- @medusajs/notification-local@2.6.1
|
||||
- @medusajs/locking-postgres@2.6.1
|
||||
- @medusajs/auth-emailpass@2.6.1
|
||||
- @medusajs/payment-stripe@2.6.1
|
||||
- @medusajs/workflow-engine-inmemory@2.6.1
|
||||
- @medusajs/locking-redis@2.6.1
|
||||
- @medusajs/auth-github@2.6.1
|
||||
- @medusajs/auth-google@2.6.1
|
||||
- @medusajs/workflow-engine-redis@2.6.1
|
||||
- @medusajs/file-local@2.6.1
|
||||
- @medusajs/file-s3@2.6.1
|
||||
- @medusajs/event-bus-local@2.6.1
|
||||
- @medusajs/event-bus-redis@2.6.1
|
||||
- @medusajs/cache-inmemory@2.6.1
|
||||
- @medusajs/stock-location@2.6.1
|
||||
- @medusajs/sales-channel@2.6.1
|
||||
- @medusajs/link-modules@2.6.1
|
||||
- @medusajs/notification@2.6.1
|
||||
- @medusajs/admin-bundler@2.6.1
|
||||
- @medusajs/cache-redis@2.6.1
|
||||
- @medusajs/fulfillment@2.6.1
|
||||
- @medusajs/inventory@2.6.1
|
||||
- @medusajs/promotion@2.6.1
|
||||
- @medusajs/currency@2.6.1
|
||||
- @medusajs/customer@2.6.1
|
||||
- @medusajs/api-key@2.6.1
|
||||
- @medusajs/locking@2.6.1
|
||||
- @medusajs/payment@2.6.1
|
||||
- @medusajs/pricing@2.6.1
|
||||
- @medusajs/region@2.6.1
|
||||
- @medusajs/index@2.6.1
|
||||
- @medusajs/order@2.6.1
|
||||
- @medusajs/store@2.6.1
|
||||
- @medusajs/auth@2.6.1
|
||||
- @medusajs/file@2.6.1
|
||||
- @medusajs/user@2.6.1
|
||||
- @medusajs/tax@2.6.1
|
||||
- @medusajs/telemetry@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/medusa",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Building blocks for digital commerce",
|
||||
"main": "dist/index.js",
|
||||
"exports": {
|
||||
@@ -44,7 +44,7 @@
|
||||
"test:integration": "jest --forceExit -- src/**/integration-tests/**/__tests__/**/*.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@opentelemetry/api": "^1.9.0",
|
||||
"@opentelemetry/instrumentation": "^0.53.0",
|
||||
"@opentelemetry/instrumentation-pg": "^0.44.0",
|
||||
@@ -67,49 +67,49 @@
|
||||
"dependencies": {
|
||||
"@inquirer/checkbox": "^2.3.11",
|
||||
"@inquirer/input": "^2.2.9",
|
||||
"@medusajs/admin-bundler": "2.6.0",
|
||||
"@medusajs/api-key": "2.6.0",
|
||||
"@medusajs/auth": "2.6.0",
|
||||
"@medusajs/auth-emailpass": "2.6.0",
|
||||
"@medusajs/auth-github": "2.6.0",
|
||||
"@medusajs/auth-google": "2.6.0",
|
||||
"@medusajs/cache-inmemory": "2.6.0",
|
||||
"@medusajs/cache-redis": "2.6.0",
|
||||
"@medusajs/cart": "2.6.0",
|
||||
"@medusajs/core-flows": "2.6.0",
|
||||
"@medusajs/currency": "2.6.0",
|
||||
"@medusajs/customer": "2.6.0",
|
||||
"@medusajs/event-bus-local": "2.6.0",
|
||||
"@medusajs/event-bus-redis": "2.6.0",
|
||||
"@medusajs/file": "2.6.0",
|
||||
"@medusajs/file-local": "2.6.0",
|
||||
"@medusajs/file-s3": "2.6.0",
|
||||
"@medusajs/fulfillment": "2.6.0",
|
||||
"@medusajs/fulfillment-manual": "2.6.0",
|
||||
"@medusajs/index": "2.6.0",
|
||||
"@medusajs/inventory": "2.6.0",
|
||||
"@medusajs/link-modules": "2.6.0",
|
||||
"@medusajs/locking": "2.6.0",
|
||||
"@medusajs/locking-postgres": "2.6.0",
|
||||
"@medusajs/locking-redis": "2.6.0",
|
||||
"@medusajs/notification": "2.6.0",
|
||||
"@medusajs/notification-local": "2.6.0",
|
||||
"@medusajs/notification-sendgrid": "2.6.0",
|
||||
"@medusajs/order": "2.6.0",
|
||||
"@medusajs/payment": "2.6.0",
|
||||
"@medusajs/payment-stripe": "2.6.0",
|
||||
"@medusajs/pricing": "2.6.0",
|
||||
"@medusajs/product": "2.6.0",
|
||||
"@medusajs/promotion": "2.6.0",
|
||||
"@medusajs/region": "2.6.0",
|
||||
"@medusajs/sales-channel": "2.6.0",
|
||||
"@medusajs/stock-location": "2.6.0",
|
||||
"@medusajs/store": "2.6.0",
|
||||
"@medusajs/tax": "2.6.0",
|
||||
"@medusajs/telemetry": "2.6.0",
|
||||
"@medusajs/user": "2.6.0",
|
||||
"@medusajs/workflow-engine-inmemory": "2.6.0",
|
||||
"@medusajs/workflow-engine-redis": "2.6.0",
|
||||
"@medusajs/admin-bundler": "2.6.1",
|
||||
"@medusajs/api-key": "2.6.1",
|
||||
"@medusajs/auth": "2.6.1",
|
||||
"@medusajs/auth-emailpass": "2.6.1",
|
||||
"@medusajs/auth-github": "2.6.1",
|
||||
"@medusajs/auth-google": "2.6.1",
|
||||
"@medusajs/cache-inmemory": "2.6.1",
|
||||
"@medusajs/cache-redis": "2.6.1",
|
||||
"@medusajs/cart": "2.6.1",
|
||||
"@medusajs/core-flows": "2.6.1",
|
||||
"@medusajs/currency": "2.6.1",
|
||||
"@medusajs/customer": "2.6.1",
|
||||
"@medusajs/event-bus-local": "2.6.1",
|
||||
"@medusajs/event-bus-redis": "2.6.1",
|
||||
"@medusajs/file": "2.6.1",
|
||||
"@medusajs/file-local": "2.6.1",
|
||||
"@medusajs/file-s3": "2.6.1",
|
||||
"@medusajs/fulfillment": "2.6.1",
|
||||
"@medusajs/fulfillment-manual": "2.6.1",
|
||||
"@medusajs/index": "2.6.1",
|
||||
"@medusajs/inventory": "2.6.1",
|
||||
"@medusajs/link-modules": "2.6.1",
|
||||
"@medusajs/locking": "2.6.1",
|
||||
"@medusajs/locking-postgres": "2.6.1",
|
||||
"@medusajs/locking-redis": "2.6.1",
|
||||
"@medusajs/notification": "2.6.1",
|
||||
"@medusajs/notification-local": "2.6.1",
|
||||
"@medusajs/notification-sendgrid": "2.6.1",
|
||||
"@medusajs/order": "2.6.1",
|
||||
"@medusajs/payment": "2.6.1",
|
||||
"@medusajs/payment-stripe": "2.6.1",
|
||||
"@medusajs/pricing": "2.6.1",
|
||||
"@medusajs/product": "2.6.1",
|
||||
"@medusajs/promotion": "2.6.1",
|
||||
"@medusajs/region": "2.6.1",
|
||||
"@medusajs/sales-channel": "2.6.1",
|
||||
"@medusajs/stock-location": "2.6.1",
|
||||
"@medusajs/store": "2.6.1",
|
||||
"@medusajs/tax": "2.6.1",
|
||||
"@medusajs/telemetry": "2.6.1",
|
||||
"@medusajs/user": "2.6.1",
|
||||
"@medusajs/workflow-engine-inmemory": "2.6.1",
|
||||
"@medusajs/workflow-engine-redis": "2.6.1",
|
||||
"boxen": "^5.0.1",
|
||||
"chalk": "^4.0.0",
|
||||
"chokidar": "^3.4.2",
|
||||
@@ -127,7 +127,7 @@
|
||||
"zod": "3.22.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/knex": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
|
||||
@@ -4,17 +4,18 @@ import {
|
||||
AdminCreateCustomer,
|
||||
AdminCreateCustomerAddress,
|
||||
AdminCustomerAddressesParams,
|
||||
AdminCustomerAddressParams,
|
||||
AdminCustomerParams,
|
||||
AdminCustomersParams,
|
||||
AdminUpdateCustomer,
|
||||
AdminUpdateCustomerAddress,
|
||||
} from "./validators"
|
||||
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import {
|
||||
validateAndTransformBody,
|
||||
validateAndTransformQuery,
|
||||
} from "@medusajs/framework"
|
||||
import { MiddlewareRoute } from "@medusajs/framework/http"
|
||||
import { createLinkBody } from "../../utils/validators"
|
||||
|
||||
export const adminCustomerRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
@@ -71,6 +72,16 @@ export const adminCustomerRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
),
|
||||
],
|
||||
},
|
||||
{
|
||||
method: ["GET"],
|
||||
matcher: "/admin/customers/:id/addresses/:address_id",
|
||||
middlewares: [
|
||||
validateAndTransformQuery(
|
||||
AdminCustomerAddressParams,
|
||||
QueryConfig.retrieveTransformQueryConfig
|
||||
),
|
||||
],
|
||||
},
|
||||
{
|
||||
method: ["POST"],
|
||||
matcher: "/admin/customers/:id/addresses/:address_id",
|
||||
@@ -78,7 +89,7 @@ export const adminCustomerRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
validateAndTransformBody(AdminUpdateCustomerAddress),
|
||||
validateAndTransformQuery(
|
||||
AdminCustomerParams,
|
||||
QueryConfig.retrieveTransformQueryConfig
|
||||
QueryConfig.retrieveAddressTransformQueryConfig
|
||||
),
|
||||
],
|
||||
},
|
||||
|
||||
@@ -90,6 +90,8 @@ export const AdminCreateCustomerAddress = WithAdditionalData(
|
||||
|
||||
export const AdminUpdateCustomerAddress = AdminCreateCustomerAddress
|
||||
|
||||
export const AdminCustomerAddressParams = createSelectParams()
|
||||
|
||||
export const AdminCustomerAddressesParams = createFindParams({
|
||||
offset: 0,
|
||||
limit: 50,
|
||||
@@ -108,6 +110,9 @@ export type AdminCustomerParamsType = z.infer<typeof AdminCustomerParams>
|
||||
export type AdminCustomersParamsType = z.infer<typeof AdminCustomersParams>
|
||||
export type AdminCreateCustomerType = z.infer<typeof CreateCustomer>
|
||||
export type AdminUpdateCustomerType = z.infer<typeof UpdateCustomer>
|
||||
export type AdminCustomerAddressParamsType = z.infer<
|
||||
typeof AdminCustomerAddressParams
|
||||
>
|
||||
export type AdminCreateCustomerAddressType = z.infer<
|
||||
typeof CreateCustomerAddress
|
||||
>
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/api-key
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/api-key",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa API Key module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -36,8 +36,8 @@
|
||||
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/test-utils": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@medusajs/test-utils": "2.6.1",
|
||||
"@mikro-orm/cli": "6.4.3",
|
||||
"@swc/core": "^1.7.28",
|
||||
"@swc/jest": "^0.2.36",
|
||||
@@ -47,7 +47,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
"@mikro-orm/postgresql": "6.4.3",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/auth
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/auth",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa Auth module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -36,8 +36,8 @@
|
||||
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/test-utils": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@medusajs/test-utils": "2.6.1",
|
||||
"@mikro-orm/cli": "6.4.3",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
@@ -50,7 +50,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
"@mikro-orm/postgresql": "6.4.3",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/cache-inmemory
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/cache-inmemory",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "In-memory Cache Module for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"repository": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"author": "Medusa",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@swc/core": "^1.7.28",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"jest": "^29.7.0",
|
||||
@@ -36,6 +36,6 @@
|
||||
"test": "jest --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0"
|
||||
"@medusajs/framework": "2.6.1"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/cache-redis
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/cache-redis",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Redis Cache Module for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"repository": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"author": "Medusa",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@swc/core": "^1.7.28",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"jest": "^29.7.0",
|
||||
@@ -39,7 +39,7 @@
|
||||
"ioredis": "^5.4.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"awilix": "^8.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,16 @@
|
||||
# @medusajs/cart
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11715](https://github.com/medusajs/medusa/pull/11715) [`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7) Thanks [@carlos-r-l-rodrigues](https://github.com/carlos-r-l-rodrigues)! - chore: improve tax lines
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2272,6 +2272,343 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
})
|
||||
})
|
||||
|
||||
describe("setShippingMethodTaxLines", () => {
|
||||
it("should set shipping item tax lines for a cart", async () => {
|
||||
const [createdCart] = await service.createCarts([
|
||||
{
|
||||
currency_code: "eur",
|
||||
},
|
||||
])
|
||||
|
||||
const [itemOne] = await service.addShippingMethods(createdCart.id, [
|
||||
{
|
||||
name: "test",
|
||||
amount: 100,
|
||||
},
|
||||
])
|
||||
|
||||
const [itemTwo] = await service.addShippingMethods(createdCart.id, [
|
||||
{
|
||||
name: "test-2",
|
||||
amount: 200,
|
||||
},
|
||||
])
|
||||
|
||||
const taxLines = await service.setShippingMethodTaxLines(
|
||||
createdCart.id,
|
||||
[
|
||||
{
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
},
|
||||
{
|
||||
shipping_method_id: itemTwo.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
expect(taxLines).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemTwo.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
}),
|
||||
])
|
||||
)
|
||||
})
|
||||
|
||||
it("should replace shipping item tax lines for a cart", async () => {
|
||||
const [createdCart] = await service.createCarts([
|
||||
{
|
||||
currency_code: "eur",
|
||||
},
|
||||
])
|
||||
|
||||
const [itemOne] = await service.addShippingMethods(createdCart.id, [
|
||||
{
|
||||
name: "test",
|
||||
amount: 100,
|
||||
},
|
||||
])
|
||||
|
||||
const taxLines = await service.setShippingMethodTaxLines(
|
||||
createdCart.id,
|
||||
[
|
||||
{
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20.753,
|
||||
code: "TX",
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
expect(taxLines).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20.753,
|
||||
code: "TX",
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
await service.setShippingMethodTaxLines(createdCart.id, [
|
||||
{
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 25.14789,
|
||||
code: "TX-2",
|
||||
},
|
||||
])
|
||||
|
||||
const cart = await service.retrieveCart(createdCart.id, {
|
||||
relations: ["shipping_methods.tax_lines"],
|
||||
})
|
||||
|
||||
expect(cart.shipping_methods).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: itemOne.id,
|
||||
tax_lines: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 25.14789,
|
||||
code: "TX-2",
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
expect(cart.shipping_methods?.length).toBe(1)
|
||||
expect(cart.shipping_methods?.[0].tax_lines?.length).toBe(1)
|
||||
})
|
||||
|
||||
it("should remove all shipping item tax lines for a cart", async () => {
|
||||
const [createdCart] = await service.createCarts([
|
||||
{
|
||||
currency_code: "eur",
|
||||
},
|
||||
])
|
||||
|
||||
const [itemOne] = await service.addShippingMethods(createdCart.id, [
|
||||
{
|
||||
name: "test",
|
||||
amount: 100,
|
||||
},
|
||||
])
|
||||
|
||||
const taxLines = await service.setShippingMethodTaxLines(
|
||||
createdCart.id,
|
||||
[
|
||||
{
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
expect(taxLines).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
await service.setShippingMethodTaxLines(createdCart.id, [])
|
||||
|
||||
const cart = await service.retrieveCart(createdCart.id, {
|
||||
relations: ["shipping_methods.tax_lines"],
|
||||
})
|
||||
|
||||
expect(cart.shipping_methods).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: itemOne.id,
|
||||
tax_lines: [],
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
expect(cart.shipping_methods?.length).toBe(1)
|
||||
expect(cart.shipping_methods?.[0].tax_lines?.length).toBe(0)
|
||||
})
|
||||
|
||||
it("should update shipping item tax lines for a cart", async () => {
|
||||
const [createdCart] = await service.createCarts([
|
||||
{
|
||||
currency_code: "eur",
|
||||
},
|
||||
])
|
||||
|
||||
const [itemOne] = await service.addShippingMethods(createdCart.id, [
|
||||
{
|
||||
name: "test",
|
||||
amount: 100,
|
||||
},
|
||||
])
|
||||
|
||||
const taxLines = await service.setShippingMethodTaxLines(
|
||||
createdCart.id,
|
||||
[
|
||||
{
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
expect(taxLines).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
await service.setShippingMethodTaxLines(createdCart.id, [
|
||||
{
|
||||
id: taxLines[0].id,
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 25,
|
||||
code: "TX",
|
||||
},
|
||||
])
|
||||
|
||||
const cart = await service.retrieveCart(createdCart.id, {
|
||||
relations: ["shipping_methods.tax_lines"],
|
||||
})
|
||||
|
||||
expect(cart.shipping_methods).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: itemOne.id,
|
||||
tax_lines: [
|
||||
expect.objectContaining({
|
||||
id: taxLines[0].id,
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 25,
|
||||
code: "TX",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
expect(cart.shipping_methods?.length).toBe(1)
|
||||
expect(cart.shipping_methods?.[0].tax_lines?.length).toBe(1)
|
||||
})
|
||||
|
||||
it("should remove, update, and create shipping item tax lines for a cart", async () => {
|
||||
const [createdCart] = await service.createCarts([
|
||||
{
|
||||
currency_code: "eur",
|
||||
},
|
||||
])
|
||||
|
||||
const [itemOne] = await service.addShippingMethods(createdCart.id, [
|
||||
{
|
||||
name: "test",
|
||||
amount: 100,
|
||||
},
|
||||
])
|
||||
|
||||
const taxLines = await service.setShippingMethodTaxLines(
|
||||
createdCart.id,
|
||||
[
|
||||
{
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
},
|
||||
{
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 25,
|
||||
code: "TX",
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
expect(taxLines).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 20,
|
||||
code: "TX",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 25,
|
||||
code: "TX",
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
const taxLine = taxLines.find(
|
||||
(tx) => tx.shipping_method_id === itemOne.id
|
||||
)
|
||||
|
||||
await service.setShippingMethodTaxLines(createdCart.id, [
|
||||
// update
|
||||
{
|
||||
id: taxLine.id,
|
||||
rate: 40,
|
||||
code: "TX",
|
||||
},
|
||||
// create
|
||||
{
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 25,
|
||||
code: "TX-2",
|
||||
},
|
||||
// remove: should remove the initial tax line for itemOne
|
||||
])
|
||||
|
||||
const cart = await service.retrieveCart(createdCart.id, {
|
||||
relations: ["shipping_methods.tax_lines"],
|
||||
})
|
||||
|
||||
expect(cart.shipping_methods).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: itemOne.id,
|
||||
tax_lines: [
|
||||
expect.objectContaining({
|
||||
id: taxLine!.id,
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 40,
|
||||
code: "TX",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
shipping_method_id: itemOne.id,
|
||||
rate: 25,
|
||||
code: "TX-2",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
expect(cart.shipping_methods?.length).toBe(1)
|
||||
expect(cart.shipping_methods?.[0].tax_lines?.length).toBe(2)
|
||||
})
|
||||
})
|
||||
|
||||
describe("addLineItemAdjustments", () => {
|
||||
it("should add line item tax lines for items in a cart", async () => {
|
||||
const [createdCart] = await service.createCarts([
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/cart",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa Cart module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -36,8 +36,8 @@
|
||||
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/test-utils": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@medusajs/test-utils": "2.6.1",
|
||||
"@mikro-orm/cli": "6.4.3",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
@@ -50,7 +50,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
"@mikro-orm/postgresql": "6.4.3",
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
createRawPropertiesFromBigNumber,
|
||||
decorateCartTotals,
|
||||
deduplicate,
|
||||
generateEntityId,
|
||||
InjectManager,
|
||||
InjectTransactionManager,
|
||||
isObject,
|
||||
@@ -20,6 +21,7 @@ import {
|
||||
MedusaContext,
|
||||
MedusaError,
|
||||
ModulesSdkUtils,
|
||||
promiseAll,
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
Address,
|
||||
@@ -357,9 +359,7 @@ export default class CartModuleService
|
||||
|
||||
const serializedResult = await this.baseRepository_.serialize<
|
||||
CartTypes.CartDTO[]
|
||||
>(result, {
|
||||
populate: true,
|
||||
})
|
||||
>(result)
|
||||
|
||||
return isString(dataOrIdOrSelector) ? serializedResult[0] : serializedResult
|
||||
}
|
||||
@@ -448,10 +448,7 @@ export default class CartModuleService
|
||||
}
|
||||
|
||||
return await this.baseRepository_.serialize<CartTypes.CartLineItemDTO[]>(
|
||||
items,
|
||||
{
|
||||
populate: true,
|
||||
}
|
||||
items
|
||||
)
|
||||
}
|
||||
|
||||
@@ -557,10 +554,7 @@ export default class CartModuleService
|
||||
)
|
||||
|
||||
return await this.baseRepository_.serialize<CartTypes.CartLineItemDTO[]>(
|
||||
items,
|
||||
{
|
||||
populate: true,
|
||||
}
|
||||
items
|
||||
)
|
||||
}
|
||||
|
||||
@@ -718,7 +712,7 @@ export default class CartModuleService
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.CartShippingMethodDTO[]
|
||||
>(methods, { populate: true })
|
||||
>(methods)
|
||||
}
|
||||
|
||||
@InjectTransactionManager()
|
||||
@@ -809,9 +803,79 @@ export default class CartModuleService
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.LineItemAdjustmentDTO[]
|
||||
>(addedAdjustments, {
|
||||
populate: true,
|
||||
})
|
||||
>(addedAdjustments)
|
||||
}
|
||||
|
||||
@InjectTransactionManager()
|
||||
async upsertLineItemTaxLines(
|
||||
taxLines: (
|
||||
| CartTypes.CreateLineItemTaxLineDTO
|
||||
| CartTypes.UpdateLineItemTaxLineDTO
|
||||
)[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
): Promise<CartTypes.LineItemTaxLineDTO[]> {
|
||||
const result = await this.lineItemTaxLineService_.upsert(
|
||||
taxLines as CartTypes.UpdateLineItemTaxLineDTO[],
|
||||
sharedContext
|
||||
)
|
||||
|
||||
return await this.baseRepository_.serialize<CartTypes.LineItemTaxLineDTO[]>(
|
||||
result
|
||||
)
|
||||
}
|
||||
|
||||
@InjectTransactionManager()
|
||||
async upsertLineItemAdjustments(
|
||||
adjustments: (
|
||||
| CartTypes.CreateLineItemAdjustmentDTO
|
||||
| CartTypes.UpdateLineItemAdjustmentDTO
|
||||
)[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
): Promise<CartTypes.LineItemAdjustmentDTO[]> {
|
||||
let result = await this.lineItemAdjustmentService_.upsert(
|
||||
adjustments,
|
||||
sharedContext
|
||||
)
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.LineItemAdjustmentDTO[]
|
||||
>(result)
|
||||
}
|
||||
|
||||
@InjectTransactionManager()
|
||||
async upsertShippingMethodTaxLines(
|
||||
taxLines: (
|
||||
| CartTypes.CreateShippingMethodTaxLineDTO
|
||||
| CartTypes.UpdateShippingMethodTaxLineDTO
|
||||
)[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
): Promise<CartTypes.ShippingMethodTaxLineDTO[]> {
|
||||
const result = await this.shippingMethodTaxLineService_.upsert(
|
||||
taxLines as UpdateShippingMethodTaxLineDTO[],
|
||||
sharedContext
|
||||
)
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.ShippingMethodTaxLineDTO[]
|
||||
>(result)
|
||||
}
|
||||
|
||||
@InjectTransactionManager()
|
||||
async upsertShippingMethodAdjustments(
|
||||
adjustments: (
|
||||
| CartTypes.CreateShippingMethodAdjustmentDTO
|
||||
| CartTypes.UpdateShippingMethodAdjustmentDTO
|
||||
)[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
): Promise<CartTypes.ShippingMethodAdjustmentDTO[]> {
|
||||
const result = await this.shippingMethodAdjustmentService_.upsert(
|
||||
adjustments,
|
||||
sharedContext
|
||||
)
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.ShippingMethodAdjustmentDTO[]
|
||||
>(result)
|
||||
}
|
||||
|
||||
@InjectTransactionManager()
|
||||
@@ -864,9 +928,7 @@ export default class CartModuleService
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.LineItemAdjustmentDTO[]
|
||||
>(result, {
|
||||
populate: true,
|
||||
})
|
||||
>(result)
|
||||
}
|
||||
|
||||
@InjectTransactionManager()
|
||||
@@ -921,9 +983,7 @@ export default class CartModuleService
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.ShippingMethodAdjustmentDTO[]
|
||||
>(result, {
|
||||
populate: true,
|
||||
})
|
||||
>(result)
|
||||
}
|
||||
|
||||
async addShippingMethodAdjustments(
|
||||
@@ -986,17 +1046,13 @@ export default class CartModuleService
|
||||
if (isObject(cartIdOrData)) {
|
||||
return await this.baseRepository_.serialize<CartTypes.ShippingMethodAdjustmentDTO>(
|
||||
addedAdjustments[0],
|
||||
{
|
||||
populate: true,
|
||||
}
|
||||
{}
|
||||
)
|
||||
}
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.ShippingMethodAdjustmentDTO[]
|
||||
>(addedAdjustments, {
|
||||
populate: true,
|
||||
})
|
||||
>(addedAdjustments)
|
||||
}
|
||||
|
||||
addLineItemTaxLines(
|
||||
@@ -1046,9 +1102,7 @@ export default class CartModuleService
|
||||
|
||||
const serialized = await this.baseRepository_.serialize<
|
||||
CartTypes.LineItemTaxLineDTO[]
|
||||
>(addedTaxLines, {
|
||||
populate: true,
|
||||
})
|
||||
>(addedTaxLines)
|
||||
|
||||
if (isObject(cartIdOrData)) {
|
||||
return serialized[0]
|
||||
@@ -1066,49 +1120,44 @@ export default class CartModuleService
|
||||
)[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
): Promise<CartTypes.LineItemTaxLineDTO[]> {
|
||||
const cart = await this.retrieveCart(
|
||||
cartId,
|
||||
{ select: ["id"], relations: ["items.tax_lines"] },
|
||||
sharedContext
|
||||
)
|
||||
|
||||
const existingTaxLines = await this.listLineItemTaxLines(
|
||||
{ item: { cart_id: cart.id } },
|
||||
{ select: ["id"] },
|
||||
sharedContext
|
||||
)
|
||||
|
||||
const taxLinesSet = new Set(
|
||||
taxLines
|
||||
.map((taxLine) => (taxLine as CartTypes.UpdateLineItemTaxLineDTO)?.id)
|
||||
.filter(Boolean)
|
||||
)
|
||||
|
||||
const toDelete: CartTypes.LineItemTaxLineDTO[] = []
|
||||
|
||||
// From the existing tax lines, find the ones that are not passed in taxLines
|
||||
existingTaxLines.forEach((taxLine: CartTypes.LineItemTaxLineDTO) => {
|
||||
if (!taxLinesSet.has(taxLine.id)) {
|
||||
toDelete.push(taxLine)
|
||||
}
|
||||
const normalizedTaxLines = (
|
||||
taxLines as CartTypes.UpdateLineItemTaxLineDTO[]
|
||||
).map((taxLine) => {
|
||||
// Pre generate the id so that we can optimized the actions below
|
||||
taxLine.id = generateEntityId(taxLine.id, "calitxl")
|
||||
return taxLine
|
||||
})
|
||||
|
||||
if (toDelete.length) {
|
||||
await this.lineItemTaxLineService_.softDelete(
|
||||
toDelete.map((taxLine) => taxLine!.id),
|
||||
sharedContext
|
||||
const taxLineIdsSet = new Set<string>(
|
||||
normalizedTaxLines.map(
|
||||
(taxLine) => (taxLine as CartTypes.UpdateLineItemTaxLineDTO)?.id
|
||||
)
|
||||
)
|
||||
|
||||
const deleteConstraints: {
|
||||
id?: {
|
||||
$nin: string[]
|
||||
}
|
||||
item: { cart_id: string }
|
||||
} = {
|
||||
item: { cart_id: cartId },
|
||||
}
|
||||
|
||||
const result = taxLines.length
|
||||
? await this.lineItemTaxLineService_.upsert(taxLines, sharedContext)
|
||||
: []
|
||||
if (taxLineIdsSet.size) {
|
||||
deleteConstraints.id = {
|
||||
$nin: Array.from(taxLineIdsSet),
|
||||
}
|
||||
}
|
||||
|
||||
const [result] = await promiseAll([
|
||||
normalizedTaxLines.length
|
||||
? this.lineItemTaxLineService_.upsert(normalizedTaxLines, sharedContext)
|
||||
: [],
|
||||
this.lineItemTaxLineService_.softDelete(deleteConstraints, sharedContext),
|
||||
])
|
||||
|
||||
return await this.baseRepository_.serialize<CartTypes.LineItemTaxLineDTO[]>(
|
||||
result,
|
||||
{
|
||||
populate: true,
|
||||
}
|
||||
result
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1159,10 +1208,7 @@ export default class CartModuleService
|
||||
|
||||
const serialized =
|
||||
await this.baseRepository_.serialize<CartTypes.ShippingMethodTaxLineDTO>(
|
||||
addedTaxLines[0],
|
||||
{
|
||||
populate: true,
|
||||
}
|
||||
addedTaxLines[0]
|
||||
)
|
||||
|
||||
if (isObject(cartIdOrData)) {
|
||||
@@ -1181,53 +1227,49 @@ export default class CartModuleService
|
||||
)[],
|
||||
@MedusaContext() sharedContext: Context = {}
|
||||
): Promise<CartTypes.ShippingMethodTaxLineDTO[]> {
|
||||
const cart = await this.retrieveCart(
|
||||
cartId,
|
||||
{ select: ["id"], relations: ["shipping_methods.tax_lines"] },
|
||||
sharedContext
|
||||
)
|
||||
|
||||
const existingTaxLines = await this.listShippingMethodTaxLines(
|
||||
{ shipping_method: { cart_id: cart.id } },
|
||||
{ select: ["id"] },
|
||||
sharedContext
|
||||
)
|
||||
|
||||
const taxLinesSet = new Set(
|
||||
taxLines
|
||||
.map(
|
||||
(taxLine) => (taxLine as CartTypes.UpdateShippingMethodTaxLineDTO)?.id
|
||||
)
|
||||
.filter(Boolean)
|
||||
)
|
||||
|
||||
const toDelete: CartTypes.ShippingMethodTaxLineDTO[] = []
|
||||
|
||||
// From the existing tax lines, find the ones that are not passed in taxLines
|
||||
existingTaxLines.forEach((taxLine: CartTypes.ShippingMethodTaxLineDTO) => {
|
||||
if (!taxLinesSet.has(taxLine.id)) {
|
||||
toDelete.push(taxLine)
|
||||
}
|
||||
const normalizedTaxLines = (
|
||||
taxLines as CartTypes.UpdateShippingMethodTaxLineDTO[]
|
||||
).map((taxLine) => {
|
||||
taxLine.id = generateEntityId(taxLine.id, "casmtxl")
|
||||
return taxLine
|
||||
})
|
||||
|
||||
if (toDelete.length) {
|
||||
await this.shippingMethodTaxLineService_.softDelete(
|
||||
toDelete.map((taxLine) => taxLine!.id),
|
||||
sharedContext
|
||||
const taxLineIdsSet = new Set(
|
||||
normalizedTaxLines.map(
|
||||
(taxLine) => (taxLine as CartTypes.UpdateShippingMethodTaxLineDTO)?.id
|
||||
)
|
||||
)
|
||||
|
||||
const deleteConstraints: {
|
||||
id?: {
|
||||
$nin: string[]
|
||||
}
|
||||
shipping_method: { cart_id: string }
|
||||
} = {
|
||||
shipping_method: { cart_id: cartId },
|
||||
}
|
||||
|
||||
const result = taxLines.length
|
||||
? await this.shippingMethodTaxLineService_.upsert(
|
||||
if (taxLineIdsSet.size) {
|
||||
deleteConstraints.id = {
|
||||
$nin: Array.from(taxLineIdsSet),
|
||||
}
|
||||
}
|
||||
|
||||
const [result] = await promiseAll([
|
||||
taxLines.length
|
||||
? this.shippingMethodTaxLineService_.upsert(
|
||||
taxLines as UpdateShippingMethodTaxLineDTO[],
|
||||
sharedContext
|
||||
)
|
||||
: []
|
||||
: [],
|
||||
this.shippingMethodTaxLineService_.softDelete(
|
||||
deleteConstraints,
|
||||
sharedContext
|
||||
),
|
||||
])
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.ShippingMethodTaxLineDTO[]
|
||||
>(result, {
|
||||
populate: true,
|
||||
})
|
||||
>(result)
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/currency
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/currency",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa Currency module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -36,8 +36,8 @@
|
||||
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/test-utils": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@medusajs/test-utils": "2.6.1",
|
||||
"@mikro-orm/cli": "6.4.3",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
@@ -50,7 +50,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
"@mikro-orm/postgresql": "6.4.3",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/customer
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/customer",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa Customer module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -37,8 +37,8 @@
|
||||
"orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/test-utils": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@medusajs/test-utils": "2.6.1",
|
||||
"@mikro-orm/cli": "6.4.3",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
@@ -51,7 +51,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
"@mikro-orm/postgresql": "6.4.3",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/event-bus-local
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/event-bus-local",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Local Event Bus Module for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
@@ -23,7 +23,7 @@
|
||||
"author": "Medusa",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@swc/core": "^1.7.28",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"jest": "^29.7.0",
|
||||
@@ -39,6 +39,6 @@
|
||||
"ulid": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0"
|
||||
"@medusajs/framework": "2.6.1"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/event-bus-redis
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/event-bus-redis",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Redis Event Bus Module for Medusa",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
@@ -23,7 +23,7 @@
|
||||
"author": "Medusa",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@swc/core": "^1.7.28",
|
||||
"@swc/jest": "^0.2.36",
|
||||
"jest": "^29.7.0",
|
||||
@@ -40,7 +40,7 @@
|
||||
"ioredis": "^5.4.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"awilix": "^8.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/product
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@medusajs/file",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"description": "Medusa File module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -36,8 +36,8 @@
|
||||
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/test-utils": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"@medusajs/test-utils": "2.6.1",
|
||||
"@mikro-orm/cli": "6.4.3",
|
||||
"@mikro-orm/core": "6.4.3",
|
||||
"@mikro-orm/migrations": "6.4.3",
|
||||
@@ -50,7 +50,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.6.0",
|
||||
"@medusajs/framework": "2.6.1",
|
||||
"awilix": "^8.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# @medusajs/fulfillment
|
||||
|
||||
## 2.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
|
||||
|
||||
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
|
||||
- @medusajs/framework@2.6.1
|
||||
|
||||
## 2.6.0
|
||||
|
||||
## 2.5.1
|
||||
|
||||
Loaded 100 of 571 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user