v2.0.8-preview

medusajs/medusav2.0.8-previewSep 6, 2024by olivermrbl

AI Summary

This preview release restructures admin packages, moving extension tools to a new package, and adds various admin and core flow improvements including GitHub authentication.

Key Highlights

  • Restructured admin packages (extension tools moved to `@medusajs/admin-sdk`)
  • Added Order changes endpoint and order edits in timeline
  • Added support for GitHub authentication provider
  • Improved RMA (Return Merchandise Authorization) flows

Breaking Changes

  • Restructured admin packages (imports changed from `@medusajs/admin-shared` to `@medusajs/admin-sdk`)

New Features

  • Order changes endpoint
  • Order edits in timeline
  • GitHub authentication provider
  • Custom shopping prices for claims/exchanges
  • Custom price flag for order line items

Full Release Notes

<!-- 
![image](https://github.com/user-attachments/assets/329e0604-a95e-4162-b692-761128d89735)

# Medusa Preview Release update #8

CMS_BREAK -->

## Update existing project
Ensure your **Medusa** dependencies in `package.json` are using the `preview` tag:

```json
{
  "dependencies": {
    "@medusajs/medusa": "preview",
    "@medusajs/pricing": "preview",
    "@medusajs/product": "preview",
    ...
  }
}
```

To ensure an upgrade to a new version is completed correctly, run the following sequence of commands:

```tsx
rm -rf node_modules
rm yarn.lock // or package-lock.json

yarn // If you are using yarn berry, you need to create the lock-file first
```

## Highlights

### Restructured admin packages

| 🚧 Breaking change

Our admin packages have been restructured in https://github.com/medusajs/medusa/pull/8988. This is a breaking change, as our extensions tool has been moved to a new package.

More specifically, `defineWidgetConfig` and `defineRouteConfig` should be imported from `@medusajs/admin-sdk` instead of `@medusajs/admin-shared`. 

```diff
- import { defineRouteConfig, defineWidgetConfig } from "@medusajs/admin-shared"
+ import { defineRouteConfig, defineWidgetConfig } from "@medusajs/admin-sdk"
```

Additionally, the new admin package needs to be an explicit dependency in your project, so you should install it with your preferred package manager:

```
yarn add @medusajs/admin-sdk@preview
```

## Features
* feat(dashboard,types): split damaged activity from received by @riqwan in https://github.com/medusajs/medusa/pull/8859
* feat(medusa): order changes endpoint by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/8728
* feat(dashboard): order edits in timeline by @fPolic in https://github.com/medusajs/medusa/pull/8899
* feat(notification): Handle long running transaction and add status support by @adrien2p in https://github.com/medusajs/medusa/pull/8900
* feat(dashboard): allow custom shopping prices for claims/exchanges by @fPolic in https://github.com/medusajs/medusa/pull/8912
* feat(core-flows,types): Refunds can only be performed when order is imbalanced by @riqwan in https://github.com/medusajs/medusa/pull/8944
* chore(medusa): remove promotions in campaign validators + move tests to http by @riqwan in https://github.com/medusajs/medusa/pull/8965
* feat(dashboard): Cancel claims and exchanges by @fPolic in https://github.com/medusajs/medusa/pull/8958
* feat(dashboard): update create fulfillment UI part 1 by @fPolic in https://github.com/medusajs/medusa/pull/8972
* feat(utils): dml to graphql by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/8951
* feat: Add github authentication provider by @sradevski in https://github.com/medusajs/medusa/pull/8980
* feat: added totals tests for end 2 end RMA flow by @riqwan in https://github.com/medusajs/medusa/pull/8906
* feat(types,medusa): add acknowledgement typing by @shahednasser in https://github.com/medusajs/medusa/pull/8991
* feat(admin-sdk,admin-bundler,admin-shared,medusa): Restructure admin packages by @kasperkristensen in https://github.com/medusajs/medusa/pull/8988
* feat(core-flows): custom price flag  for order line items and shipping methods by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/8969
* feat(core-flows,types,promotion): register promotion campaign usage upon cart completion by @riqwan in https://github.com/medusajs/medusa/pull/8970
* feat(product): product option value methods by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/9004
* feat(dashboard, user): prefill invite email by @fPolic in https://github.com/medusajs/medusa/pull/9016
* feat(dashboard): add inventory kit info in order summary by @fPolic in https://github.com/medusajs/medusa/pull/8990

## Bugs
* fix(dashboard) RMAs shipping pricing by @fPolic in https://github.com/medusajs/medusa/pull/8848
* fix(link-module): Migration planner not closing connection correctly by @adrien2p in https://github.com/medusajs/medusa/pull/8881
* fix(order): populate version entities by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/8884
* feat(dashboard): refactor dismissed quantity by @fPolic in https://github.com/medusajs/medusa/pull/8842
* fix(dashboard): Fetch tags + types in product forms by @olivermrbl in https://github.com/medusajs/medusa/pull/8887
* fix(dashboard, js-sdk, types, medusa): separate between delete response with and without parent by @shahednasser in https://github.com/medusajs/medusa/pull/8852
* fix: ignore metadata when computing relationships from payload by @thetutlage in https://github.com/medusajs/medusa/pull/8895
* fix(dashboard): rma shipping floats by @fPolic in https://github.com/medusajs/medusa/pull/8892
* fix: Shipping profile deletion with options by @adrien2p in https://github.com/medusajs/medusa/pull/8910
* fix: Customer registration by @olivermrbl in https://github.com/medusajs/medusa/pull/8896
* fix(medusa, types): fix more query types by @shahednasser in https://github.com/medusajs/medusa/pull/8907
* fix(dashboard): Fix copy invite link by @kasperkristensen in https://github.com/medusajs/medusa/pull/8933
* fix(dashboard): fix campaign end date by @riqwan in https://github.com/medusajs/medusa/pull/8935
* fix: handle case where product to be updated does not exist by @thetutlage in https://github.com/medusajs/medusa/pull/8897
* fix(dashboard): product option delete message by @fPolic in https://github.com/medusajs/medusa/pull/8934
* fix(dashboard): format currency sign by @fPolic in https://github.com/medusajs/medusa/pull/8936
* fix(medusa): Allow filtering customers by `has_account` by @kasperkristensen in https://github.com/medusajs/medusa/pull/8947
* fix(core-flows): Handle variant creation duplicate inventory item ids by @adrien2p in https://github.com/medusajs/medusa/pull/8937
* fix(dashboard): Product create price columns race condition by @kasperkristensen in https://github.com/medusajs/medusa/pull/8943
* fix(types, medusa): fixes to draft order request types by @shahednasser in https://github.com/medusajs/medusa/pull/8949
* fix(dashboard,admin-shared): Fixes to inventory page by @kasperkristensen in https://github.com/medusajs/medusa/pull/8941
* fix(dashboard): receive return form by @fPolic in https://github.com/medusajs/medusa/pull/8955
* fix(js-sdk): fix invite resend request being sent as GET instead of POST by @shahednasser in https://github.com/medusajs/medusa/pull/8960
* fix(medusa): fix complete order API route to remove duplicate params by @shahednasser in https://github.com/medusajs/medusa/pull/8961
* fix(medusa): change the request type of removing products from price list by @shahednasser in https://github.com/medusajs/medusa/pull/8964
* fix(medusa): fix update promotion's request type by @shahednasser in https://github.com/medusajs/medusa/pull/8966
* fix(order,utils): fix outstanding amount stuck on long orders by @riqwan in https://github.com/medusajs/medusa/pull/8968
* fix(dashboard): Tab behaviour in DataGrid by @kasperkristensen in https://github.com/medusajs/medusa/pull/8973
* fix(dashboard): Align product organization badges with design by @kasperkristensen in https://github.com/medusajs/medusa/pull/8975
* fix(dashboard): Display breadcrumbs for variant route by @kasperkristensen in https://github.com/medusajs/medusa/pull/8983
* fix(utils): graphql enum options by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/8985
* fix: Check actor type on account creation, fix github entity id by @sradevski in https://github.com/medusajs/medusa/pull/8996
* fix: Remove deprecated method, generalize typings in auth by @sradevski in https://github.com/medusajs/medusa/pull/8998
* fix(dashboard): import products labels by @fPolic in https://github.com/medusajs/medusa/pull/9001
* fix(types,medusa): fix query types for some store routes by @shahednasser in https://github.com/medusajs/medusa/pull/8994
* chore(core-flows): Add invite resent event by @olivermrbl in https://github.com/medusajs/medusa/pull/8986
* fix(core-flows, types, medusa): fix batch delete types in workflows and routes by @shahednasser in https://github.com/medusajs/medusa/pull/8974
* fix(dashboard): Fixes to campaign and promotions domains by @kasperkristensen in https://github.com/medusajs/medusa/pull/9022
* fix: move get-port to main dependencies list by @thetutlage in https://github.com/medusajs/medusa/pull/8938
* fix: Workflow always print "error:" even if there are none by @matteoxplo in https://github.com/medusajs/medusa/pull/8978

## Documentation
* docs: incorrect link fixes by @shahednasser in https://github.com/medusajs/medusa/pull/8868
* docs-util: fixes in schema factory + other improvements by @shahednasser in https://github.com/medusajs/medusa/pull/8874
* docs-util: include types in workflows.ts in generated references by @shahednasser in https://github.com/medusajs/medusa/pull/8882
* docs: fix overflowing card description hidden by @shahednasser in https://github.com/medusajs/medusa/pull/8871
* docs: fix tag filters in search by @shahednasser in https://github.com/medusajs/medusa/pull/8862
* oas: [2/n] Improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8866
* oas: [1/n] Improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8850
* docs: use new x-sidebar-summary for sidebar items in api-reference if available by @shahednasser in https://github.com/medusajs/medusa/pull/8865
* oas: [3/n] Improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8875
* docs: replace usages of migrations and links commands by @shahednasser in https://github.com/medusajs/medusa/pull/8894
* Update page.mdx by @atistrcsn in https://github.com/medusajs/medusa/pull/8908
* docs-util: fix clean script removing Auth tags by @shahednasser in https://github.com/medusajs/medusa/pull/8911
* docs: fixes and improvements to auth flow documentation by @shahednasser in https://github.com/medusajs/medusa/pull/8909
* chore(framework): add a note for admin path configuration + add troubleshooting guide by @shahednasser in https://github.com/medusajs/medusa/pull/8905
* docs: fix missing auth tag in api reference by @shahednasser in https://github.com/medusajs/medusa/pull/8903
* oas: [7/n] Improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8902
* oas: [6/n] Improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8901
* oas: [4/n] Improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8893
* oas: [5/n] Improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8898
* docs: small fixes to marketplace recipe by @shahednasser in https://github.com/medusajs/medusa/pull/8932
* oas: [8/n] improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8945
* oas: [10/n] improve admin oas by @shahednasser in https://github.com/medusajs/medusa/pull/8959
* docs: generate sitemaps + change search filters by @shahednasser in https://github.com/medusajs/medusa/pull/8957
* docs: added a section on middlewares and trailing backslashes by @shahednasser in https://github.com/medusajs/medusa/pull/8942
* oas: [12/n] improve admin oas by @shahednasser in https://github.com/medusajs/medusa/pull/8967
* oas: [11/n] improve admin OAS by @shahednasser in https://github.com/medusajs/medusa/pull/8963
* docs: improvements to intro and basics chapters by @shahednasser in https://github.com/medusajs/medusa/pull/8956
* docs: added documentation on testing tools by @shahednasser in https://github.com/medusajs/medusa/pull/8939
* oas: [13/n] improve admin oas by @shahednasser in https://github.com/medusajs/medusa/pull/8971
* docs-utils: fix auth detection + added query params by @shahednasser in https://github.com/medusajs/medusa/pull/8997
* oas: [14/14] improve admin oas by @shahednasser in https://github.com/medusajs/medusa/pull/8989
* docs: add new API route guides + fixes and improvements to existing ones by @shahednasser in https://github.com/medusajs/medusa/pull/8987
* docs: fixes to testing tool guides by @shahednasser in https://github.com/medusajs/medusa/pull/8981
* chore: fix oas errors by @shahednasser in https://github.com/medusajs/medusa/pull/8982
* docs-util: fix to enum type + optional by @shahednasser in https://github.com/medusajs/medusa/pull/8950

## Chores
* chore: Replace reservation customer group client with JS-SDK + clean up by @olivermrbl in https://github.com/medusajs/medusa/pull/8857
* chore: Workflow execution JS-SDK by @olivermrbl in https://github.com/medusajs/medusa/pull/8851
* chore: Remove last trace of `client` in dashboard by @olivermrbl in https://github.com/medusajs/medusa/pull/8873
* chore(core-flows): apply taxes to items and shipping on RMA flows by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/8858
* chore(types, medusa): [3/3] add missing query type arguments by @shahednasser in https://github.com/medusajs/medusa/pull/8880
* chore(types, medusa): [2/n] add missing query type arguments by @shahednasser in https://github.com/medusajs/medusa/pull/8879
* chore(types, medusa): [1/n] add missing query type arguments by @shahednasser in https://github.com/medusajs/medusa/pull/8877
* chore: Replace Error with FetchError by @olivermrbl in https://github.com/medusajs/medusa/pull/8885
* chore: Remove `@medusajs/medusa` usage + local types from dashboard by @olivermrbl in https://github.com/medusajs/medusa/pull/8883
* chore(core-flows): added workflow events by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/8915
* chore(cart): completed at by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/8921
* chore: Remove typeORM by @riqwan in https://github.com/medusajs/medusa/pull/9005

## New Contributors
* @atistrcsn made their first contribution in https://github.com/medusajs/medusa/pull/8908
* @matteoxplo made their first contribution in https://github.com/medusajs/medusa/pull/8978

**Full Changelog**: https://github.com/medusajs/medusa/compare/v2.0.7-preview...v2.0.8-preview