**What**
- Add authentication endpoints:
- `/auth/[scope]/[provider]`
- `/auth/[scope]/[provider]/callback`
- update authenticate-middleware handler
- Add scope field to user
- Add unique constraint on scope and entity_id
note: there's still some remaining work related to jwt auth to be handled, this is mainly focussed on session auth with endpoints
Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
What:
- When calling a module's method inside a Local Workflow the MedusaContext is passed as the last argument to the method if not provided
- Add `requestId` to req
- A couple of fixes on Remote Joiner and the data fetcher for internal services
Why:
- The context used to initialize the workflow has to be shared with all modules. properties like transactionId will be used to emit events and requestId to trace logs for example.
**What**
- Catches unique constraints on customer_id, is_default_billing/is_default_shipping and reformats
- Adds an step to create and update of addresses that unsets the previous default shipping/billing address if necessary.
- This creates a behavior in the API where you can always set an address to be default and it will automatically unset the previous one for you.
- GET /customers/me/addresses
- POST /customers/me/addresses
- GET /customers/me/addresses/:address_id
- POST /customers/me/addresses/:address_id
- DELETE /customers/me/addresses/:address_id
**What**
- GET /admin/customer-groups/:id/customers
- POST /admin/customer-groups/:id/customers/batch
- POST /admin/customer-groups/:id/customers/remove
Workflows
**What**
- GET /admin/customers/:id/addresses
- POST /admin/customers/:id/addresses
- POST /admin/customers/:id/addresses/:address_id
- DELETE /admin/customers/:id/addresses/:address_id
**What**
```
POST /admin/customer-groups
POST /admin/customer-groups/:id
GET /admin/customer-groups/:id
DELETE /admin/customer-groups/:id
```
- Workflows
* initial implementation
* add test for invalid scope
* get config from scope not db
* assign config from scope
* fix package.json
* optional providers
* make providers options
* update type
This PR changes the original process of generating docblocks through actions. The process now is:
1. When a PR is merged for the branch `changeset-release/develop`, the docblock generator tool us used to generate docblocks for the changed files. The changed files are determined by retrieving all comments since the last release and the files in each of those commits.
2. If there are changes after using the docblock generator tool, a PR is opened in the branch `chore/generate-tsdocs`.
3. Once the `chore/generate-tsdocs` is merged, it triggers an action that generates the references for the docs. This changes the previous behaviour of generating references on a new release.
Both actions (that runs the docblock generator tool and that generates references for the docs) can also be triggered manually.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
**What**
- Provide a more helpful error message if a user adds a file in `src/services` that doesn't export a service class.
**Why**
If you forget to `export default MyClass` in a custom service you can end up with this error:

It's almost impossible to know how to recover from this which can be an issue for new users. The new error message informs the user that there is a missing class export and shows which file the error is related to.
**What**
- adds methods to create update list customer addresses
- removes default_shipping_id and billing id from customer record and moves them to address (better normalization)
**What**
- Adds the ability to pass an Axios adapter through the client's config.
**Why**
- When using NextJS with the edge runtime for deployment on Cloudflare Pages, for example, Axios does not work. Therefore, it is necessary to pass an adapter like [@vespaiach/axios-fetch-adapter](https://github.com/vespaiach/axios-fetch-adapter).
**How**
- Receives the **axiosAdapter** in the config and implements it when creating the **axiosClient**.
Closes#6133