* feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart
* chore: split steps into 2 for add-to-cart
* chore: split steps into 2 for add-to-cart
* chore: iterate safely
* chore: parallelize upsert
* feat: Add email pass authentication provider package
* feat: Revamp auth module and remove concept of scope
* feat: Revamp the auth module to be more standardized in how providers are loaded
* feat: Switch from scope to actor type for authentication
* feat: Add support for per-actor auth methods
* feat: Add emailpass auth provider by default
* fix: Add back app_metadata in auth module
* chore: Clean up authentication middlewares
* chore: Rename AuthUser to AuthIdentity
* feat: Define link between user, customer, and auth identity
* feat: Use links for auth, update auth context content
* fix: Adjust user create command with new auth setup
* fix: Make auth login more dynamic, review fixes
* fix: Change test assertions for created by
* chore: pick the default store region
* chore: fix test
* chore: remove from defaults workflow and move to seeds
* chore: undo payment provider change
* chore: rearrange conditionals
* feat: initial impl. of Unfulfilled section and create flow
* feat: create fulfillment
* feat: order <> fulfillment link, fulfillment section
* feat: accept order_id when creating fulfillment
* feat: finish create and cancel
* fix: integration test
* refactor: real Order<>Fulfillment link instead readonly, add link step to the workflow
* fix: revert `order_id` definitions
* chore: add changeset
* fix: build
* fix: address comments
* fix: fetch inventory and location levels for fulfilled variant
* fix: loading inventory details
* add isList to order fulfillment link
* fix: duplicate declaration
* fix: type
* refactor: link orders step, fix client
* fix: move translations to the new file
* fix: pass order id in test
---------
Co-authored-by: olivermrbl <oliver@mrbltech.com>
**what**
- Create return workflow partial implementation
- Update some order domain types
- create order fulfillment link
**NOTE**
this PR is partially done but can still be merged as is, it will require some discussions around the flow and some unknowns or uncertainty in regards to some data and some behaviour
* feat: Add a simple configurable notifications subscriber that is configurable
* Proposal on awaiting all subscribers to run
* fix: Clean up wait subscribers util and notifications test
---------
Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
* chore: Remove unused validations and utilities
* chore: Remove all resources that are not being loaded
* chore: Remove unused dependencies, typeorm related code and fix tests
* chore: Use createAdminUser in all module tests
**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
**What**
- automatically build and consume connection and container loader if not exported by the module
- therefore load the services and repositories automatically, including baseRepository
- automatically build run and revert migrations if not provided
- cleaup modules to remove extra unnecessary bits and pieces
- remove the `initializeFactory` in favor of using `medusaApp`
Should drastically improve the module building DX by removing a lot of boilerplate to handle by the user, that plus the base entity should simplify quite a lot the flow cc @shahednasser
**Note**
I had to choose a way to identify connection and container loader from the exported loader from the module. I decided to go with named function `connectionLoader` and `containerLoader`, also, now the factories will return named function so if the user use the factories we are providing to build those loaders, the function will also be named and identified
what:
- adds a very basic complete cart endpoint that creates an order
- the complete cart workflow currently does the following:
- create tax lines
- create order
**What**
Add support for the following operations
- update rules from the update shipping options end point
- update rules from the batch update end point
Also added some improvements, that can be revisited later
- Add a rule value normalizer, jsonb will transform the input value to a [primitive](https://www.postgresql.org/docs/current/datatype-json.html#JSON-TYPE-MAPPING-TABLE) when possible meaning that passing `"true"` will result in storing `true` and not the string. The normalizer takes care of that
What:
- Remote query now handles `context` keywork in the arguments to forward it as a filter to the method `list`
- Pricing module `list` method returning `calculated_price` if requested as a field