Commit Graph

2308 Commits

Author SHA1 Message Date
Philip Korsholm
3a38c84f88 feat(medusa,inventory,types): Expand list-reservation capabilities (#3979)
**What**
- Add filter capabilities to reservation items based on: 
  - description query: "contains", "startsWith", "endsWith", "equals"
  - date querying

**How**
- Introducing a new filtering primitive: "StringSearchOperator" resembling the "dateComparisonOperator"

Fixes CORE-1373
2023-05-24 09:54:25 +00:00
Tomek Pur
ddc90db530 feat(medusa-plugin-mailchimp): Migrate to TS + add update endpoint (#4040)
* - Refactored the .js files to .ts files
- Added typing
- Used 'WrapHandler' util instead of specific middleware in plugin
- Added additional PUT method to the /mailchimp/subscribe endpoint.
- Updated documentation where relevant.

* Added changeset

* Updated yarn.lock

* Used camelcase for method args in services/mailchimp.ts

---------

Co-authored-by: Tom Rupke <tom@adapptive.nl>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-05-23 13:33:56 +02:00
Philip Korsholm
5c01b4e6b6 fix(inventory): Use correct table name in migration (#4155)
* whoops

* add changeset
2023-05-23 12:42:21 +02:00
Philip Korsholm
4f3c8f5d70 feat(admin-ui,medusa): Reservations management (#4081)
* add location filtering to list-location levels

* cleanup

* add location filtering to list-location levels

* cleanup

* Initial work on route,table,new reservation form

* generated types

* add block

* udpate clients

* initial create reservation

* update actionables for reservation table

* update edit-allocation modal

* misc naming updates

* update reservations table

* add expand capabilities for list-reservations

* expand fields and show columns

* update oas

* make remove item work in focus modal

* add yarn lock

* add integration test

* Fix display when label doesn't match search term

* remove unused file

* Update packages/admin-ui/ui/src/components/templates/reservations-table/components/reservation-form/index.tsx

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/admin-ui/ui/src/domain/orders/details/allocations/edit-allocation-modal.tsx

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/admin-ui/ui/src/components/templates/reservations-table/new/index.tsx

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* initial changes

* add changeset

* update font size

* cleanup reservations table + select

* add decorated inventory item type

* use type

* feedback changes

* Update packages/admin-ui/ui/src/components/molecules/item-search/index.tsx

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>

* decorate response for list inventory item to include total quantities

* update decorated properties

* decorate type

* adrien feedback

* Update packages/generated/client-types/src/lib/models/DecoratedInventoryItemDTO.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* update join-utils

* fix caching

---------

Co-authored-by: Rares Capilnar <rares.capilnar@gmail.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2023-05-23 05:24:28 +02:00
Philip Korsholm
0476f52519 Feat(medusa, admin-ui): Update edit allocation modal (#4071)
* update edit-allocation modal

* add changeset

* update edit-allocation modal

* update allocation modal
2023-05-22 15:58:51 +02:00
Adrien de Peretti
c0e527d6e0 chore(medusa): Align build query utils (#4148) 2023-05-22 15:14:14 +02:00
Adrien de Peretti
bf18bd0c8a feat(medusa): Revert pricing service setVariantPrices API (#4130) 2023-05-22 12:23:54 +02:00
Oliver Windall Juhl
c4aae6b976 feat(medusa-file-local): Local file storage plugin (#4118)
Simple local file storage to eliminate/reduce friction related to file services when developers are trying out Medusa for the first time
2023-05-22 09:11:38 +00:00
Philip Korsholm
eba21d9c5f feat(medusa-plugin-contentful): Initial implementation of inventory module (#3991)
* cleanup contentful plugin

* initial implementation of inventory module in contentful

---------

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2023-05-18 10:12:34 +02:00
Carlos R. L. Rodrigues
e73c3e51c9 feat(modules-sdk): Module as singleton instances (#4065) 2023-05-18 10:12:18 +02:00
Adrien de Peretti
ed382f2ee5 feat(medusa): Improve prices flow (#3703) 2023-05-18 08:55:28 +02:00
Didier Guyon
186b7d2773 fix(medusa-payment-stripe): Added withTransaction to capturePaymentIfNecessary (#3930)
* Added withTransaction to capturePaymentIfNecessary

* Removed catch from idempotencyKey.retrieve in completeCartIfNecessary

* Synced with upstream develop branch

---------

Co-authored-by: Didier Guyon <didierguyon@Didiers-MacBook-Pro.local>
Co-authored-by: pepijn-vanvlaanderen <pepijn@webbers.com>
2023-05-18 08:46:09 +02:00
Oliver Windall Juhl
a91987fab3 feat(medusa): Remove sqlite support (#4026) 2023-05-17 12:13:36 +02:00
Juan Zapata Gomez
e2d29d35c4 feat(plugins): Pass Config Modules to plugins (#4094) 2023-05-17 09:34:31 +02:00
Philip Korsholm
2945769497 fix(admin-ui): Allow backorder update on variants (#4051) 2023-05-16 17:28:45 +02:00
Philip Korsholm
4fb443c0ea feat(medusa): Add location id filtering to list location levels (#4066)
**What**
- add capabilities for filtering locations by id when listing locations for an inventory item
2023-05-16 12:21:53 +00:00
github-actions[bot]
0be70113f9 chore: Version Packages (#4074)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-16 11:03:47 +02:00
Adrien de Peretti
9518efccae fix(medusa): Product repo typeorm issues (#4084)
* fix(medusa): Product repo typeorm issues

* chore: fixed category scopes

* WIP fix categories

* fix product repo to attach categories

* fix uni tests

* Create eighty-icons-exercise.md

* revert package.json

* fix change set

* last fixes

* cleanup iteration

* fix repository deep relations joining aliasing

* improve response time

* improve category test case

* fix free texts search

* fix repo

* centralise repository manipulation into utils and use the utils in the product repo

* fix product repo

* fix customer group

* update changeset

* fix customer group

* include feedback

* fix repo

* remove query strategy

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2023-05-16 09:36:52 +02:00
Adrien de Peretti
cdbac2c840 feat(medusa,utils): Add support for multiple where condition on the same column (#4046) 2023-05-15 21:04:03 +02:00
Oliver Windall Juhl
a86f0e815a chore(medusa): Expose ioredis options (#4073)
* chore(medusa): Expose ioredis options

* Create empty-clocks-tease.md
2023-05-15 18:56:23 +02:00
Oliver Windall Juhl
a666462333 feat(medusa): Cart custom query strategy (#4083) 2023-05-12 14:06:55 +02:00
Oliver Windall Juhl
6511959e23 chore: Revert to official Typeorm package (#4072) 2023-05-11 13:08:38 +02:00
Lacey Pevey
cfcd2d54fd fix(medusa-oas-cli): Add separator after tmpdir base (#3924)
* add separator after tmpdir base

* Create late-badgers-do.md

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-05-11 12:32:55 +02:00
github-actions[bot]
a8f43055db chore: Version Packages (#4020)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-09 15:49:04 +02:00
Riqwan Thamir
aa74ebb181 fix(admin-ui): ensure that sales channel names are always an array (#4049) 2023-05-09 12:25:43 +02:00
Kasper Fabricius Kristensen
2829537592 fix(admin-ui): Template download path (#4050)
* pin react-router-dom

* fix template download path

* add changeset
2023-05-09 12:13:54 +02:00
Philip Korsholm
353fc94e4f feat(admin-ui): Manage inventory toggle (#4041) 2023-05-08 18:44:27 +02:00
Lacey Pevey
1ea57c3a69 chore(utils): update class-validator to 0.14.0 (#4032)
* update class-validator to 0.14.0 in utils package

* Create new-jokes-relax.md

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-05-08 18:29:31 +02:00
Shahed Nasser
a8887cd02f docs: added idempotency key documentation (#4039) 2023-05-08 19:21:07 +03:00
Frane Polić
a8e73942e6 feat(medusa): handle product categories in import/export strategies (#3842)
**What**
- add ProductCategories to import and export strategies
- refactor ProductCategoriesService methods to use "retrieve_" pattern

---

RESOLVES CORE-1275
2023-05-08 08:58:11 +00:00
Frane Polić
0c58ead6d8 fix(medusa): Validate customer_id when completing a cart (#3967) 2023-05-07 13:12:06 +02:00
Philip Korsholm
eff9f4c6f9 chore(medusa-plugin-contentful): Cleanup plugin (#3990) 2023-05-07 13:01:12 +02:00
patpich
3d6bcaaf65 fix(medusa): ShippingOptionService.list method param type (#4018)
## What

Fix typing on ShippingOptionService.list selector parameter

## Why

A backend server interfacing with the `ShippingOptionService.list()` method will throw TS error when attempting to pass selector values that should be valid.

## Steps to reproduce

* In a IDE that can display TS errors
* Create an instance of the ShippingOptionService
* Call the `list()` method on the instance with the following selector parameter: `{ region_id: "foobar" }`
* Expect: No TS error
* Actual: `TS2345: Argument of type '{ region_id: string; }' is not assignable to parameter of type 'Selector<ShippingMethod>'.`

## How

* Change the `selector` type to `Selector<ShippingOption>`
2023-05-07 10:52:45 +00:00
Adrien de Peretti
cff54d7325 fix(medusa-payment-stripe): Catch on idempotency key retrieve if not found (#4025)
**What**
In case the idempotency key is not found, an error will be thrown. We actually want to catch this error and create the key if it does not exists
2023-05-05 14:54:38 +00:00
patpich
ff37cd190f fix(search): add missing default product relations (#4008)
* fix(search): add missing default product relations

Add missing default product relations for events calling SearchService.addDocuments

For the following events: `ProductService.Events.UPDATED,  ProductVariantService.Events.CREATED, ProductVariantService.Events.UPDATED]`,
`SearchService.addDocuments` will fail due to `product` missing its `variants` relations.

The issue can be observed with the Algolia plugin where `reduce` is being attempted on `product.variants`.
https://github.com/medusajs/medusa/blob/develop/packages/medusa-plugin-algolia/src/utils/transformer.ts#L14

Implement the same retrieve pattern as `handleProductCreation` method.

* chore(changeset): patch

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-05-05 13:04:56 +02:00
Derek Wene
bd53adb238 fix(medusa): has-changes (#4023)
* fix(medusa): has-changes

* add changeset
2023-05-05 11:05:20 +02:00
Philip Korsholm
7fd22ecb4d feat(client-types, types, medusa, inventory): Inventory item and reservation item datamodel updates (#3971)
* add fields

* add title in migration

* update api endpoints to reflect datamodel changes

* update migration exports for inventory module

* add changeset

* add created_by for reservation item
2023-05-04 17:25:48 +02:00
github-actions[bot]
6b2bcc1a36 chore: Version Packages (#3942)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-04 10:51:13 +02:00
Oliver Windall Juhl
284f1eed9a fix(medusa): Only set product availability + prices if requested (#4010)
* fix(medusa): Only set product availability if variants are requested

* Add checks to get products as well

* Create nasty-fans-suffer.md
2023-05-04 09:29:13 +02:00
Adrien de Peretti
0e488e71b1 fix(medusa, types, utils, event-bus-local): Revert retrieveSubscribers (#4002)
* fix(medusa, event-bus-redis, event-bus-local): Revert retrieveSubscribers as the wildcard prevent us from filtering

* Create calm-eggs-collect.md

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-05-03 18:55:45 +02:00
Philip Korsholm
d2443d83e6 initial create-swap with sales channel (#3998) 2023-05-03 17:03:33 +02:00
Kasper Fabricius Kristensen
a7adb8fbf4 fix(admin-ui): Pin react-router-dom (#3999)
**What**
- Pins the version of `react-router-dom` to `6.8.0` as the upgrade to `6.11.0` broke usage of `useNavigate` in nested routes.
2023-05-03 14:31:18 +00:00
Shahed Nasser
b8e976ecab docs: added how to manage user profile guide (#3997) 2023-05-03 16:41:45 +03:00
Kasper Fabricius Kristensen
596566a510 fix(admin-ui): Navigating to tax settings should not break URL (#3989)
* fix navigation to taxes page, and switch out react-helmet with react-helemt-async

* add changeset

* pinpoint react-hot-toast
2023-05-03 13:40:04 +02:00
Leon Alvarez Del Canto
6c0dcc20c9 docs: fix create category curl example (#3962)
* Fix create category curl example

Fix trailing comma on category create example

* Update create-product-category.ts

Fix trailing comma example

* Update manage-categories.mdx

remove trailing comma

* Revert

* Update manage-categories.mdx

Fix curl example
2023-05-03 14:36:09 +03:00
Philip Korsholm
9838723192 fix(medusa): Performance improvement for variant availability (#3921)
**What**
- refactor availability invocations to only do one call to the inventory module

@adrien2p would love to run through some tests of this with you and get your take on approach
2023-05-03 09:17:55 +00:00
Oliver Windall Juhl
b7a7826394 feat(medusa): Use query relation load strategy on Carts (#3984) 2023-05-02 21:10:44 +02:00
Riqwan Thamir
4e8045a0ac fix(medusa): Use query relation load strategy on Products (#3926)
* fix(medusa): products retrieve uses query strategy for performance

* chore: packaged version of medusa typeorm fix

* chore: update path

* chore: stock locations uses typeorm version

* chore: resolve typeorm to medusa package

* chore: Update medusa project in CI action

* chore: temp disable transaction timeout for plugins

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: olivermrbl <oliver@mrbltech.com>
2023-05-02 19:37:44 +02:00
Oliver Windall Juhl
d539c6feeb chore: Bump Typeorm to Medusa fork (#3981)
* chore: Bump typeorm to medusa fork

* Update types + utils

* Bump integration test suites

* Create good-parents-prove.md
2023-05-02 14:37:19 +02:00
Philip Korsholm
0c30d05cf3 fix(admin-ui): allocated badge for orders with statuses cancelled and archived (#3950)
* fix allocated badge for orders with statuses cancelled and archived

* add changeset
2023-05-01 09:48:51 +02:00