Kasper Fabricius Kristensen
f4c489fb85
fix(admin-ui): Fix issue with null product categories ( #5707 )
...
* fix(admin-ui): If categories is null on a product the details page should not crash
* cleanup variant warning to reflect pricing changes
2023-11-24 12:51:32 +00:00
Philip Korsholm
712c4496ce
fix(medusa): Update default relations in admin for list-product from module
2023-11-24 12:50:42 +00:00
Kasper Fabricius Kristensen
22bea2724d
fix(medusa): Normalize subscriber paths ( #5703 )
2023-11-23 17:33:51 +00:00
Shahed Nasser
f3e20379b0
chore: added TSDoc for workflow utility functions ( #5674 )
...
* feat(translation): Init plugin
* Create migration and entity
* Start service implementation
* fix typo
* typings
* config
* lang -> locale
* chnge config
* link
* update link
* update export
* workflow composer (wip)
* workflow step/workflow
* simplify api
* Add structured tests
* Add step name onto the step function for future usage
* new abstraction level of exported workflow
* cleanup
* rm step 4
* Add parallelize support to workflow composition
* add Symbols and support primitive types as input
* rem .only
* eslint
* cleanup + test
* resultFrom
* prevent undefined from crashing
* finalise tests
* chore: transform
* chore: tests and transform type
* move translation to my dummy
* chore: copy before transform
* yarn.lock
* chore: shortcut to property access
* Add type safety
* WIP typesafety
* WIP
* finalise typings
* remove extends unknown
* WIP
* finalise transform typings
* finalise transform typings
* workflow typs
* More typings in invoke and compensate
* rm comment
* Context as the last args
* fix step function type
* types
* fixes
* fixes compose
* chore: transform
* chore: fix tests and transform Proxy
* chore: args length
* uncomment
* chore: array fill
* WIP fix filler
* WIP fix filler
* chore: remove only
* apply gap filler to create step invoke
* context first
* fixes
* wofkrlow ts documentation
* wofkrlow ts documentation
* wofkrlow ts documentation
* wofkrlow ts documentation
* wofkrlow ts documentation
* chore: hook
* hook types
* update types
* don't loose previous iteration
* update implementation
* fix some tests part 1
* finalise typings
* rm new lines
* fixes
* wip
* fixes
* fix tests
* simplify types
* simplify types
* update export
* improve types exclusion compensateInput
* allow a workflow to return plain object composed of stepReturn properties
* only allow one handler for the hook registration
* only allow one handler for the hook registration
* workflow loading
* lint
* lint
* lint
* finalise tests
* try to fix ci
* try to fix ci
* remove corepack step
* cleanup
* cleanup
* cleanup
* chore: context as 2nd argumentq
* added tsdoc for some workflow functions
* Add support for StepResponse and re work the typings
* changeset
* chore: invoke output as default compensate input
* copy data
* copy data
* fix createWorkflow result
* added tsdoc to remaining utility functions
* rm test file
* proxify input and transformer as well
* transformer should re run + type update
* rework step response
* allow void return from steps
* updates to the TSDocs
* address comments
* address PR feedback
* add await for API Route examples
* ignore documenting hooks
---------
Co-authored-by: adrien2p <adrien.deperetti@gmail.com >
Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com >
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com >
2023-11-23 16:38:43 +00:00
Riqwan Thamir
1e39a95f8a
fix(pricing, medusa): resolve minor pricing-module bugs ( #5685 )
...
* fix region price updates
* pricing migration: include title/name field value migration
* update migration scripts for pricing module
* move file to script utils
* rename file
* rename file
* add changeset
* remove redundant maps
* update migration script
* nit
* remove unnecessary variable
* filter before map
* array function naming cleanup
* chore: address pr reviews
---------
Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com >
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com >
2023-11-23 17:11:47 +01:00
Philip Korsholm
02ea9ac3ac
feat(admin-ui): Delete pricing forms from edit + create variant modals ( #5676 )
2023-11-23 15:31:32 +00:00
Philip Korsholm
a39ce125cc
fix(product, types, workflows): Update product variant workflow ( #5668 )
...
**What**
- Fix issues with update-variant workflow:
- other variants than the updated variant are no longer removed
- options are updated properly
Co-authored-by: Riqwan Thamir <5105988+riqwan@users.noreply.github.com >
2023-11-23 14:35:01 +00:00
Kasper Fabricius Kristensen
b25b29fe7b
fix(ui): code block styles ( #5692 )
...
**What**
- Improves the styling of CodeBlock prism theme
2023-11-23 11:59:17 +00:00
Adrien de Peretti
010560fd2a
fix(workflows): compensation handling ( #5691 )
2023-11-23 09:11:03 +00:00
Riqwan Thamir
6025c702f3
fix(pricing,types): remove is_dynamic from model + types ( #5664 )
...
what:
Removing this until we introduce dynamic pricing.
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com >
2023-11-22 19:28:48 +00:00
Carlos R. L. Rodrigues
9f9db39698
feat(workflows): Workflow DX ( #5607 )
2023-11-22 17:23:39 +00:00
Philip Korsholm
dc5750dd66
feat(medusa,types,workflows,utils,product): PricingModule Integration of PriceLists into Core ( #5536 )
2023-11-21 17:42:37 +00:00
Shahed Nasser
fd27bc0daa
chore: update tsdocs of pricing module ( #5648 )
...
* chore: update tsdocs of pricing module
* Update money-amount.ts
---------
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2023-11-21 11:26:07 +00:00
github-actions[bot]
f4085dbede
chore: Version Packages ( #5622 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-21 08:46:09 +00:00
olivermrbl
ebf63dffc4
chore(medusa-oas-cli,medusa-source-shopify): Remove workspace versions
2023-11-20 18:24:30 +00:00
Riqwan Thamir
c4722715cd
fix(product): when running migrations, prevent exploding on isolated case ( #5643 )
...
* fix(product): when running migrations, prevent exploding on isolated case
* chore: remove try catch block
* chore: added variant test fixes
* chore: update name of var
2023-11-20 18:08:28 +01:00
Shahed Nasser
c51dce164d
docs: general fixes to references ( #5653 )
...
* fixed typedoc plugin's escape strategy
* move props comments to the associated property
* regenerate references
2023-11-17 19:36:58 +02:00
Bastien
b3093c3e3d
feat(medusa): Add metadata to Product Category ( #5599 )
...
* ✨ feat(migrations): add metadata column to product_category table in database to store additional information about each product category
* ✨ feat(product-category.ts): add metadata field to ProductCategory model to store additional details
📝 docs(product-category.ts): add documentation for new metadata field in ProductCategory model
* ✨ feat(product-category.ts): add metadata field to ProductCategoryInput type to support additional data
* ✨ feat(ProductCategory.ts): add optional metadata field to ProductCategory model to store additional details
* ✨ feat(product-categories): add metadata field to product categories for additional information storage
📝 docs(product-categories): add documentation for new metadata field in product categories
* ✨ feat(product-categories): add 'metadata' field to default and allowed product category fields for enhanced data tracking
* ✨ feat(product-category.ts): add metadata support to product categories
🔧 refactor(product-category.ts): import setMetadata from utils to handle metadata setting in a more efficient way
* ✨ feat(models): add metadata field to AdminPostProductCategoriesCategoryReq and AdminPostProductCategoriesReq models to store additional information
* 📝 docs(api-reference): add metadata field to ProductCategory schema in both admin and store specs
🔧 fix(api-reference): make metadata field required in ProductCategory schema to ensure data consistency
* Create nine-fishes-matter.md
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-11-16 20:37:02 +01:00
Kasper Fabricius Kristensen
57573ed4d7
feat(medusa): Alternative Subscriber API and new ScheduledJobs API ( #5624 )
...
* workking subscribers API
* progress
* update registrar args
* cleanup
* progress
* progress
* tests
* rename to loaders
* rm build artifacts
* improve validation and change jobs args to object
* spread context on subscribe
* add changeset
* address comments
* fix spelling of warning and add warning on Redis not enabled for Scheduled Jobs
* fix tests
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-11-16 20:36:02 +01:00
Riqwan Thamir
4f0bea4909
fix(pricing): add missing migrations for pricing module ( #5646 )
2023-11-16 14:26:00 +00:00
Kasper Fabricius Kristensen
a67a8e7e90
fix(ui): Fixed CodeBlock line number width ( #5640 )
...
**What**
- Fixes the width of lineNumbers in the CodeBlock component according to the widest number.
- Introduces a new prop on snippets that allows users to hide the copy button. Also updated docs to reflect this.
Before:

After:
<img width="742" alt="image" src="https://github.com/medusajs/medusa/assets/45367945/5ce845f7-b8c7-411c-abfb-fa03448aeb1a ">
Closes #5639
2023-11-16 10:50:04 +00:00
Shahed Nasser
95aa5a2d28
docs: generate inventory and stock location references ( #5645 )
2023-11-16 11:10:23 +02:00
Riqwan Thamir
1772e80ed1
feat(pricing,types): price list API + price calculations with price lists ( #5498 )
...
**what:**
**PriceList Service APIs:**
- createPriceList
- updatePriceList
- addPriceListPrices
- removePriceListRules
- setPriceListRules
- deletePriceList
- listPriceLists
- listAndCountPriceLists
**Price Calculations**
- Returns prices with price list prices
- Returns a new shape with calculated and original prices
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com >
2023-11-15 20:24:29 +00:00
Kasper Fabricius Kristensen
2947f57db1
fix(medusa): Update wrapHandler so it also passes errors in non-async route handlers to the errorHandler middleware ( #5597 )
...
* fix: Align @types/react versions across UI packages
* update codeowners
* fix: Update wrapHandler so it also catches errors for non-async route handlers
* rm chaining
* align wrapHandler in utils and add deprecation note
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-11-15 19:41:10 +01:00
Kasper Fabricius Kristensen
c08240df3f
fix(admin-ui): Preserve decimal numbers when locale uses commas ( #5641 )
...
**What**
- Ensure that we format numbers with `.` as the decimal separator, even when the users locale uses `,`. This changes still allows users to use comma as the decimal separator, but the transformation we use before writing to state converts the number to use a dot instead.
2023-11-15 17:18:26 +00:00
Shahed Nasser
61aef4aaa7
chore(types): Add TSDoc comments to IInventoryService ( #5630 )
...
* chore(types): Add TSDoc comments to IInventoryService
* fix description of list methods
* address PR feedback
2023-11-15 17:40:25 +02:00
Shahed Nasser
e13995ff2f
chore: add TSDocs for IStockLocationService ( #5631 )
...
* chore: add TSDocs for IStockLocationService
* address feedback
2023-11-15 15:54:20 +02:00
Kasper Fabricius Kristensen
52800710a2
fix(medusa): Error handling middleware should be applied when no config is exported ( #5634 )
...
**What**
- Fixes an issue where the default errorHandler middleware was not applied if the user did not have a `middlewares.ts` file.
- Updates the type of `MiddlewaresConfig` so `middlewares` is now optional, as people might want to only set a bodyParser config for a matcher and not provide any additional middleware.
2023-11-14 20:48:10 +00:00
chemicalkosek
7226f5b699
fix(medusa): Add missing promiseAll import ( #5635 )
2023-11-14 19:37:00 +01:00
Victor Gerbrands
3f016d871a
fix(admin-ui): sort supported languages alphabetically ( #5479 )
...
## What?
Added sorting to the `supportedLanguages` array in `packages/admin-ui/ui/src/i18n/index.ts`. This makes sure the languages in the dropdown are sorted alphabetically.

## Why?
As we're supporting more languages in the admin UI, this list was getting messy.
## How?
By using `sort()` and `localeCompare()` on array declaration.
## Testing
Go to Medusa Admin locally, login and navigate to Settings > Personal information to test the language dropdown.
2023-11-14 15:09:57 +00:00
Shahed Nasser
b1826a8e01
chore: add missing error responses to currency OAS ( #5627 )
2023-11-14 10:18:37 +02:00
Shahed Nasser
c6dff873de
docs: update docusaurus to v3 ( #5625 )
...
* update dependencies
* update onboarding mdx
* fixes for mdx issues
* fixes for mdx compatibility
* resolve mdx errors
* fixes in reference
* fix check errors
* revert change in vale action
* fix node version in action
* fix summary in markdown
2023-11-13 20:11:50 +02:00
Riqwan Thamir
cedab58339
feat(workflows,medusa,utils): add medusa v2 feature flag ( #5603 )
...
* chore: add medusa v2 feature flag
* chore: cleanup more FF
* chore: cleanup workflows FF
* chore: add comments on broken specs
* chore: added check for package registration
* chore: reenable workflows FF for create order workflow
* chore: disable FF on test cli db
* chore: hide loader validation behind FF
* chore: use medusa v2 enabled
* chore: register feature flag router in use-db
* chore: change to minro
2023-11-13 16:18:05 +01:00
olivermrbl
03e56aed74
chore: Release
2023-11-10 10:38:47 +01:00
github-actions[bot]
71d59d2c81
chore: Version Packages ( #5527 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-10 10:28:21 +01:00
adamlamaa
203e1fccb4
feat(medusa): Include Product Collections in Seed command ( #5510 )
2023-11-10 08:55:08 +01:00
Adrien de Peretti
4ad66c1795
fix(medusa): Load legacy modules entities ( #5594 )
2023-11-10 08:51:55 +01:00
Kasper Fabricius Kristensen
e3f1da92db
fix(admin-ui, ui): Align @types/react versions across UI packages ( #5596 )
...
* fix: Align @types/react versions across UI packages
* update codeowners
2023-11-10 08:31:30 +01:00
Rick Lam
b4e8adfcf9
fix(admin-ui): Admin UI: Invalid Request Header ( #5548 )
...
**What**
Fix of https://github.com/medusajs/medusa/issues/4904
**Fixes**
Admin run development server with hostname shown Invalid Request Header
**How**
Added webpack-dev-server config [allowedHosts](https://webpack.js.org/configuration/dev-server/#devserverallowedhosts ) and [webSocketUrl](https://webpack.js.org/configuration/dev-server/#websocketurl ) in admin develop options to change allowlist services hostname and Web Socket Url
**Testing**
Edit medusa-config.js with hostname in admin plugin develop options
```
const plugins = [
// ...
{
resolve: "@medusajs/admin",
/** @type {import('@medusajs/admin').PluginOptions} */
options: {
develop: {
allowedHosts: [
'host.com',
'subdomain.host.com',
'subdomain2.host.com',
'host2.com',
],
webSocketURL: 'wss://host.com/ws'
},
},
},
]
```
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-11-09 12:32:27 +00:00
Shahed Nasser
91615f9c45
chore: improve JS Client TSDoc comments ( #5582 )
...
* add oas schema to tsdoc parser
* add tsdoc (part 1)
* Finished tsdoc in js client
* general fixes
* added tsdoc in core medusa package
* parse schema tags in model files
* added maxlevel option
* added more tsdoc
* added tsdoc in core
* added TSDoc in core package
* generated client types
* support featureFlag and expandable tags
* added support for resource feature flag note
* fix api ignore plugin
* added eslint plugin
* support feature flag and expandable badges
* adjusted overview page + generated reference
* revert generated files
* added changeset
* add details about new typedoc options
* fix broken link
2023-11-09 12:51:17 +02:00
Kasper Fabricius Kristensen
c68da6d685
feat(medusa): API routes body parser config ( #5537 )
2023-11-09 09:10:45 +01:00
Adrien de Peretti
f90ba02087
feat(utils): Introduce promiseAll util ( #5543 )
2023-11-08 08:48:48 +01:00
Kasper Fabricius Kristensen
e4ce2f4e07
chore(ui,icons,ui-preset,toolbox): Move design system packages to monorepo ( #5470 )
2023-11-07 22:17:44 +01:00
Egor Makarenko
09ab1d1be6
feat(create-medusa-app): print error message for failed db connection ( #5547 )
...
`create-medusa-app` currently prints a generic error message when it cannot connect to a database. This tiny pull request adds the thrown error to the log message, that simplifies debugging of installation issues
2023-11-06 16:37:10 +00:00
Shahed Nasser
2576a0fd23
docs(api-reference): added local server to list of servers ( #5572 )
...
* docs(api-reference): added local server to list of servers
* fix publishable api key route
2023-11-06 17:30:56 +02:00
Kasper Fabricius Kristensen
d7e1887221
fix(admin-ui): Prevent comma decimal separator from converting inputs to NaN ( #5566 )
...
**What**
- Using the Price List bulk editor with a locale that uses comma as the decimal separator would convert decimal numbers to NaN. This PR fixes that by replacing commas with dots, before passing the values on to the state manager.
Closes #5565
2023-11-06 13:26:35 +00:00
Adrien de Peretti
f88d75b0a7
feat(product, pricing, utils): Transaction issues and reference issues ( #5533 )
...
* feat(product, pricing, utils): Transaction issues and reference issues
* fixes decorators
* cleanup
* fix product module upsert
* fix missing active manager
* increase timeout
* revert package.json
* WIP
* try another node version based on findings with memory issues with jest introduced after 16.11 but fixed in 21
* re add bail
* fix variant options
* chore: bulk create pricing
* chore: workflow bulk
* Create big-chefs-dream.md
* fix missing update for upserty
* Add integration tests for product options upsert
* rm unnecessary return
* fix product prices workflow issue
* cleanup
* fix flag
* fix model
---------
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com >
Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com >
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2023-11-06 12:24:29 +01:00
Adrien de Peretti
154c9b43bd
feat(medusa, modules-sdk, types, utils): Re work modules loading and remove legacy functions ( #5496 )
2023-11-02 17:59:13 +01:00
Kasper Fabricius Kristensen
f7e9829881
fix(admin-ui): Prevent oversized product request in Price List domain ( #5535 )
...
* fix(admin-ui): Prevent oversized product request in Price List domain
* add changeset
2023-11-02 17:05:08 +01:00
Kasper Fabricius Kristensen
8e48be58ef
fix(admin-ui): Make regions in tax setting scrollable ( #5530 )
...
* fix overflow
* intersection observer and changeset
2023-11-02 13:03:45 +01:00