v1.20.1

medusajs/medusav1.20.1Jan 25, 2024by olivermrbl

AI Summary

Enhances plugin capabilities (Segment, SendGrid) and adds Axios adapter support, while introducing the initial API Routes for Medusa v2.

Key Highlights

  • Segment plugin update: Typescript support and Subscribers API
  • SendGrid plugin update: Custom templates support
  • Axios adapter support in `@medusajs/medusa-js`
  • Improved deployment guides
  • API Routes for Medusa v2 (not registered when v2 flag is enabled)

New Features

  • Cart DTOs and module interface
  • Payment module package setup
  • Campaigns and promotions services
  • Customer domain in dashboard
  • Customer group
  • Authentication (Username/Password, Google)
  • Workflow engine modules
  • medusa-js Axios adapter

Full Release Notes

<!-- 
![image](https://github.com/medusajs/medusa/assets/59018053/5aa59971-862c-4559-9808-0f495467a4af)

# Version 1.20.1

This version improves our SendGrid and Segment plugins while aligning query parameters across several API endpoints.

CMS_BREAK -->

## Highlights

### Segment plugin update: Typescript support and Subscribers API

Landed in #5904.

### SendGrid plugin update: Custom templates support

Landed in #5833.

### Axios adapter support in `@medusajs/medusa-js`

Landed in #6214.

### Improved deployment guides

Landed in #6183.

### API Routes for Medusa v2

Core API Routes (located in `packages/medusa/src/api`) are not registered when Medusa v2 feature flag is enabled.

And to repeat, all changes behind Medusa v2 are very unstable, highly experimental, and a work in progress at this point, so we do not encourage the use of the feature flag yet.

Follow our development toward Medusa v2 in [our roadmap](https://github.com/orgs/medusajs/projects/7).

## Features
* feat(cart): Public-facing DTOs + (partial) module interface by @olivermrbl in https://github.com/medusajs/medusa/pull/6000
* feat(cart): Cart + Address services by @olivermrbl in https://github.com/medusajs/medusa/pull/6055
* feat: Payment module package setup by @fPolic in https://github.com/medusajs/medusa/pull/6059
* feat(cart): Partial module service implementation by @olivermrbl in https://github.com/medusajs/medusa/pull/6012
* feat(utils,types): added item/shipping adjustments for order/items/shipping_methods by @riqwan in https://github.com/medusajs/medusa/pull/6050
* feat(utils,types): campaigns and campaign budgets + services CRUD by @riqwan in https://github.com/medusajs/medusa/pull/6063
* feat(dashboard,ui): Streamline spacing and sizing by @kasperkristensen in https://github.com/medusajs/medusa/pull/6061
* feat(utils): add campaign + promotion create / update by @riqwan in https://github.com/medusajs/medusa/pull/6077
* feat(dashboard): add customers domain by @kasperkristensen in https://github.com/medusajs/medusa/pull/6093
* feat(cart): Line items operations by @olivermrbl in https://github.com/medusajs/medusa/pull/6066
* feat(utils,types): add registerUsages for promotions + computeActions consider usage by @riqwan in https://github.com/medusajs/medusa/pull/6094
* feat: Payment module models by @fPolic in https://github.com/medusajs/medusa/pull/6065
* feat: Payment module interface by @fPolic in https://github.com/medusajs/medusa/pull/6092
* feat(medusa,types): add promotion list/get endpoint by @riqwan in https://github.com/medusajs/medusa/pull/6110
* feat: customer module skeleton by @srindom in https://github.com/medusajs/medusa/pull/6126
* feat(medusa,utils): added campaign get endpoints by @riqwan in https://github.com/medusajs/medusa/pull/6125
* feat(cart): Line item adjustments by @olivermrbl in https://github.com/medusajs/medusa/pull/6112
* feat(payment): PaymentCollection CRUD by @fPolic in https://github.com/medusajs/medusa/pull/6124
* feat(cart): Shipping method adjustments by @olivermrbl in https://github.com/medusajs/medusa/pull/6119
* feat(customer): Introduce customer group by @srindom in https://github.com/medusajs/medusa/pull/6137
* feat(core-flows,medusa,utils): promotion and campaign create/update endpoint by @riqwan in https://github.com/medusajs/medusa/pull/6130
* feat(customers): add delete and update by @srindom in https://github.com/medusajs/medusa/pull/6148
* feat(medusa,types,core-flows,utils): added delete endpoints for campaigns and promotions by @riqwan in https://github.com/medusajs/medusa/pull/6152
* feat(customer): add remove from group, update group by @srindom in https://github.com/medusajs/medusa/pull/6158
* feat(modules-sdk): Run hooks on application start by @pKorsholm in https://github.com/medusajs/medusa/pull/6111
* feat(cart): Shipping methods by @olivermrbl in https://github.com/medusajs/medusa/pull/6101
* feat(cart): Add line items in cart-creation by @olivermrbl in https://github.com/medusajs/medusa/pull/6114
* feat(dashboard): 3.0 product collection by @kasperkristensen in https://github.com/medusajs/medusa/pull/6120
* feat(dashboard): Customer groups domain by @kasperkristensen in https://github.com/medusajs/medusa/pull/6098
* feat(authentication): username password provider by @pKorsholm in https://github.com/medusajs/medusa/pull/6052
* feat(utils): update joiner config for campaigns by @riqwan in https://github.com/medusajs/medusa/pull/6161
* feat(workflows-sdk): run, registerStepSuccess and registerStepFailure shortcut by @adrien2p in https://github.com/medusajs/medusa/pull/6164
* feat: Workflow engine modules by @carlos-r-l-rodrigues in #6128
* feat(medusa,types): added buyget support for modules by @riqwan in #6159
* feat(dashboard): Pub Api Key domain by @kasperkristensen in #6162
* feat(authentication): Google authentication provider by @pKorsholm in #6104
* feat(cart): Item tax lines + shipping method tax lines by @olivermrbl in #6136
* feat(modules): Add initModule util  by @pKorsholm in #6200
* feat(medusa-oas-cli): updated redocly-cli to v1.7 by @shahednasser in #6211
* feat(customer): add softdelete/restore by @srindom in #6203
* feat(medusa-js): add axios adapter to config by @SirRodney in #6214

## Bugs
* fix: migrate segment subscribers + typescript support by @srindom in https://github.com/medusajs/medusa/pull/5904
* fix: eslint configurations in the root by @shahednasser in https://github.com/medusajs/medusa/pull/6049
* fix(admin-ui->Collections): add key for map fn. resolve #6106 by @wangjue666 in https://github.com/medusajs/medusa/pull/6107
* fix(medusa): ensure transaction is reused when service calls itself by @srindom in https://github.com/medusajs/medusa/pull/6089
* fix(modules-sdk): create workflow returning step transformer by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/6102
* fix(docs): update extend repository by @vinhnguyen1211 in https://github.com/medusajs/medusa/pull/6140
* fix(medusa-js): correct invites resend path in js client by @lukebui in https://github.com/medusajs/medusa/pull/6155
* fix(medusa-plugin-sendgrid): Support custom templates by @SGFGOV in #5833
* fix(medusa): Implement listAndCount for UserService and update list endpoint by @kasperkristensen in #6190
* fix(medusa): Support q search and order in list regions by @olivermrbl in #6202
* fix(medusa): Support q search in currencies by @olivermrbl  in #6201
* fix(medusa): List Users return type by @kasperkristensen in #6204
* fix(medusa): GET /admin/shipping-options params by @kasperkristensen in #6208

## Chores
* chore(utils, product): Attempt to simplify module scripts export by @adrien2p in https://github.com/medusajs/medusa/pull/6021
* chore: abstract the modules repository by @adrien2p in https://github.com/medusajs/medusa/pull/6035
* chore: Hide repository creation if they are not custom + add upsert support by default by @adrien2p in https://github.com/medusajs/medusa/pull/6127
* chore(admin-ui): add key for gift-cards table cells map fn by @wangjue666 in https://github.com/medusajs/medusa/pull/6154
* chore(docs-util): change freshness check threshold by @shahednasser in https://github.com/medusajs/medusa/pull/6122
* chore: use loaded module reference by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/5763
* chore(utils): Update base repository to infer primary keys and support composite by @adrien2p in https://github.com/medusajs/medusa/pull/6062
* chore: Abstract module services by @adrien2p in https://github.com/medusajs/medusa/pull/6087

## Documentation
* docs: documentation updates for v1.20 by @shahednasser in https://github.com/medusajs/medusa/pull/6031
* docs: update dependencies by @shahednasser in https://github.com/medusajs/medusa/pull/6046
* docs: typo backendUrl default url by @wangjue666 in https://github.com/medusajs/medusa/pull/6073
* docs: fix example of createFulfillment by @shahednasser in https://github.com/medusajs/medusa/pull/6088
* docs: add new troubleshooting section for create-medusa-app by @shahednasser in https://github.com/medusajs/medusa/pull/6071
* docs: added link to next.js starter demo by @shahednasser in https://github.com/medusajs/medusa/pull/6108
* docs: Update environment variables to match Railway variable references format by @peyronoscar in https://github.com/medusajs/medusa/pull/6145
* docs: improve admin documentation by @shahednasser in https://github.com/medusajs/medusa/pull/6117
* docs: change sidebar title for Event by @shahednasser in https://github.com/medusajs/medusa/pull/6134
* docs: migrate guides to TSDoc references by @shahednasser in https://github.com/medusajs/medusa/pull/6100
* docs: fix production build error by @shahednasser in https://github.com/medusajs/medusa/pull/6170
* docs: rearrange sections in SendGrid guide by @shahednasser in https://github.com/medusajs/medusa/pull/6165
* docs: update strapi guide by @shahednasser in https://github.com/medusajs/medusa/pull/6163
* docs: improvements to deployment guides by @shahednasser #6183
* docs: add anchor link to reference parameters by@shahednasser in #6194
* docs-util: created docblock-generator tool by @shahednasser in #6096
* docs(docblock-generator): fix action Node version by @shahednasser in #6207

## New Contributors
* @wangjue666 made their first contribution in https://github.com/medusajs/medusa/pull/6073
* @vinhnguyen1211 made their first contribution in https://github.com/medusajs/medusa/pull/6140
* @peyronoscar made their first contribution in https://github.com/medusajs/medusa/pull/6145
* @lukebui made their first contribution in https://github.com/medusajs/medusa/pull/6155

**Full Changelog**: https://github.com/medusajs/medusa/compare/v1.20.0...v1.21.0