Commit Graph
100 Commits
Author SHA1 Message Date
Oli Juhl 1c987540aa fix(workflow-engine-redis): Ensure PK is set without errors (#12775)
* fix(workflow-engine-redis): Align naming of migration

* change approach
2025-06-19 20:19:01 +02:00
Oli Juhl b79215dd5c fix(utils): Typecasting non-text fields in FTS (#12729) 2025-06-13 13:18:50 +02:00
Oli Juhl 2c49e8b733 chore: Add missing minor bump changeset (#12455) 2025-05-13 12:51:46 +02:00
Oli Juhl 92af52d133 fix(tax): Make system provider registration backward compatible (#12441)
* fix(tax): Make provider registration backward compatible

* add tests
2025-05-12 17:06:43 +02:00
Oli Juhl 469ecef3c5 chore: Minor restructure of cart completion (#12353)
* chore: Minor revamp of cart completion

* wip

* wip

* temp. remove import

* continue on error

* chore: Use workflow

* fix import

* Create beige-actors-tie.md

* fix import
2025-05-08 13:37:21 +02:00
Oli Juhl aba4cba373 fix(medusa): Support additional data on admin/collections (#12345)
* fix(medusa): Support additional data on admin/collections

* Create five-experts-wink.md

* add to validators
2025-05-06 14:00:18 +02:00
Oli Juhl 77c3023200 fix(product): Return updated collections (#12354)
Collection updates without a `products` payload were not returned from the service layer due to an incorrect early return

Fixes SUP-1488
2025-05-05 14:41:45 +00:00
Oli Juhl b463c7980a chore: Update teams.yml (#12355)
**What**
- Add Pedro to team
2025-05-05 07:16:48 +00:00
Oli JuhlandRiqwan Thamir fe74e77a7a chore: Pass more data to fulfillment provider (#12186)
* fix(core-flows): Add more fulfillment data

* fix(core-flows): Add more fulfillment data

* add more fields

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2025-04-18 10:24:46 +02:00
Oli Juhl 40b08f7325 chore: Patch changesets to avoid major bumps (#12151) 2025-04-11 10:18:31 +02:00
Oli Juhl 79cfc1a69e fix(utils): Enable Redis locking by default in Cloud (#12017)
* fix(utils): Enable redis locking by default

* fix: tests

* Create popular-rules-shake.md
2025-03-28 16:23:02 +01:00
Oli Juhl acdcb11947 chore: Remove integration-tests from changeset 2025-03-28 15:54:29 +01: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
Oli Juhl 3b470f4142 chore: remove ranges on medusa packages (#11738) 2025-03-06 14:17:05 +01:00
Oli Juhl 54a6ef91ac chore: Move token from params to headers (#11281)
* chore: Move token from params to body

* chore: Add type

* wip

* chore: clean up

* clean ip
2025-02-26 17:41:16 +01:00
Oli Juhl 215553792b chore: Force select-in strategy by passing pagination through (#11556)
* chore: Force select-in by passing pagination through

* chore: Force select-in by passing pagination through
2025-02-23 14:42:19 +01:00
Oli Juhl dbd06fd41d fix(utils): Handle 0 correctly in build query (#11525)
**What**

Remove truthy/falsy check for `take` and `skip`

**Why**

To ensure `{ take: 0, skip: 0 }` is not converted to `{ take: undefined, skip: undefined }`
2025-02-19 19:04:48 +00:00
Oli Juhl db03738b5f chore: Revert version range to ^ (#11390) 2025-02-11 11:35:25 +01:00
Oli Juhl ae3292c98b chore(js-sdk): Remove create user method from SDK (#11186)
Endpoint doesn't exist. Admin users can only be created through invites at the HTTP level.
2025-01-28 12:11:58 +00:00
Oli Juhl 961ad4723e fix(dashboard): Matching product profile with shipping profile (#11183) 2025-01-27 17:13:07 +00:00
Oli Juhl 65bf6e4fce chore: Use local CLI version in CI (#10982)
* chore: Use local CLI version in CI

* Update test-cli-with-database.yml
2025-01-15 12:21:19 -05:00
Oli Juhl 9133957a94 fix(notification): Only use enabled providers for notis (#10659) 2024-12-18 13:59:12 +01:00
Oli Juhl c9b8db04c1 feat: Custom line items (#10408)
* feat: Custom line items

* fix tests

* fix migration

* Allow custom items in update line item workflow

* throw if line item doesn't have a price

* minor things

* wip

* fix flows

* fix test

* add default

* add to type
2024-12-18 12:53:57 +01:00
Oli Juhl f3eca7734e fix(medusa): Missing metadata field on order (#10651) 2024-12-18 10:09:35 +01:00
Oli Juhl e5e5a34108 fix(core-flows): Refresh cart when items are deleted (#10513) 2024-12-09 19:21:32 +01:00
Oli Juhl ff4663713a fix(core-flows): Listing return shipping options (#10432) 2024-12-04 17:21:07 +01:00
Oli Juhl eacd691951 fix: Ensure tax lines are generated for all items and shipping methods in cart (#10372)
* fix: Generate tax lines for all items in cart

* fix: Correct test
2024-12-01 14:50:38 +01:00
Oli Juhl 67e2e718e9 chore: Trigger staging update on new release (#10259) 2024-11-26 09:13:33 +01:00
Oli JuhlandCarlos R. L. Rodrigues cb2b06fab9 fix: Inventory module schema (#10262)
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-11-26 09:02:37 +01:00
Oli Juhl 29ce10b09e fix(product): Update images before adding not null constraint (#10248) 2024-11-25 08:39:43 +00:00
Oli Juhl 1efe4e9e33 fix: Update js-sdk with token (#10211) 2024-11-22 09:32:48 +01:00
Oli Juhl 8091c5f5bc fix: Remove undefined from events in update (#10170) 2024-11-20 09:43:51 +01:00
Oli Juhl 094971775b chore: Add actor type check + more tests (#10005) 2024-11-10 21:38:19 +00:00
Oli Juhl 441004cc21 chore: Update auth flow (#9959) 2024-11-06 21:21:45 +01:00
Oli Juhl 505768dd9f fix: Product type tax overrides (#9951)
* fix: Make product type tax override work

* fix: Make product type tax override work
2024-11-06 20:33:40 +01:00
Oli Juhl c1c85ef952 fix(core-flows,medusa): Include region_id in shipping option retrieval (#9929)
### What
Include `region_id` when retrieving shipping options for a cart

### Why
Otherwise, region-specific prices will never show in the Store API

Closes CMRC-655 https://github.com/medusajs/medusa/issues/9906
2024-11-06 15:59:47 +00:00
Oli Juhl 674c86eaa0 chore: Use PR author name (#9940) 2024-11-05 19:15:53 +01:00
Oli Juhl 275a835726 chore: Sync PR and Discussions to Linear (#9938)
* chore: Sync PRs and Discussions to Linear

* chore: Sync PRs and Discussions to Linear
2024-11-05 14:56:10 +01:00
Oli Juhl b9c787ac2b chore: Add fixed packages in changeset (#9752)
* chore: Add fixed packages in changeset

* chore: add dev-cli to changeset packages

* chore: Exclude @medusajs/ui
2024-10-25 11:01:17 +02:00
Oli Juhl c3418a2b93 chore: Prepare versions + changeset (#9707)
* chore: Prepare version + changeset

* chore: Bump dependencies

* chore: Update lock-file
2024-10-22 20:31:33 +02:00
Oli Juhl f1b2d22db7 chore: Remove v2 branches from starters (#9721)
* chore: Remove v2 branches from starters

* revert imports
2024-10-22 20:00:13 +02:00
Oli Juhl 604c182a20 fix(core-flows): Actually emit event in update products workflow (#9682) 2024-10-21 09:55:50 +02:00
Oli Juhl 0be50059f2 fix: Add free text search on reservations (#9621) 2024-10-17 10:21:24 +02:00
Oli Juhl df78f6e871 chore: Prepare changeset for 2.0 release (#9631) 2024-10-17 09:37:37 +02:00
Oli Juhl 43324b9294 fix: Add shipping method data validation (#9542)
* fix: Add shipping method data validation

* fix: return type
2024-10-14 12:55:01 +02:00
Oli Juhl 853187410e fix(product): Always add q if defined (#9505) 2024-10-09 11:52:02 +02:00
Oli Juhl 67e08dc989 fix(payment): Capture payment (#9469)
What
- Add missing `captured_at` field to payment retrieval
- Properly delete Medusa captures in case 3rd party capture call fails
2024-10-04 15:15:10 +00:00
Oli Juhl f7472a6fa6 fix: Idempotent cart completion (#9231)
What
- Store result of cart-completion workflow for three days by default
  - This enables the built-in idempotency mechanism to kick-in, provided the same transaction ID is used on workflow executions
- Return order from cart-completion workflow if the cart has already been completed
  - In case transaction ID is not used on workflow executions, we still only want to complete a cart once
2024-10-04 12:01:09 +00:00
Oli Juhl 6055f4c9cf fix: If country on cart has no tax region, clear tax lines (#9447)
**What**

If the country on the shipping address changes to a country without an associated tax region, we clear the tax lines on shipping methods and line items.
2024-10-04 11:55:53 +00:00
Oli Juhl a114f90358 fix: Handle region updates on cart (1/n) (#9369)
**What**

On cart creation:
- If region only has one country -> create cart with country code

On cart updates:
- If shipping address country code is provided in input ->
  - If cart region doesn't include that country -> throw
  - If cart includes the country -> update shipping address
- If region is provided in input and is different from the one currently on the cart -> 
  - If there is a shipping address on the cart -> clear the address
    - If the region only has one country -> set country code of address
  - If there is not a shipping address on the cart ->
    - If the region only has one country -> set country code of address


Closes CC-545
2024-10-04 11:33:36 +00:00
Oli Juhl 732f64177d fix: Validate identifier payload for reset password (#9302)
Closes CC-526
2024-10-01 13:30:23 +00:00
Oli Juhl 8851ae7b51 fix: Update tax lines on cart when region changes (#9367)
**What**
- Removes broken cart retrieval step `retrieveWithCartLinks` in favor of `useRemoteQueryStep` in `updateTaxLinesWorkflows`

**Why**
- Filters variables in the step were passed with an incorrect shape
  - I removed the step, since it's only used once and the behavior is identical to the generic remote query step

**Note**
- Because the filters were passed incorrectly, the, now-removed, step has always returned the first cart in the database. As a result all tax calculations so far have been based on whatever the shape of that cart has. It basically ignores all input to this workflow
2024-09-30 11:55:54 +00:00
Oli Juhl 1b4372ae71 fix: Tax region + rates clean up (#9279)
What
- Require `code` on Tax Rates
- Update dashboard to account for non-nullable code on Tax Rates

- Include `automatic_taxes` in API Route response

Closes CC-524 CC-525
2024-09-29 10:25:33 +00:00
Oli Juhl 9a0ae1484c chore: Add missing changeset for index (#9288) 2024-09-24 20:35:36 +02:00
Oli Juhl cbf52ee4d7 chore: Add stale bot (#9184) 2024-09-18 19:17:12 +02:00
Oli Juhl 4bf42f7889 fix: Update auth app_metadata when deleting users + customers (#9041)
* wip

* more work

* working on stuff

* more

* fix test

* remove incorrect test

* fix test

* fix: Only allow deletion of yourself

* remove redundant tests
2024-09-10 19:58:16 +02:00
Oli Juhl e27056b3c3 feat: Reset password (#8962)
* wip

* more work

* wip

* more work

* wrap up first iteration

* work on new approach

* more work

* move middleware func to route

* cleanup

* more work

* wrap up

* more work

* fix workflow

* minor tweaks

* finalize

* Use JWT secret instead
2024-09-06 12:28:29 +02:00
Oli Juhl f063a69632 chore(core-flows): Add invite resent event (#8986) 2024-09-04 19:53:29 +02:00
Oli Juhl cbb0a6adc7 fix: Customer registration (#8896)
* fix: Customer registration

* update test

* one mroe test

* chore: add transformation
2024-09-01 11:41:39 +02:00
Oli Juhl 4350fe5368 chore: Remove @medusajs/medusa usage + local types from dashboard (#8883)
Closes CC-403
2024-08-30 15:37:44 +00:00
Oli Juhl e360a495b7 chore: Replace Error with FetchError (#8885) 2024-08-30 11:08:36 +02:00
Oli Juhl e0cb5ff0aa fix(dashboard): Fetch tags + types in product forms (#8887) 2024-08-30 08:35:46 +02:00
Oli Juhl 9cf1a5d709 chore: Remove last trace of client in dashboard (#8873) 2024-08-29 17:48:01 +02:00
Oli Juhl 00bd9271e3 chore: Workflow execution JS-SDK (#8851) 2024-08-29 11:22:43 +00:00
Oli Juhl e652d03b98 chore: Replace reservation customer group client with JS-SDK + clean up (#8857) 2024-08-29 11:51:23 +02:00
Oli Juhl 37b7592fba chore: Remove unused clients in admin + clean up js-sdk (#8839)
* feat(js-sdk): Add API key

* chore: Remove unused clients in admin + clean up js-sdk

* fix sales channel hooks
2024-08-28 15:43:55 +02:00
Oli Juhl c2e7940f61 fix: Validate boolean query params (#8834) 2024-08-28 13:14:15 +02:00
Oli Juhl dbe931ab00 feat(js-sdk): Add API key (#8838)
* feat(js-sdk): Add API key

* address PR comments

* Allow params to create + update
2024-08-28 13:07:06 +02:00
Oli Juhl c11ef01c15 feat: Separate registration from authentication in auth domain (#8683)
* wip

* feat: Introduce register

* fix: user command

* fix: Invite HTTP tests

* fix: Auth tests

* fix: Invite modules tests
2024-08-27 13:44:52 +02:00
Oli JuhlandCarlos R. L. Rodrigues 2bacf86d3c chore: Remove prepublishOnly script (#8699)
* wip

* wip

* verbose logging

* remove prepublish scripts

* chore: add back prepublish scripts

* wip

* remove prepublishOnly script

* chore: Clean up rest of build scripts

* add back build script

* feedback

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-08-27 10:31:38 +02:00
Oli Juhl 2f62b47bff fix(pricing): Calculate price sets with amount 0 (#8622) 2024-08-16 12:49:11 +02:00
Oli Juhl 9de9b3825f fix(payment): Partial refunds (#8603)
* fix(payment): Partial payment provider refunds

* add tests
2024-08-15 19:01:22 +02:00
Oli Juhl bda3f68057 fix(notification): Properly disable notification providers (#8607) 2024-08-15 14:59:14 +02:00
Oli Juhl 90120d6463 fix(dashboard): Delete product media (#8506) 2024-08-08 17:00:46 +02:00
Oli Juhl c21407afbe fix(event-bus-redis): Consume job correct in worker (#8444)
* fix(event-bus-redis): Consume job correct in worker

* fix: Unit tests

* fix event passed to subscriber

* typo
2024-08-08 14:53:42 +02:00
Oli Juhl 78eb457487 fix(core-flows): Allow return requests with no shipping (#8472)
Closes CC-265
2024-08-07 07:48:14 +00:00
Oli Juhl 1e0149ad08 fix(core-flows): Unsetting reason on return items (#8470) 2024-08-07 09:33:43 +02:00
Oli Juhl afa740606f chore: Update labeler to add type labels automatically (#8410) 2024-08-02 13:55:32 +02:00
Oli Juhl dbd0b18726 feat: Add requested_at + open status to return (#8391)
* feat: Add requested_at + open status to return

* Update return in confirm claim workflow

* Revert snapshot

* feat: Change OrderChangeType

* fix test
2024-08-01 16:20:45 +02:00
Oli Juhl 4017f91352 chore: Publish framework package (#8322) 2024-07-29 11:22:02 +02:00
Oli Juhl feabe0e6c0 feat: update return request (#8302) 2024-07-26 19:41:21 +02:00
Oli Juhl 63ead0a2ae chore: Add @medusajs/framework to changeset (#8256) 2024-07-24 10:12:34 +02:00
Oli Juhl 4024935e91 feat(medusa): Order preview endpoint (#8144)
* feat: Add order preview endpoint

* remove log

* add test

* add note
2024-07-16 12:42:02 +01:00
Oli Juhl b7e6b1461b feat: Returns order previews (#8135)
* work on order previews

* fix create return shipping flow

* fix http tests

* fix tests
2024-07-16 11:07:04 +01:00
Oli JuhlandCarlos R. L. Rodrigues ffd4b195ee feat: Add exchange return shipping (#8108)
* wip

* finalize tests

* feat: Add exchange return shipping

* add shipping to preview

* test input

* move utils and ignore already inserted shipping method

* use custom price

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
2024-07-15 22:04:20 +02:00
Oli Juhl 00c7900337 feat: Admin Returns API (#8117)
* feat: Add request item + add shipping APIs

* wip

* finalize workflow

* move steps

* add returns to js-sdk

* few chores

* fix test

* fix another test :)
2024-07-15 15:57:06 +02:00
Oli Juhl 7e82f981f9 feat: Add return shipping method workflow (#8106) 2024-07-13 13:09:07 +02:00
Oli Juhl 256912f392 fix(tax): Add indexes to enforce unique constraint on tax region (#8067) 2024-07-10 20:09:19 +02:00
Oli Juhl fa6cd84049 chore: Migrate region module to use DML (#7837) 2024-06-29 13:14:52 +00:00
Oli Juhl b1df20b0dc fix(inventory): Entity Formulas + softDelete and restore (#7851) 2024-06-26 20:51:19 +02:00
Oli Juhl b5f248f154 fix(region): Soft deleting region unsets region on countries (#7786)
**What**

Unset `region_id` on countries when soft deleting the associated region. Otherwise, countries cannot be added to new or other regions

Alternatively, we hard delete the region, which will trigger the DB level cascade

In both cases, we cannot easily restore the region countries.
2024-06-26 16:44:16 +00:00
Oli Juhl 25210369d9 fix(utils): Uppercase event action name (#7822)
Currently, the keys of the events contain a lowercased action, e.g. `INVENTORY_ITEM_created`, which is breaking our usage across multiple modules
2024-06-24 17:43:49 +00:00
Oli Juhl 305e1d66ca fix(medusa): Load subscribers and scheduled jobs in worker mode (#7769) 2024-06-18 19:15:55 +02:00
Oli Juhl f138339cbc fix: Sort orders by created_at desc (#7706) 2024-06-13 21:31:59 +02:00
Oli Juhl 6ee0a2c1b5 feat: Variant inventory quantity in GET requests (#7701)
* feat: Variant inventory quantity in GET requests

* clean up

* fix link name
2024-06-13 13:41:54 +02:00
Oli Juhl 73ca358606 feat: Introduce order.placed event (#7682) 2024-06-12 12:05:13 +02:00
Oli Juhl 3f661c917b feat: Fix subscribers loading + add order <> cart link (#7617) 2024-06-09 12:31:28 +02:00
Oli Juhl f0e78d062e feat: Add tax region + rates to SDK and types (#7635)
* feat: Add tax region + rates to SDK and types

* replace client with sdk in loaders

* Address PR feedback
2024-06-06 18:31:39 +02:00
Oli Juhl 20cd6a7b51 chore: Split up admin domain in js-sdk (#7612) 2024-06-05 09:34:18 +02:00
Oli Juhl dc087bf310 feat: Move shipping option + profile test and more (#7609) 2024-06-05 08:36:41 +02:00