* use pvi service method instead of inventory service method to get quantity for sales channel
* save a few invocations
* rename quantity
* omit || 0
* add changeset
* extract method for retrieving variant inventory quantity
* update pr with feedback
* update create fulfillment flow
* move transaction service creation close to where it's used
* integration tests
* fix feedback
* use transformBody
* add changeset
* only add ordering select if not already selected
* add integration test
* add changeset
* remove catch
* linting and suggestion from adrien
* add sales channel filtering when listing locations
* add changeset
* add exception back into sales channel location service
---------
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
The queue registration of jobs has stopped working due to a small issue in how the jobs are added to the queue.
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
What:
Allowing the list endpoint to return a full tree when requested.
Why:
When scoped with parent_category_id=null and include_descendant_tree=true, the query cost is fairly low. This allows for fast querying and prevent FE from building out the entire tree from a flat list repeatedly. By default, it is set to false, so this should be an intentional change knowing the costs of doing it for the entire result set.
How:
When include_descendants_tree is included in the request parameter or the service parameter, we do a loop on results of product categories and do a call to fetch the descendants of that product category.
RESOLVES CORE-1128
## What
Pluralize OAS tags
## Why
OAS tags are commonly used by code generator to group routes under a name space based on a tag.
Our JS client convention is to use plural, e.g: client.products, client.customers. In order to minimize friction when migrating to a client generated from OAS, tags should be plural as well.
## How
Match tag naming with JS client resource naming.
## Test
* Run `yarn build`
* Run `yarn openapi:generate`
* Run `yarn redocly preview-docs docs/api/admin/openapi.yaml --config=./docs-util/redocly/config.yaml`
* Expect side menu items to be plural.
* Run `yarn redocly preview-docs docs/api/store/openapi.yaml --config=./docs-util/redocly/config.yaml`
* Expect side menu items to be plural.
## What
Add missing x-codegen + fix schema naming and $ref
## Why
OAS code generator was missing information to be able to match current JS client.
## How
Ensure OAS matches JS client methods.
## What
Include `/admin` and `/store` in OAS paths URLs
## Why
Allow for generating a combined OAS that include routes for both "admin" and "store" endpoint.
Fix potential issues with code generator where routes are not prefixed with "admin" and "store" leading to 404 errors.
## Test
* Run `yarn build`
* Run `yarn openapi:generate`
* Run `yarn redocly preview-docs docs/api/admin/openapi.yaml --config=./docs-util/redocly/config.yaml`
* Expect paths to be prefixed with /admin.
* Run `yarn redocly preview-docs docs/api/store/openapi.yaml --config=./docs-util/redocly/config.yaml`
* Expect paths to be prefixed with /store.
## What
Include packages/ subdirectories in medusa-dev packages discovery.
## Why
We started to use subdirectories in the monorepo `packages/` directory in order to better organize packages.
Packages in subdirectories were invisible to `medusa-dev` and could not be copied.
## How
Rely on monorepo package.json workspace glob patterns to discover packages that can be published to the local npm registry.