Commit Graph
100 Commits
Author SHA1 Message Date
Oli Juhl 4e04214612 chore: Move product category integration tests (#7569)
* chore: Move category integration tests

* remove module service
2024-06-02 14:03:11 +02:00
Oli Juhl dbb23d20be chore: Remove currency + country logs (#7508) 2024-05-28 16:42:32 +02:00
Oli Juhl e020b49493 chore: Add missing types deps (#7504) 2024-05-28 15:20:29 +02:00
Oli Juhl c9de1d28a4 feat: Assign store default sales channel in cart creation (#7495) 2024-05-28 12:12:01 +02:00
Oli JuhlandCarlos R. L. Rodrigues ad21bd30b1 fix: errors thrown in transformer (#7480)
* chore: wup

* throw on error

* add back test

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
2024-05-28 08:44:33 +02:00
Oli Juhl ebc4215f16 fix: Change num_code column from int to varchar (#7463) 2024-05-27 10:28:07 +02:00
Oli Juhl 3b93bc9f55 chore: Remove babel package from changeset (#7462) 2024-05-26 21:17:56 +02:00
Oli Juhl 05077bab32 feat: Add copy invite action (#7413)
https://github.com/medusajs/medusa/assets/59018053/2a2d0d39-e020-4146-8679-cbc99d75c98e
2024-05-23 10:58:59 +00:00
Oli Juhl b0209e1114 fix: Navigate to orders on signin (#7415) 2024-05-23 10:11:25 +02:00
Oli Juhl 9a10adfd91 fix: Remove log for read only links (#7410) 2024-05-22 22:36:23 +02:00
Oli Juhl 4ee47cf9b1 fix: Accept invite in admin (#7393)
* fix: Accept invite in admin

* fix: Accept invite in admin

* minor fix
2024-05-22 21:40:38 +02:00
Oli Juhl c198e2329c chore: Change default log level (#7402) 2024-05-22 15:16:45 +02:00
Oli Juhl c9bffdfecb feat: expose backend url in admin options (#7370) 2024-05-20 11:24:15 +02:00
Oli Juhl c0813a3547 fix: undefined BACKEND_URL in client (#7367) 2024-05-19 13:51:36 +02:00
Oli Juhl bf4724b8e6 feat: Destroy session + introduce http config (#7336) 2024-05-19 12:40:28 +02:00
Oli Juhl 31648b12ca fix: Retrieve region in loader (#7351) 2024-05-17 09:35:30 +02:00
Oli JuhlandSebastian Rindom 2e42e053d4 chore: Publish preview release + deploy staging every 3 hours (#7341)
* wip

* Wrap up

* Update .github/workflows/trigger-staging-deployment.yml

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>

* enable schedule

---------

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2024-05-16 12:36:30 +02:00
Oli Juhl 774696845c chore: Update perfect-fishes-listen.md (#7339) 2024-05-15 16:24:15 +02:00
Oli Juhl 5b26f5f2cf feat: Add publishable key scopes middleware (#7301)
**What**

Add pub key + sales channel middlewares to the store carts API
- Assign sales channel associated with pub key, if sales channel is not passed in request
  - Throw if pub key has multiple associated sales channels
- Throw if sales channel ID in payload is not associated with publishable API key in header
2024-05-13 16:17:52 +00:00
Oli Juhl 948458a43d chore: Re-introduce CLI test (#7268) 2024-05-08 11:11:06 +02:00
Oli Juhl 8b61dccd0f fix(dashboard,medusa): Minor clean-up of admin v2 (#7257) 2024-05-07 09:39:42 +02:00
Oli Juhl aff1eac91c fix(dashboard): use-backend-url-from-env in new client (#7256) 2024-05-06 18:35:18 +02:00
Oli Juhl 309c04afe8 chore: Remove remaining V1 plugins (#7255) 2024-05-06 17:31:24 +02:00
Oli Juhl 16528c57b0 chore: Introduce release notes formatting + preview release action (#7247)
### What
- Add changelog formatting file to automate pull request categorization in release notes*
- Add action to trigger preview releases
- Remove unused staging deployment action

**Add changelog formatting file to automate pull request categorization in release notes**

In order for this work, we need to be more strict about our labels usage. More specifically, we need to add one of the four different labels noted in the `release.yml` file. The labels should be self-explanatory. If your PR introduces both features and bugs, you should choose the label based on importance of the changes.
2024-05-06 12:59:37 +00:00
Oli JuhlandCarlos R. L. Rodrigues cf9605fe6f feat(order): Add display_id to order table (#7242)
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-05-05 19:43:13 +02:00
Oli Juhl 2f7b53488d fix: Accept filters in softDelete + fulfillment location clean-up (#7198) 2024-05-03 16:32:07 +00:00
Oli Juhl 1366e2efad fix: Retrieve ancestors and/or descendants on product categories (#7226) 2024-05-03 18:09:04 +02:00
Oli Juhl c41e90fa36 chore: Remove Admin v1 (#7214)
* chore: Remove v1 admin

* update eslint
2024-05-03 10:56:38 +02:00
Oli Juhl e78362c000 chore: Remove legacy MWH modules (#7213)
* chore: Remove legacy MWH modules

* chore: Add stock-location deps
2024-05-02 20:07:42 +02:00
Oli Juhl b8a0a459a8 chore: Update CI to trigger for v1.x (#7207) 2024-05-02 15:11:26 +02:00
Oli Juhl f430ed7040 chore: Remove deprecated plugins (#7199) 2024-05-02 09:55:50 +02:00
Oli Juhl ba71903e12 chore: Introduce bug report for 2.0 (#7194) 2024-05-01 14:14:37 +02:00
Oli Juhl 497c735ea6 chore: Update contibuting with new branching strategy (#7193) 2024-05-01 13:50:02 +02:00
Oli Juhl bb37e139aa chore: change minor bumps to patch (#7177) 2024-04-30 19:05:04 +02:00
Oli JuhlandStevche Radevski 10e120062b feat: V2 batch update products in categories (#7125)
* wip

* wip

* fix: batch category update

* update tet

* fix type

---------

Co-authored-by: Stevche Radevski <sradevski@live.com>
2024-04-23 17:17:25 +02:00
Oli Juhl b61dcb84c9 chore: Update CODEOWNERS (#7119)
Allow @medusajs/engineering to approve lock-file + package.json changes
2024-04-23 11:37:15 +02:00
0eb68541b8 fix: Resume workflow execution (#7103)
Supercedes #7051 – if OK, I'll move the base of this PR to `develop` and we can run reviews only of this one.

**What**
- Gracefully close BullMQ Worker in Redis Event Bus and Redis Workflow Engine (by @edast, @sradevski)
- Register workflows before MedusaApp is loaded*
- Introduce `onApplicationPrepareShutdown`**
- Refactor plugin resolving for reusability purposes

*We now register workflows before modules are loaded to ensure modules can run workflows as part of bootstrapping. E.g. the Redis Workflow Engine resumes workflows when it starts, which has until this change failed, because the workflows were not registered yet.

**We introduce a new hook to prepare resources for an application shutdown. E.g. closing the BullMQ worker as a preparatory step to closing the BullMQ queue. The worker will continue to process jobs while the queue is still open to receive new jobs (without processing them). 

Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com>
Co-authored-by: Darius <618221+edast@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-04-22 12:32:50 +00:00
Oli Juhl 67a21c3e45 feat: Update product category (#7092)
* feat: Update product category

* Disable V2 FF in product category tes

* clean up
2024-04-22 12:30:27 +02:00
Oli Juhl bc081a7777 feat: Create product category flow (#7034)
* feat: Create product category

* address PR comments
2024-04-15 17:11:42 +02:00
Oli Juhl 3882cac622 feat: Admin V2 customer group (#7000) 2024-04-09 12:32:27 +02:00
Oli Juhl dbddfc12ed feat: Admin Shipping Profiles API (#7019) 2024-04-09 11:03:37 +02:00
Oli Juhl c03216efbf fix: Delete service zone (#7017) 2024-04-08 20:24:59 +02:00
Oli Juhl 6cc9a5e469 feat: Categories retrieve + list API (#7009) 2024-04-08 19:26:34 +02:00
Oli Juhl 4f88743591 feat: Admin V2 Customers (#6998) 2024-04-07 21:38:50 +02:00
Oli Juhl a24d6e6c97 feat: Update service zone (#6990) 2024-04-07 17:30:55 +02:00
Oli Juhl 31b07aea3d feat: Add tax regions table (#6983) 2024-04-07 15:02:48 +02:00
Oli Juhl d1728990e9 feat: Delete service zone (#6984) 2024-04-07 10:59:08 +02:00
Oli Juhl 81ea044f31 feat(medusa, core-flows): Create service zones (#6979) 2024-04-06 21:31:23 +02:00
Oli Juhl 5724d80286 feat: Bring back API key sales channel management (#6976)
- Add API key sales channel management
- Add HTTP responses for API keys and sales channels
- Use HTTP responses in `dashboard` and remove now redundant types
2024-04-06 16:30:27 +00:00
Oli Juhl c31dea02eb feat: Add generic link filter middleware (#6969) 2024-04-06 11:18:03 +02:00
Oli Juhl 94146e4bfe chore: Trigger pipeline on merge to develop (#6954) 2024-04-06 11:02:47 +02:00
Oli Juhl 626aa09497 feat: Add create location fulfillment set flow + API (#6945) 2024-04-05 19:27:38 +02:00
Oli Juhl 8ecfa4b6f5 fix: Add count to stock-locations response (#6965) 2024-04-05 18:28:03 +02:00
Oli Juhl 5ba74ec5fc feat: Add zod middleware (#6961) 2024-04-05 16:24:31 +02:00
Oli Juhl eadc5e8a79 feat: Admin V2 API keys (#6883)
Add API key management UI for V2

This PR only adds publishable API key UI. Secret API key management will come in a follow-up PR.
2024-04-05 09:55:59 +00:00
Oli Juhl 7895ff3849 feat: add sales channel management (#6761)
Add V2 sales channel management to admin

`@medusajs/medusa`
- Add `POST /admin/sales-channels/:id/products/batch/remove`
- Refactor cross-module filter middleware to comply with the latest convention

`@medusajs/admin-next`
- Add all sales channel routes
- Moves the following sales channel UI to shared components in `modules/sales-channel`:
  - sales-channel-list
  - sales-channel-edit
  - sales-channel-details
    - sales-channel-general-section
  - sales-channel-create

The sales-channel-product-section is not shared because the API in V2 will change.
The sales-channel-add-products component is not shared because the API in V2 will change.

`@medusajs/core-flows`
- Add `detachProductsFromSalesChannelsStep`
- Add `removeProductsFromSalesChannelsWorkflow`
2024-04-02 13:38:33 +00:00
Oli Juhl 9fdced2c27 feat: Admin V2 users domain (#6844) 2024-04-01 15:03:48 +02:00
Oli Juhl 1bcb13f892 feat: Remove sales channels from pub keys (#6876)
**What**
- Add workflow + step for detaching sales channels from pub API keys
- Tweak linking error message to be more helpful
- Add `removeRemoteLink` step to delete API key workflow
2024-03-29 15:01:10 +00:00
Oli Juhl d97af91a8d feat(admin-next): Email password invite flow in admin 2.0 (#6821) 2024-03-29 08:05:11 +01:00
Oli Juhl ea8d9d4d42 feat: API key sales channel link (#6851)
What
- Add link between API key and sales channels
- Add API route for batch adding sales channels to a publishable API key
- Clean up API key API routes responses
- Move API key test suite from `integration-tests/modules` to `integration-tests/api`
2024-03-28 10:15:11 +00:00
Oli Juhl 0b23e7efb8 feat: Support invites in CLI for V2 (#6798)
**What**

- Add invite support to cli for 2.0
- Allow email to be passed upon accepting an invite
2024-03-26 20:02:56 +00:00
Oli Juhl a843b121cd chore: Change minor bump to patch in changesets (#6826) 2024-03-26 12:45:44 +01:00
Oli Juhl ef58826dd2 fix(admin-ui, admin): Add missing regions relation (#6824) 2024-03-26 11:37:21 +01:00
Oli Juhl 7bc7adeeb4 feat: Create user account (#6819) 2024-03-26 10:07:38 +01:00
Oli Juhl 0deb2776ad feat: Add successRedirectUrl to auth options (#6792) 2024-03-25 08:55:21 +01:00
Oli Juhl 9e25e0c42e feat: List products middleware (#6769) 2024-03-22 14:59:21 +01:00
Oli Juhl 8f5d94b23a chore: Update CODEOWNERS 2024-03-21 11:23:03 +01:00
Oli Juhl 8155e2cfad feat: Init. v2 implementation in admin (#6715) 2024-03-20 14:28:28 +01:00
Oli Juhl a859b7895e docs: Upgrade guide for v1.20.3 (#6753) 2024-03-20 11:12:53 +00:00
Oli Juhl 3062605bce feat: Add products to sales channel (#6725)
Depends on #6722
2024-03-19 10:24:37 +00:00
Oli Juhl 0219a8677b feat: Sales Channels API routes + workflows (#6722)
**What**
- Admin sales channels API routes
- Workflows for creating, updating, and deleting sales channels
- Align `ISalesChannelModuleService` interface with update + upsert conventions
- Integrate v2 tests into v1 sales channels integration test suite
- Add metadata to sales channel entity

Sales channel <> Product management will come in a follow-up PR.

On the integration tests, creating, updating, and deleting are passing with the V2 flag enabled. You'll have to take my word for it (or run them yourself), as they are not included in the CI.
2024-03-18 20:57:29 +00:00
Oli Juhl 1eb90f739b chore: Update version bump from minor to patch (#6699) 2024-03-14 21:19:55 +01:00
Oli Juhl 8f8a4f9b13 chore: Bump all modules (#6700) 2024-03-14 21:11:12 +01:00
Oli Juhl 02e784ce78 feat: Confirm inventory in create cart workflow (#6635) 2024-03-13 18:24:08 +01:00
Oli Juhl 5f6d128613 chore: Update CODEOWNERS (#6682)
Prepare CODEOWNERS file for reviewer auto-assignment by isolating the ownership of the engineering team to packages. Without this, the team would be asked to review docs PRs too.
2024-03-13 12:52:16 +01:00
Oli Juhl 25d176b851 feat: List shipping options for cart (#6677) 2024-03-13 09:08:47 +00:00
Oli Juhl db26dafa85 chore: Use module test runner in Carts API test suite (#6679)
Nothing but migrating to our new module test runner. Hopefully, that'll make the actual test PRs easier to digest.
2024-03-13 07:32:58 +00:00
Oli Juhl f0c8142635 feat: Add shipping method to cart (#6661) 2024-03-12 17:52:48 +01:00
Oli Juhl e82b4788ec fix(fulfillment): Fulfillment set file name typo (#6671) 2024-03-12 10:08:39 +01:00
Oli Juhl c51a67a421 feat: Add payment + promotion refreshing to cart workflows (#6654)
Add payment collection refreshing to:
- Add to cart
- Create cart
- Update line item in cart

Add promotion creation to:
- Create cart
2024-03-11 12:32:41 +00:00
Oli Juhl 4136b9da5f feat: Add Sales Channel Stock Location link (#6634) 2024-03-08 15:26:26 +01:00
Oli Juhl 272fb6d328 fix(tests): Cart links (#6628)
Not sure how this test snuck past our CI check, but this fixes it :)
2024-03-08 11:12:05 +00:00
Oli Juhl badfb7c819 test: Introduce V2 tests in Admin Payments API (#6621) 2024-03-08 09:04:57 +01:00
Oli JuhlandAdrien de Peretti 8c57e61cb8 feat: Refresh payment collection + delete session (#6594)
### What
Add workflow for refreshing a payment collection. 

The idea is that on all cart updates, we want two things to happen (in the context of payments) 1. the currently active payment sessions should be destroyed, and 2. the payment collection should be updated with the new cart total.

We do this to ensure that we always collect the correct payment amount. 

From a customer perspective, this would mean that every time something on the cart is updated, the customer would need to enter their payment details anew. 

To me, this is a good tradeoff to avoid inconsistencies with payment collection.

Additionally, I updated the Payment Module interface with `upsert` and `updated` following our established convention.

### Note
This PR depends on a fix to the `remoteJoiner` that @carlos-r-l-rodrigues is working on.

Update: Fix merged in #6602 

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-03-07 13:32:20 +00:00
Oli Juhl a516e7bcba chore: Use new test runner in admin payments API (#6611)
No changes to the tests. Only replacing the test runner.

Awaiting #6610
2024-03-07 12:51:59 +00:00
Oli Juhl e5cbe28d54 feat: Refund payment (#6610)
Essentially the same as #6601 but for refunds
2024-03-07 12:34:36 +00:00
Oli Juhl 3d0da980cf feat: Capture payment (#6601)
* feat: Capture payment

* add amount to workflow input
2024-03-07 11:02:26 +01:00
Oli Juhl a5a2395622 chore: Revert #6548 (#6598)
Until a more elegant solution for allowing contributor forks to run workflows, we need to revert to using a plain text pg password
2024-03-06 13:41:53 +00:00
Oli Juhl 7d69e6068e feat: Region PaymentProvider link (#6577)
**What**

- Introduce link between Region and PaymentProvider
- Introduce API endpoint `GET /store/regions/:id/payment-providers` for retrieving providers by region
- Add tests for both
2024-03-05 09:40:25 +00:00
Oli Juhl 84208aafc1 feat: Create payment sessions (#6549)
~~Opening a draft PR to discuss a couple of implementation details that we should align on~~

**What**

Add workflow and API endpoint for creating payment sessions for a payment collection. Endpoint is currently `POST /store/payment-collection/:id/payment-sessions`. I suggested an alternative in a comment below.

Please note, we intentionally do not want to support creating payment sessions in bulk, as this would become a mess when having to manage multiple calls to third-party providers.
2024-03-05 08:40:47 +00:00
Oli Juhl 883cb0dca7 feat: Add payment collection creation for cart (#6527) 2024-03-04 09:02:01 +01:00
Oli Juhl 55275f0eba chore(actions): Use PG pass secret (#6548) 2024-02-29 22:10:56 +01:00
Oli Juhl cdb01e073b feat(link-modules): Cart, Payment Collection link definition (#6508)
* Add cart payment collection joiner confg

* fix migration

* chore: Exclude inventory tests

* remove jest ignore

* add back payment module
2024-02-29 19:33:16 +01:00
Oli Juhl 296d7faad4 chore: V2 core loader + modules integration-tests (#6544) 2024-02-29 16:46:30 +01:00
Oli Juhl c5d35ec7f2 chore(cart): Use module native soft-delete/delete methods (#6491) 2024-02-28 10:45:56 +00:00
Oli Juhl 70aeb602c9 feat(payment): Add migration (#6509) 2024-02-27 19:05:52 +01:00
Oli Juhl 3ee0f599c1 feat: Line Items API Routes (#6478)
**What**
- `POST /store/carts/:id/line-items`
- `POST /store/carts/:id/line-items/:id`
- `DELETE /store/carts/:id/line-items/:id`

**Outstanding**
- Integration tests
- Module integrations: Payment, Fulfillment, Promotions

Depends on #6475 and #6449.
2024-02-27 12:47:00 +00:00
Oli Juhl ce39b9b66e feat(payment, payment-stripe): Add Stripe module provider (#6311) 2024-02-26 19:48:15 +01:00
Oli JuhlandAdrien de Peretti 7ebe885ec9 feat: Create cart with line items (#6449)
**What**
- Add support for creating a cart with items
- Add endpoint `POST /store/carts/:id/line-items`
- Add `CreateCartWorkflow`
- Add `AddToCartWorkflow`
- Add steps for both workflows

**Testing**
- Endpoints
- Workflows

I would still call this a first iteration, as we are missing a few pieces of the full flow, such as payment sessions, discounts, and taxes.

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-02-26 13:32:16 +00:00
Oli Juhl d9636f4631 chore(cart): Make all cart entities soft-deletable (#6475) 2024-02-23 08:59:02 +01:00