**What**
Wrap all actions that require the usage of an atomic phase into a transaction from the handler
**Info**
The following end points have been removed since that they rely on non existing stuff and can't be used and are not used
admin - create-order
admin - delete order metadata
admin - set region metadata
admin - remove region metadata
Fixes CORE-358
* docs: last storage plugin is default
Add caution that only the last configured storage plugin will be used
* Update docs/content/add-plugins/spaces.md
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
* docs: storage plugin default
add caution that only last storage plugin will be used
* Update docs/content/add-plugins/s3.md
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
* docs: caution to say only last configured storage plugin will be used
Added a caution that only the lat configured storage provider will be used
* Update docs/content/add-plugins/minio.md
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
* feat(medusa): Migrate and fix order service
* fix(medusa): Order service pass Payment instead of the session:
* fix(medusa): Remove unnecessary method in the client library
* test(medusa): Fix unit tests
* test(medusa): Fix unit tests
* fix(medusa): Typo
* test(meduas): fix unit test
* feat(medusa): Update base service used and missing transaction
* test(meduas): fix unit test
* fix(medusa): cleanup and missing transaction
* fix(medusa): missing withTransaction on some mocks
* feat(medusa): Update order service method visibility
* include feedback
* feat(medusa); revert order payment status"
* test(medusa): fix unit
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
* feat(medusa): Allow to create/update object sales channels assignment
* feat(medusa): cleanup
* feat(medusa): Update oas
* feat(medusa): Only add relation if required
* feat(medusa): Add feature flag decorators
* style(medusa): PR feedback
* feat(medusa): Remove circular by moving sales channel product existence check to the repo layer
* feat(medusa): Reduce selected column as they are not necessary
* feat(medusa): Refactor repository and usage
* feat(medusa): Improve entity name formatting
* feat(medusa): Add feature flag to the service
* fix(medusa): typo
* test(medusa): fix unit tests
* feat(medusa): include feedback
* feat(medusa): Adds validator pipe for Sales Channel existence (#1930)
* feat(medusa): Allow to create/update object sales channels assignment
* feat(medusa): cleanup
* feat(medusa): Update oas
* feat(medusa): Only add relation if required
* feat(medusa): Add feature flag decorators
* style(medusa): PR feedback
* feat(medusa): Remove circular by moving sales channel product existence check to the repo layer
* feat(medusa): Reduce selected column as they are not necessary
* feat(medusa): Refactor repository and usage
* feat(medusa): Improve entity name formatting
* feat(medusa): Add feature flag to the service
* fix(medusa): typo
* test(medusa): fix unit tests
* feat(medusa): Adds validator pipe for Sales Channel existence
* feat: Move product payload classes to types file
* fix unit tests
* fix integration test
Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
* feat(medusa): Revert base repository and related
* feat(medusa): cleanup
* remove base repo export
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
* wip: validate line item SC
* fix: repository type, remove relation, use sc id, check if cart has associated sc
* feat: setup tests and seeder, change entity retrieval in cart service method
* feat: remove repo usage and method, use Adrien's method from product service to check sc association, add test cases, add seeder entities, accept flag for validating sc on the endpoint
* feat: add a unit test to ensure validation method is called if flag is passed
* feat: allow `validate_sales_channels` flag in other relevant endpoints
* fix: typo
* fix: flag rename
* fix: correct FF in test suites
* fix: address PR feedback
* fix: change error message
* feat: remove query params, guard with FF, refactor
* feat: guard validation in the service
* refactor: rename validation method
* refactor: reorganise tests
* wip: cleanup test file
* wip: revert cart seeder changes use factories
* fix: remove seeder, update mocks
* fix: method name
* fix: units, validate by default
* git: resolve merge conflicts
* refactor: separate line item sales chanel units
Co-authored-by: fPolic <frane@medusajs.com>
**What**
Add support to sales channel in the product/order export strategy
**How**
Update the strategy to include the sales channel if the flag is enabled
**Tests**
Add new unit tests that check that the exported data does include the appropriate sales channel when the flag is enabled and that the data still does not include the sales channel if the flag is not including the flag
FIXES CORE-303
What
Allow to create a cart with a sales channel, otherwise the default one is attached.
Also allow to update the sales channel on an existing cart and in that case the line items that does not belongs to the new sales channel attached are removed
How
Updating existing end points and service method to integrate the new requirements
Tests
Add new integration tests
Fixes CORE-270
Fixes CORE-272
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
Sometimes the some integration tests that are depending on external services are failing due to timeout.
One of the reason is that the health check is done every 10 sec with a timeout of 5sec, which can lead to long waiting time before continuing
FIXED CORE-326
**What**
Move the preliminary indexing action at boot time to a separate subscriber in order to defer the work load in the background and therefore to avoid increasing the load time when the number of products increase with time.
**Tests**
Add 10k products (since it is our limit, tried with 50k before getting the error limit) using
```sal
do $$
declare
counter integer := 0;
begin
while counter < 10000 loop
INSERT INTO product (id, title, description, handle, profile_id)
(SELECT * FROM ((SELECT random(), random(), random(), random(), 'sp_01FNB9K7FXB0SZMKXD013RJYSP')) as T);
counter := counter + 1;
end loop;
end$$;
```
then start the server and while the server is starting, hit the search end point repeatedly
FIXES CORE-258
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
- include the default sales channel in the result of `get-store` if featureflag is set
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
Fix the options usage across the plugin `this.options_` instead of `this.options`
**Tests**
New unit tests
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>