This PR achieves the following
- Remove dependency on internals for seeding the tests (more work left, but major work done)
- Adds the workflow for updating variant's price
I will do a follow-up PR to further clean up the tests and remove all internal dependencies
## What
Adds a `--verbose` option that shows the output of all underlying processes in real-time.
## Why
This is helpful for testing and debugging issues, especially issues that the community runs into. We can ask community members to pass the `--verbose` option and provide us with the outputted logs if they face problems.
## Caveats
When installing the Next.js starter then terminating the process, the main and child processes don't receive the abort signal as it seems to occur in the child process. This leads to the command continuing but then running into an error in the next step.
As this option is only used for debugging, I don't think it's a big issue.
## Testing
Run the `create-medusa-app` snapshot below with `--verbose` option. Or, change to the `packages/create-medusa-app` directory and run:
```bash
yarn dev --directory-path ~/some-dir --verbose
```
> The `--directory-path` option in this case is necessary as installing the medusa backend in the current `packages/create-medusa-app` directory leads to errors related to yarn workspaces.
**What**
- Add workflow + step for detaching sales channels from pub API keys
- Tweak linking error message to be more helpful
- Add `removeRemoteLink` step to delete API key workflow
There are several things done in this PR, namely:
Unify the service endpoints API to always work with a model rather than allowing to pass both ID and model (eg. both type_id and type being available in the request to create).
Start using upsertWithReplace to simplify the code and fix some deassociation bugs
Apply some changes to tests to deal with the pricing breaking changes
Correctly define the model relationships (with both ID and entity fields available)
All tests for the product are passing, which should bring us back to a great baseline.
* feat: Modify the abstract repository upsert method to handle subresources correctly
* fix: Preserve the upsertWithResponse order in the response, and return all the data
* fix: Create integration tests folder for mikro orm utils that run against the DB
* fix: Remove many-to-one creation and additional changes based on PR review
## What
Adds an AI generator to the docblock tool that uses OpenAI.
The generator at the moment only generates examples for functions when the `--generate-examples` option is provided.
## Note
I've included the generated examples of the `IOrderModuleService` as a reference of the type of result provided by the AI generator, with minor tweeks I've made. I haven't made any changes to descriptions in that file.
**What**
- Fixes tsconfig to ensure a declaration file is included in the build.
**Why**
- Ensure tsserver can understand things from medusa-test-utils
- Get rid of "Could not find a declaration file for module" warning in editors.
What
- Add link between API key and sales channels
- Add API route for batch adding sales channels to a publishable API key
- Clean up API key API routes responses
- Move API key test suite from `integration-tests/modules` to `integration-tests/api`
- Added new documentation page for Medusa Worker.
- Updated Railway deployment guide with details on Medusa Worker.
- Small adjustments to the `worker_mode` option's TSDocs.
**What**
- Adds Create draft order form
- Updates draft order details page to also display "custom" items.
**Note**
- Currently, the form is missing a way to input a discount code. Need to rethink this a bit, as the we can't implement the design in Figma.
- The current design is missing a way to select from a customers existing shipping addresses, we should add that to keep the features we have today.
- This PR uses `useInfiniteQuery` which does not work on our staging (due to duplicate dependencies as a result of building straight from the monorepo), so you will need to test locally.