Commit Graph

4873 Commits

Author SHA1 Message Date
Riqwan Thamir
bacfa3e17b feat(medusa-payment-paypal,medusa-payment-stripe): speed up unit tests in CI (#6806)
* chore: shard unit tests

* chore: move paypal and stripe to swc

* chore: update actions

* chore: refactor http paypal client

* chore: added changeset

* chore: remove medusa changes
2024-03-25 15:27:40 +01:00
Riqwan Thamir
9073d7aba3 feat(core-flows,medusa,types,utils): rename psma to prices (#6796)
What:

Renames pricesetmoneyamount to prices

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-03-25 13:15:25 +00:00
Shahed Nasser
fbc369705d feat(create-medusa-app): Added --v2 option (#6729)
## What

Added a `--v2` option to the `create-medusa-app` command that clones the [feat/v2](https://github.com/medusajs/medusa-starter-default/pull/150) branch of the starter default and makes minor changes to the setup process.

## Why

This option is supposed to make it easier to test out internally a Medusa setup with all the commerce modules. The starter's branch installs and configures the modules + the V2 feature flag.

## Testing

To test it out, run the snapshot with the `--v2` option.

## Notes

- I couldn't install the new admin dashboard in the starter branch as it's not on NPM yet (at the time of writing this), so at the moment, this opens the current admin dashboard instead.
- When trying to create an invite using the CLI tool I get the error `Unable to resolve inviteService`. Not sure if we should also make changes to the CLI tool to allow creating an invite when V2 is enabled (I know now invites are creating within the User Module, so maybe when the V2 feature flag is enabled that should be resolved instead), but for now I just disabled running the create invite command as this is mainly for internal testing. Let me know what the suggested approach is here.
2024-03-25 12:51:15 +00:00
Philip Korsholm
68b9812aa1 feat(core-flows, medusa): add create stock location endpoint for api-v2 (#6787) 2024-03-25 12:53:09 +01:00
Kasper Fabricius Kristensen
247ca3c3fa feat(dashboard, ui): Product image modals (#6779)
**What**
- Adds Media modals gallery and edit mode
- Fixes an issue with Hint from medusajs/ui.
2024-03-25 11:22:30 +00:00
Kasper Fabricius Kristensen
1b2e0b4031 feat(dashboard): Price List configurations section (#6663)
**What**
- Adds section for displaying price list configurations.

Closes CORE-1857
2024-03-25 11:07:47 +00:00
Philip Korsholm
6af8f9be6d chore: update prefix for inventory-next reservation item (#6816)
* update prefix for inventory-next reservation item

* add changeset
2024-03-25 11:14:04 +01:00
Oli Juhl
0deb2776ad feat: Add successRedirectUrl to auth options (#6792) 2024-03-25 08:55:21 +01:00
Philip Korsholm
aa154665de feat(core-flows, types, medusa): Add Update location level endpoint for api-v2 (#6743)
* initialize update-location-level

* update middlewares

* readd middleware

* pr feedback
2024-03-25 07:43:41 +01:00
Sebastian Rindom
0168c819da fix: make module test runner configurable (#6803)
* fix: make module test runner configurable

* Create blue-pumas-promise.md
2024-03-23 10:01:16 +01:00
Frane Polić
2ae8eaa779 feat(dashboard) admin 3.0 return creation (#6713)
**What**
- request return flow

Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
2024-03-22 16:57:18 +00:00
github-actions[bot]
d24c819e7d chore(docs): Updated UI Reference (#6754)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-03-22 15:26:11 +00:00
Sebastian Rindom
4c3389e1e6 fix: revert no server start (#6790)
**Why**
- we want to start a server so we can allow health checks on workers
2024-03-22 14:57:34 +00:00
Carlos R. L. Rodrigues
7e93eda1a4 feat(orchestration,workflows-sdk,core-flows): workflow cancel (#6778) 2024-03-22 15:03:06 +01:00
Philip Korsholm
3e85f4dd93 feat(core-flows): Use remote link methods to dismiss all links related to inventory item (#6737)
* use remote link methods to dismiss all links related to inventory item

* use remove remote links common step
2024-03-22 14:59:45 +01:00
Oli Juhl
9e25e0c42e feat: List products middleware (#6769) 2024-03-22 14:59:21 +01:00
Shahed Nasser
bb3cace0cd chore: add TSDocs to the API Key Module (#6785)
Add TSDocs to the API Key Module's resources
2024-03-22 12:23:44 +00:00
Riqwan Thamir
4c98545ab3 feat: shard modules and API integration tests (#6775)
what:

- runs module and api integration tests in matrix strategy
  - v28 of jest comes with sharding support, which we can utilize when we upgrade
- splits the tests by number of matrix jobs and run them in parallel
  - This introduced some flakiness in some specs, but couldn't reproduce locally. Those have been skipped for now.
- uses swc/jest for added performance
  - Locally, a chunk took 90 seconds with babel and 30 seconds with swc. 
  - This translated to 2 mins saved per shard in CI, but haven't tested this enough.
2024-03-22 11:15:01 +00:00
Deveosys
8929b2d60b Update example-logged-in-user.mdx (#6780)
Add authenticate() middleware to be able to get current user with req.user
2024-03-22 08:44:13 +00:00
Riqwan Thamir
b792c4cab5 chore: merge money amounts and price set money amounts (#6768)
what: 

- merges price set money amounts and money amount
2024-03-21 16:10:13 +00:00
Adrien de Peretti
1ef9c78cea chore: Deprecate extra in favor of driver options (#6772)
**What**
Deprecate databse_extra in favor of database_driver_options

Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
2024-03-21 14:45:11 +00:00
Sebastian Rindom
56481e683d feat: v2 - add worker mode (#6739)
**What**
- Adds support for starting a Medusa process with a worker mode.
- The worker modes supported are "shared", "worker", "server"
- In "worker" mode, API routes are not registered and modules that need to run workers (e.g., event bus redis) can use the flag to conditionally start workers.
- In "server" mode, API routes are registered and workers are not started.
- In "shared" mode, API routes are registered and workers are started. This is great for development.
2024-03-21 13:08:20 +00:00
Sebastian Rindom
205573f5e3 fix(medusa): migrate with feature flag (#6771)
* fix(medusa): migrate with feature flag

* fix

* Create small-guests-whisper.md
2024-03-21 11:33:40 +01:00
Oli Juhl
8f5d94b23a chore: Update CODEOWNERS 2024-03-21 11:23:03 +01:00
Riqwan Thamir
cf8b5ce85b chore: pricing models uses standardized relationships attributes (#6767)
what:

- all relationships under all models are standardized
2024-03-21 10:01:52 +00:00
Philip Korsholm
d930ebc1ed Feat(user): Invite expiration fix (#6758)
* fix invite duration error

* add changeset

* undo change to auth

* re-add expiresIn
2024-03-21 10:01:58 +01:00
Carlos R. L. Rodrigues
60070fb65f fix(link-modules): recreate dismissed link (#6764)
* fix(link-modules): recreate dismissed link

* rm type

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-03-20 19:12:48 +01:00
Riqwan Thamir
eefde48eef chore: update naming in abstract service to dto specifics (#6763) 2024-03-20 17:59:45 +01:00
Carlos R. L. Rodrigues
3ca957ec0f feat(workflows-sdk): additional properties to context (#6760) 2024-03-20 17:59:03 +01:00
Riqwan Thamir
20243e22ee feat(pricing): pricing models are made soft deletable (#6732)
what:

- pricing models are made soft deletable
- adds missing timestamp attributes
- removes unwanted relationships + cascade cleanup
2024-03-20 16:03:17 +00:00
Stevche Radevski
70859397c0 feat: Align the product module HTTP API to follow our conventions (#6759) 2024-03-20 16:18:13 +01:00
Riqwan Thamir
4974f5e455 feat(utils): autogenerates create and update methods when dto is provided (#6751)
what:

when you provide an optional create_dto or update_dto to the model factory types, the abstract service will generate a simple service method for the public services of the modules.

```
MoneyAmount: {
  dto: PricingTypes.MoneyAmountDTO
  create_dto: PricingTypes.CreateMoneyAmountDTO
}
```

In the above example, only a create method will be generated, but the update will be skipped.
2024-03-20 14:33:24 +00:00
Philip Korsholm
64c2731e46 feat(medusa, core-flows): add ppdate inventory item endpoint (#6735)
* init update inventory item

* prep for pr
2024-03-20 14:45:06 +01:00
Oli Juhl
8155e2cfad feat: Init. v2 implementation in admin (#6715) 2024-03-20 14:28:28 +01:00
Adrien de Peretti
c658bd0233 feat(fulfillment): Events management (#6730)
**What**
This pr includes some cleanup and refactoring around the abstract event emitter method for the module service to not rely on a named class property but instead on resolution naming.

Includes fulfillment set events on creation. 

The idea is that if that pr allows us to align and agreed on the approach as well as including the cleanup for other pr to use, If this gets merged I ll continue with another pr to do the rest of the event management


partially fix CORE-1735
2024-03-20 12:44:26 +00:00
Adrien de Peretti
06f22bb48a fis(orchestration): Properly handle select all (#6742)
**What**
Fix select `*` without breaking select none `[]`
2024-03-20 12:09:54 +00:00
Stevche Radevski
05e857d256 feat: Update the signatures for variants and options to follow convention (#6748) 2024-03-20 11:31:54 +00:00
Oli Juhl
a859b7895e docs: Upgrade guide for v1.20.3 (#6753) 2024-03-20 11:12:53 +00:00
github-actions[bot]
53653f5266 chore(docs): Generated OAS (#6752)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2024-03-20 11:30:24 +01:00
olivermrbl
95738804cd chore: Release 2024-03-20 10:35:07 +01:00
github-actions[bot]
26c9bada0a chore: Version Packages (#6360)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-20 10:21:30 +01:00
Frane Polić
189b03c485 feat(dashboard) admin 3.0 order edit (#6665)
**What**
- added Order Edit creation flow

**NOTES**
- since the state is managed on the server upon changing input / adding items a request is fired to update the edit
- on save we only confirm the edit

---

**TODO**
- [x] item removal functionality

---

https://github.com/medusajs/medusa/assets/16856471/01aa85ea-1fb1-4dff-9cf4-d8d79029c2cc
2024-03-20 07:54:22 +00:00
Sebastian Rindom
873c21355c feat: make it possible to use subscribers in v2 (#6731) 2024-03-19 18:31:58 +00:00
Stevche Radevski
db9c460490 feat: Add product and pricing link on create and delete operations (#6740)
Things that remain to be done:
1. Handle product and variant updates
2. Add tests for the workflows independently
3. Align the endpoints to the new code conventions we defined
4. Finish up the update/upsert endpoints for variants

All of those can be done in a separate PR, as this is quite large already.
2024-03-19 17:14:02 +00:00
Oli Juhl
3062605bce feat: Add products to sales channel (#6725)
Depends on #6722
2024-03-19 10:24:37 +00:00
Philip Korsholm
62d5803b20 Feat(core-flows, medusa): delete inventory item (#6708)
* initial get-inventory-item

* add exception throw test

* remove console log

* add changeset

* remove inventory item

* add changeset

* fix pr feedback

* use links

* use modules instead of property names
2024-03-19 10:40:18 +01:00
Philip Korsholm
c20eb15cd9 Feat(core-flows, medusa, types): Add delete location level api-v2 endpoint (#6727)
* add delete inventory level endpoint

* add changeset

* rename step

* rename step
2024-03-19 10:06:37 +01:00
Philip Korsholm
390bc3e72f Feat(core-flows, inventory-next, medusa, types): Add create inventory item endpoint (#6693)
* init create inventory item

* fix integration tests

* pr feedback

* rename to validate

* pr feedback

* bulk delete

* undo change w/ naming

* update dto body

* move integration test

* pr fixes

* fix for pr review

* revert medusa-config changes

* pr feedback

* fix build
2024-03-19 09:20:30 +01: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
Adrien de Peretti
4b06c17dc0 fix(workflows-sdk): Value resolver should resolve non StepResponse (#6726) 2024-03-18 21:07:04 +01:00