* feat(medusa): Cleanup swap creation flow
* revert test and package
* fix unit tests
* fix swap seeder that does not include the tax lines on the return line item
---------
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
What:
Assign the default sales channel if none is provided while creating a new product.
FIXES: CORE-1114
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
**What**
- Allows passing data on shipping methods during claim creation and updates. Defaults to an empty object.
**Testing**
- Updates a test so it also passes along shipping method data.
**What**
- Fixes wrong payload class for `POST /admin/shipping-profiles`
- Fixes wrong payload class for `POST /admin/shipping-profiles/:id`
- Fixes an issue where updating a shipping profile with products and/or shipping options would fail.
- Fixes an issue where passing `profile_id` to `ShippingOptionService.update()` would not update the shipping profile of the option.
**Testing**
- Adds new `simpleshippingProfileFactory`
- Adds new integration test suite for shipping profiles operations.
Resolves CORE-1065
What:
Products can be filtered through the API by category parameters
Why:
To filter products by category
How:
- adds 2 params in admin/store route
- updates repository to accept 2 new parameters
RESOLVES CORE-1032
RESOLVES CORE-1033
**What:**
Introduces a store endpoint to retrieve a list of product categories
**Why:**
This is part of a greater goal of allowing products to be added to multiple categories.
**How:**
- Creates an endpoint in store routes
RESOLVES CORE-968
What:
Introduces a store endpoint to retrieve a product category
Why:
This is part of a greater goal of allowing products to be added to multiple categories.
How:
- Creates an endpoint in store routes
RESOLVES CORE-967
What:
Introduces an admin endpoint that allows a user to update a product category
Why:
This is part of a greater goal of allowing products to be added to multiple categories.
How:
- Creates a route on the admin scope to update category
- Creates a method in product category services to update a category
RESOLVES CORE-956
What:
Introduces an admin endpoint that allows a user to create a product category
Why:
This is part of a greater goal of allowing products to be added to multiple categories.
How:
- Creates a route on the admin scope to create category
- Creates a method in product category services to create a category
RESOLVES CORE-958
**What:**
Introduces an admin endpoint that allows a user to delete a product category, given an ID.
Why:
This is part of a greater goal of allowing products to be added to multiple categories.
How:
- Creates a route on the admin scope to delete category
- Creates a method in product category services to delete a category
RESOLVES CORE-957
* chore: added get route for admin categories API
* chore: add tree method to mock repository
* chore: added changeset to the PR
* chore: rename id to productCategoryId in service
* chore: switch cli option to string
* chore: lint fixes, tests for parent category
* chore: move Nested Categories behind feature flag
* chore: use transformQuery hook in api
* chore: add feature flag in migrations
* chore: remove migration FF, fix FF name
* chore: add free text search + count repo function
* chore: added list endpoint for admin
* chore: added changeset for feature
* chore: address pr review comments
* chore: change oas comment
* chore: add nullable parent category filter + test
**What**
The order cancelation does not include the refunds relation. It means that the check of the length of the refund is never true and therefore no errors are thrown if the order contains the refunds.
**How**
Add the refunds relation and tests
FIXES CORE-976
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
* remove duplicate key from oas
* changeset
* initial suggestion for adding locations to fulfillments
* update migration
* re-add functionality for removing entire reservations
* fix tests
* add location when adjusting reserved inventory of a line_item
* add changest
* handle multiple reservations for a product in the same channel
* confirm inventory in stock location previous to creating the fulfillment
* fix tests after updating create-fulfillment to confirm inventory prior to creating fulfillment
* remove bugged code
* initial validation
* initial changes for review
* chekcpoint
* update validate inventory at location
* redo some unwanted changes
* typing
* update snapshots
* redo change for eslintrc
* add eslint disable
* re-order methods in interface
* assert no_notification
* iterate one time less
* add test for validation of correct inventory adjustments in case of no inventory service installation
* ensure correct adjustments for order cancellations
* remove comment
* fix tests
* fix but with coalescing
* remove location id from confirm inventory
* don't throw when adjusting reservations for a line item without reservations
* move reservation adjustments to the api
* add multiplication for updating a reservation quantity
* move inventory adjustments from the service layer to the api
* delete reservation if quantity is adjusted to 0
* rename updateReservation to updateReservationItem
* update dto fields
* reference the correct fields
* update with transaction
* add jsdocs
* force boolean cast
* context-ize cancel and create fulfillment transaction methods
* undo notification cast
* update with changes
* refactor withTransaction to variable
* use maps
* fix service mocks
**What:**
Introduces a new folder under which repository specs will be placed.
Why:
We don't currently have a good place to test ORM logic or custom queries against the database. The repository folder tests are a place for just exactly that.
How:
Creates an internal package similar to other integration tests - api and plugins.
CORE-965
**What**
- Add integration test suite for database options
- Expose integration tests DB to additional options
- Add test for `idle_in_transaction_session_timeout`
* add mw feature flag
* add services
* add types
* add module interfaces
* add interface export
* add models for mw
* to be ammended
* remove featureflag
* use correct count
* update cart completion strategy
* swap service conversion
* update return service
* update order service
* update claim service
* add exception to claim item
* update cart service
* add indicies
* add changeset
* nullable changes in store
* store model update
* fix unit tests
* remove old inventory service
* format integration test
* update snapshots
* remove old inventory service tests
* update snapshots
* remove old code
* option updates
* naming
* add jsdoc to pv inventory service
* rename class variables
* pr feedback
* rename option to context
* if(variant_id) instead of if(typeof varia...)
* update tests
* add jsdoc
* go for custom
* update code for readability