Commit Graph

5251 Commits

Author SHA1 Message Date
Frane Polić
95e89a39f3 feat(core-flows, types): try payment cancelation if cart complete fails in the webhook (#11832)
* fix: try compensating if cart complete fails, reorder process paymnet workflow steps

* fix: condition

* fix: feedback

* feat: changes to the compensation step

* fix: build

* fix: remove payment id as arg

* fix: when input

* chore: remove captures realtion, changeset

* fix: return lates payment object from authorize payment
2025-03-28 14:49:54 +01:00
Kasper Fabricius Kristensen
3dba58785f fix(dashboard,medusa,types): allow searching for promotion rule options (#12028)
* fix: allow searching for promotion rule options

* fix: allow searching for promotion rule options

* add changeset

* cleanup
2025-03-28 14:45:05 +01:00
Kasper Fabricius Kristensen
6d8390a529 fix(dashboard): Allow empty subpaths for route extensions (#12030) 2025-03-28 14:42:51 +01:00
Harminder Virk
b1b3b48474 feat: Set pricing context hook (#11891) 2025-03-28 15:17:52 +05:30
Frane Polić
350b6b9a71 fix(dashboard): RMA allow shipping unset (#12021)
**What**
- allow unsetting shipping in RMA flows + bug cleanup around shipping flows in claims / exchanges
- additional fixes:
  - product type create form 
  - product type delete
  - delete confirmation messages
  - fix a few inventory strings + material field

---

CLOSES CMRC-945
CLOSES CMRC-953
CLOSES CMRC-967
CLOSES CMRC-963
CLOSES CMRC-954


Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-03-28 09:25:44 +00:00
Frane Polić
29f6c2a8dd fix(dashboard): return form pending diff (#12007)
**What**
- display est. difference in returns as for claims/exchanges
- display order pending difference instead of value computed on FE

---

CLOSES CMRC-949
2025-03-28 09:14:04 +00:00
Frane Polić
3145c5f20d fix(dashboard): trim some product create inputs to prevent creation error (#12004)
* fix: trim some inputs to prevent creation error

* chore: changeset
2025-03-28 08:59:44 +01:00
Frane Polić
be6a651e2f fix(dashboard): notification list scroll flickering (#11911)
* fix: flicekring of the notification list due to rerendering

* fix: revert page size

* fix: page size

* fix: reintroduce treshold

* fix: param

* fix: revert page size
2025-03-28 08:58:33 +01:00
Frane Polić
69bb775f28 fix(dashboard): refund form input (#11993)
**What**
- fix refund form input issues
2025-03-27 15:20:22 +00:00
Carlos R. L. Rodrigues
1895d8cc11 Merge branch 'develop' of https://github.com/medusajs/medusa into fix/wfe-context-ref (#12006) 2025-03-27 09:28:24 -03:00
Oli Juhl
230cb84fa4 fix(dashboard): Product export fields (#11999)
What
- Remove `fields` from query to export products

Why
- The product export route uses the `fields` in the export request if specified. The `fields` didn't used to be part of the request, but in #11532 we accidentally started using a narrow set of fields as a result of shaving down on the requested data elsewhere in the dashboard.
2025-03-27 11:38:43 +00:00
Riqwan Thamir
c870a7a1ba fix(utils,promotion): fix case where mutliple percentage promotions werent applied (#11992)
what:

- fix case where mutliple percentage promotions werent applied
2025-03-26 22:46:50 +00:00
Riqwan Thamir
1f8fab3636 feat(core-flows,types,order,cart): assign tax lines only to regular products (#11994)
what:

- assign tax lines only to regular products
2025-03-26 22:26:34 +00:00
Frane Polić
d0d2ea4f20 fix(order): caculate received total for pending difference (#11919)
**What**
- use the return received total to compute pending difference with return requested total

**Why**
- this would show incorrect outstanding amount when receiving a return and also, the outstanding amount after the return is received would be incorrect
2025-03-25 18:14:44 +00:00
Shahed Nasser
0cc306bf56 fix(js-sdk, types): fixes types and deprecate duplicate methods (#11975) 2025-03-25 16:37:30 +01:00
Carlos R. L. Rodrigues
01089d5bc8 chore(core-flows): price list skip when no data (#11977) 2025-03-25 10:55:30 -03:00
Shahed Nasser
768ea91e1b chore(js-sdk,types): add missing examples for JS SDK methods (#11934)
* chore(js-sdk,types): add TSDocs for calculate method

* added tsdocs for promotions

* finished adding examples

* fixes

* remove unused import
2025-03-25 14:55:54 +02:00
Kasper Fabricius Kristensen
d53af655f0 fix(dashboard): Reduce size of Notifications Trigger (#11955) 2025-03-24 19:03:44 +01:00
Shahed Nasser
c6f2f444ed fix(js-sdk): fix the return type of the promotion.listRules method (#11937) 2025-03-24 07:35:15 +01:00
Frane Polić
de8c034d1b feat(core-flows, types): calculated shipping in RMA flows (#11533)
* wip: calculated SO pricing in RMA flows

* fix: types

* chore: small refactor

* feat: caluclated shipping in return flow

* fix: module integrations

* fix: array containing

* feat: refresh shipping on update item quantity

* rm: log

* rm: log2

* feat: update interface, remove flag

* fix: revert change on OE for now

* fix: import

* feat: refactor flwos, cleanup cacluation cotext data model, wip exchanges

* feat: refreshing inbound/outbound shipping on items change

* feat: refresh exchange shipping on return item add, test

* feat: refresh shipping on exchange/return item remove

* fix: check optional

* feat: test recalculation on quantity update

* feat: calculated shipping on claims

* fix: comment

* wip: address comments

* fix: more remote query, fix build

* refactor: claim refresh workflow

* fix: remove throw option

* fix: deconstruct param

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-03-24 07:07:47 +01:00
Shahed Nasser
053326950d fix(js-sdk): fix the API route used in fulfillment.cancel method (#11936) 2025-03-21 15:08:44 +00:00
Harminder Virk
cab6f3a8ad feat: add support for accessing step results via context (#11907)
Fixes: FRMW-2934

This PR adds support for accessing the results of a hook using the `hook.getResult` method.
2025-03-21 10:15:38 +00:00
Stevche Radevski
c4f75ecbb2 feat: Add support for generating a cloud-ready config out of the box (#11850) 2025-03-21 09:21:38 +01:00
Kasper Fabricius Kristensen
c40fb01d92 fix(ui): Disable select cells if the row cannot be selected (#11442) 2025-03-20 11:52:07 +01:00
Frane Polić
8385a5e34d feat(core-flows): revisit fulfillment flow reservations and support inventory kit (#11790)
* feat: fulfillment flow with reservations and inventory kit

* fix: account for custom line items

* chore: cleanup, changeset

* fix: revert action check

* fix: deduplicate, test item qunatities, compute line item quantity from fulfillment items

* fix:

* fix: improve types

* fix: optimize fetched fileds in cancel fulfillment workflow

* fix: add a test case

* chore: update type
2025-03-19 13:15:24 +01:00
Arūnas Bandzaitis
e2ee4a1d5f feat(dashboard): add support for Lithuanian language (#11903) 2025-03-19 10:32:30 +01:00
Arūnas Bandzaitis
a86b7858b5 fix(dashboard): EN language mistypes, missing words (#11904) 2025-03-19 10:31:56 +01:00
Radek Napora
d0ca0f5ce0 fix(dashboard): repair scrollbar behavior in variant inventory form (#11710) 2025-03-18 12:40:36 +01:00
Harminder Virk
ff3885500c fix: hooks auto-generated types to have precise input options (#11886) 2025-03-18 15:41:01 +05:30
Harminder Virk
aa6d5aa3cf fix: register locking provider with its unique id (#11874) 2025-03-18 15:04:47 +05:30
Frane Polić
63330668ed fix(dashboard): location injection zones (#11845)
FIXES SUP-1159
2025-03-18 08:33:07 +00:00
Shahed Nasser
0099c1e2e9 chore: added / improved tsdocs to cache, event, file, and notification modules (#11879)
* chore: added / improved tsdocs to cache, event, file, and notification modules

* small fixes
2025-03-18 09:07:32 +02:00
Riqwan Thamir
c3440e5e38 feat(medusa,types): add enabled plugins route (#11876) 2025-03-17 20:11:46 +01:00
Riqwan Thamir
9dd62d93bd feat(core-flows,types,utils): make payment optional when cart balance is 0 (#11872)
what:

- make payment optional when cart balance is 0
2025-03-17 19:03:22 +00:00
Riqwan Thamir
5ab15a2988 feat(dashboard,js-sdk,admin-shared): add customer addresses + layout change (#11871)
what:

- changes customer layout from 1 layout to 2
- adds ability to create and delete customer addresses
- adds 2 customer widget locations
- adds is_giftcard=false by default to products list

<img width="1663" alt="Screenshot 2025-03-08 at 21 34 02" src="https://github.com/user-attachments/assets/e66f05da-718c-4c25-81ce-67ba0a814ca3" />
2025-03-17 16:16:27 +00:00
Kasper Fabricius Kristensen
cc4c5c86e2 chore(ui-preset,icons,dashboard) (#11734)
* update icons

* update ui-preset

* chore(ui-preset,icons): Sync with Figma 5/3/2025

* chore(ui-preset,icons): Sync with Figma
2025-03-17 16:51:57 +01:00
Riqwan Thamir
cb6249320e fix(types,order,medusa): Create credit lines + hooks (#11569)
what:

- api/workflows to create credit lines
- hooks to enable extending credit lines
2025-03-17 15:20:59 +00:00
Carlos R. L. Rodrigues
0625f76cd4 chore(workflow-engine): export cancel method (#11844)
What:
  * Workflow engine exports the method `cancel` to revert a workflow.
2025-03-17 12:59:09 +00:00
Frane Polić
3db146c56e fix(dashboard): display inventory item sku (#11856)
CLOSES SUP-1171
2025-03-17 11:48:44 +00:00
Harminder Virk
cae47d9e49 feat: add check for uniqueness when creating links with isList=false (#11767) 2025-03-17 13:23:18 +05:30
Adrien de Peretti
c73504e0ed fix(workflow-engine-inmemory): Fail trap for integration tests (#11839)
**What**
Jest is patching the event emitter meaning that sometimes it can lead to flacky behaviors and block the test execution if the done callback is never reached. To prevent that from happening, the fail trap will call the done callback after a given time and warn that the test could not be concluded because of jest blocking it
2025-03-15 12:42:38 +00:00
OttavioCas
5e892e2f05 add no_notification to shipment created event (#11836) 2025-03-14 13:05:14 -03:00
Riqwan Thamir
67b308c8eb fix(promotion): percentage value is accounted for in buyget promotions (#11799)
what:

- allows percentage value to be considered for buy get percentage

FIXES https://github.com/medusajs/medusa/issues/11259
2025-03-13 17:09:46 +00:00
Kasper Fabricius Kristensen
3063d6e601 fix(dashboard): Include thumbnail in default product query (#11825)
RESOLVES CMRC-984
2025-03-13 16:26:39 +00:00
Adrien de Peretti
fc652ea51e fix(workflow-engine-*): scheduled jobs interval (#11800)
**What**
Currently only cron pattern are supported by scheduled jobs, this can lead to issue. for example you set the pattern to execute every hours at minute 0 and second 0 (as it is expected to execute at exactly this constraint) but due to the moment it gets executed we our out of the second 0 then the job wont get executed until the next scheduled cron table execution.

With this pr we introduce the `interval` configuration which allows you the specify a delay between execution in ms (e.g every minute -> 60 * 1000 ms) which ensure that once a job is executed another one is scheduled for a minute later.

**Usage**
```ts
// jobs/job-1.ts
const thirtySeconds = 30 * 1000

export const config = {
  name: "job-1",
  schedule: {
    interval: thirtySeconds
  },
}
```
2025-03-13 15:05:13 +00:00
Saryazdi-Saman
e05491c24f fix: preserve payment sessions during certain Stripe errors for webhook reconciliation (#11798)
* fix: preserve payment sessions during certain Stripe errors for webhook reconciliation

fix: add retry mechanism for errors that might be fixed after retry

fix: authorizePaymentSession method will update payment_session.status regardless regardless of wether or not the authorization is successful

* Refactor: improve handling structure and syntax

-Move HandledErrorType definition to the top of stripe-base

- Use timers/promises for setTimeout

- Removed data in HandledErrorType when retry is true

* refactor: improve error handling flow and logic

- Simplify return statement in initiatePayment to handle null cases

- Remove redundant if-check in handleStripeError and rely on switch

- Reorder conditional checks in executeWithRetry for clearer flow

- Update executeWithRetry to check for retry=false condition first

* clean up

* fix: improve payment error handling and traceability

- Return structured error state for StripeAPIError instead of null

- Throw error when retries are exhausted and no payment intent exists

- Update type definitions to support error state tracking

* fix formatting and naming
2025-03-13 14:46:31 +01:00
Carlos R. L. Rodrigues
5cf0bf4d93 chore: admin product list transform filter (#11821) 2025-03-12 13:21:09 -03:00
Stevche Radevski
e0109540fa feat: Change customer to account_holder to be one-to-many (#11803) 2025-03-12 16:05:38 +01:00
Carlos R. L. Rodrigues
6053ec3976 chore(workflow-engine-redis): remove repeatable jobs from old queue (#11822)
What:
  * Old  deployments have repeatable jobs registered in a wrong queue. When the `server` instance picks that job, the workflow doesn't exist, it calls to remove the job, which then removes the job from the new queue.
  * This PR cleans up any repeatable job from the queue that is exclusive to handle workflows.
2025-03-12 14:54:10 +00:00
Shahed Nasser
76a0d8e1d8 chore(types): small fixes to locking TSDocs (#11823)
* chore(types): small fixes to locking TSDocs

* add missing return
2025-03-12 16:31:07 +02:00