Commit Graph
2482 Commits
Author SHA1 Message Date
Adrien de PerettiandGitHub 48411157b1 feat(medusa): Support batch remove resources on discount condition (#2444)
**what**
- Add support to remove resources by batch on discount conditions
- Add support on medusa-js and medusa-react

**Tests**
- Add integration tests to validate that the resources have been deleted and the length is the one expected
- Add unit tests on medusa react

FIXES CORE-609
2022-10-17 09:03:38 +00:00
Adrien de PerettiandGitHub 765a2cccda Feat/add discount condition batch (#2430)
* feat(medusa): Allow to add items to a discount condition by batch + cleanup of discounts and discount conditions end points

* style(medusa): cleanup catch and log

* feat(medusa-react, medusa-js): Add support to add item batch to discount condition

* cleanup

* cleanup

* rename items to resources

* fix(medusa-js): url

* Create fast-suns-repair.md

* update naming

* tests(integration): Update tests to reflect API changes

* feat(medusa): Delete a condition should be idempotent on discount and condition

* revert
2022-10-13 16:34:06 +02:00
143f8543e5 feat(medusa, medusa-js, medusa-react): Support listing order edits (#2436)
* feat(medusa, medusa-js, medusa-react): Support listing order edits

* feat(medusa): Update OAS

* fix oas

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-10-13 14:44:08 +02:00
Kasper Fabricius KristensenandGitHub 69e579758f fix(medusa, medusa-js): Use price selection strategy for GET /admin/variants (#2270)
**What**
- Adds the use of price selection strategy to the endpoint `GET /admin/variants`
- Updates medusa-js to reflect this change (expanding the parameters).

**Testing**
- Adds a new integration test validating that returned variants are now of type PricedVariant, with the expected fields: original_price, calculated_price, etc.

**Why**
- Our current RMA flows (in our admin dashboard) relied heavily on simply using `order.tax_rate` to calculate variant prices in the different RMA menus. As taxes in Medusa, have become feature complete this approach had become very naive and has several potential issues. Moving the responsibility for calculating the correct prices guarantees that we always show the correct prices to admins.
2022-10-13 08:54:03 +00:00
Kasper Fabricius KristensenandGitHub 211720f24c fix(medusa): List products by type_id (#2427)
**What**
- Fixes `GET /products` in both admin and store API so they no longer accept the param `type?: string`, but instead accept `type_id?: string[]`

**Why**
- Filtering by type would never return any products as `ptyp_:id` !== `ProductType`.

**Testing**
- Added an integration test for each endpoint.

Closes CORE-695
2022-10-12 18:56:56 +00:00
05f921711f fix(medusa): Product import - allow null product type (#2424)
**What**
- allow the product type field to be null

**How**
- in case the type is `null`, pass `undefined` as the value of type prop to product create/update services, otherwise pass an object with `{value}` which will be upserted

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-10-12 12:43:41 +00:00
Philip KorsholmandGitHub bb75a0bc5e fix(medusa): Ensure no orphan product option values (#2408) 2022-10-12 12:48:50 +02:00
Frane PolićandGitHub 69ef713854 fix(medusa): remove changes when deleting order edits (#2420)
**What**
- when deleting an OE cloned items are deleted, this would fail if there were changes associated with the OE since line items were referenced from the item changes and couldn't be deleted

**How**
- when deleting an order edit also remove it's item changes

Fixes CORE-689
2022-10-12 08:04:29 +00:00
Sebastian RindomandGitHub 196595cb65 fix(medusa-dev-cli): Avoid dev cli auth (#2360) 2022-10-12 09:45:45 +02:00
olivermrbl 5efbee32b9 Merge branch 'master' into develop 2022-10-12 09:30:15 +02:00
olivermrbl 93bf1118eb chore(release): Publish 2022-10-12 09:29:39 +02:00
olivermrbl 5cb7618a22 chore: Add changeset for medusa-core-utils 2022-10-12 09:27:25 +02:00
Adrien de PerettiandGitHub c717442451 feat(medusa): Allow to filter collections by discount condition id (#2411) 2022-10-11 16:14:10 +02:00
Shahed NasserandGitHub f1605ae2a1 docs: migrated from javascript to typescript (#2398) 2022-10-11 16:36:08 +03:00
Shahed NasserandGitHub 2ac8d8e979 docs: added a note about generate command (#2418) 2022-10-11 16:33:21 +03:00
Shahed NasserandGitHub 8ca9354c50 docs: updated js client reference (#2414)
* docs: updated js client reference

* docs: fixed link
2022-10-11 16:32:41 +03:00
b3ebc78b95 chore(docs): Generated Entities Reference (automated) (#2415)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2022-10-11 16:11:35 +03:00
10b9b0dc49 chore(docs): Generated API Reference (#2417)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2022-10-11 16:11:11 +03:00
Shahed NasserandGitHub c4c83c9717 docs: fixed some types in oas comments (#2413) 2022-10-11 16:05:39 +03:00
Shahed NasserandGitHub 53e34d33d9 docs: update announcement version (#2412) 2022-10-11 14:58:02 +03:00
Frane PolićandGitHub 308b99cc5d fix(medusa-react): OrderEdit add item hook renaming (#2392) 2022-10-11 12:28:24 +02:00
Adrien de PerettiandGitHub a9c703d56c feat(medusa): Allow to query product tags by condition id (#2340) 2022-10-11 11:24:50 +02:00
Shahed NasserandGitHub 18e7f57852 docs: added how-to use sales channels guide (#2345)
* docs: added how-to use sales channels guide

* fix link

* docs: added link to sidebar
2022-10-11 11:42:56 +03:00
Shahed NasserandGitHub 8ec89d0977 docs: added user guide for import prices (#2268) 2022-10-11 11:06:02 +03:00
Shahed NasserandGitHub 7c30c249dc docs: added import prices how-to (#2266) 2022-10-11 11:05:37 +03:00
Shahed NasserandGitHub 78e7361f7e docs: added missing date typecast in release script (#2409) 2022-10-11 10:43:40 +03:00
Shahed NasserandGitHub 14d4b9d95c chore: generate API reference (#2410) 2022-10-11 10:30:45 +03:00
Adrien de PerettiandGitHub 94c242f476 feat(medusa): Allow to filter customer groups by discount condition id (#2346) 2022-10-11 08:39:21 +02:00
Adrien de PerettiandGitHub 19ca18e71c feat(medusa): Allow to query product types by discount condition id (#2359) 2022-10-11 08:36:08 +02:00
9aeda1b52d chore(docs): Generated Docs Announcement Bar (automated) (#2401)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-10-10 19:32:13 +03:00
5f8cb35b1b chore(docs): Generated Entities Reference (automated) (#2400)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-10-10 19:31:48 +03:00
23bf4eb192 chore(docs): Generated Services Reference (automated) (#2399)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-10-10 19:31:16 +03:00
olivermrbl 35df4962f8 chore(release): Publish 2022-10-10 18:02:50 +02:00
olivermrbl 8f4135fd5f chore: Add changeset for medusa-file-s3 2022-10-10 17:57:26 +02:00
olivermrbl e3c77c1458 Merge branch 'master' into develop 2022-10-10 17:56:54 +02:00
Shahed NasserandGitHub d794c9b86c docs: fixed search url error (#2397) 2022-10-10 16:28:39 +03:00
Shahed NasserandGitHub 9bc57abca3 docs: combine endpoints documentations (#2396)
* docs: combined endpoint docs

* fixed links
2022-10-10 15:55:39 +03:00
Shahed NasserandGitHub a23ecf4724 docs: removed emojis (#2394) 2022-10-10 13:43:36 +03:00
Shahed NasserandGitHub f72bf5e958 docs: added Strapi version (#2391) 2022-10-10 10:20:25 +03:00
Alex ChiuandGitHub 0276e710e4 docs: fix typos (#2387) 2022-10-10 10:20:04 +03:00
Philip KorsholmandGitHub 053206a390 fix(medusa-file-s3, medusa): Add S3 export support (#2380) 2022-10-08 18:09:01 +02:00
Sebastian RindomandGitHub a908a7716c fix(medusa-payment-klarna, medusa-payment-stripe, medusa-payment-paypal): Totals calculation (#2381) 2022-10-08 10:53:19 +02:00
Frane PolićandGitHub 5f2bc975cb fix(medusa): Allow edits relation on order retrieval (#2384) 2022-10-07 15:45:28 +02:00
Sebastian RindomandGitHub 46bd861c2a fix(medusa): improve list shipping option (#2383) 2022-10-07 15:43:03 +02:00
Shahed NasserandGitHub 63d514494b docs: added google analytics (#2382) 2022-10-07 15:29:45 +03:00
Shahed NasserandGitHub 52347c31bc docs: updated how-to docs to be more consistent (#2379)
* docs: updated how-to docs to be more consistent

* fixed links
2022-10-07 13:21:07 +03:00
d8a5942d3d fix(medusa) : Improperly referenced product id in product import strategy (#2351)
* What - fixing PR #2350 

* Why - In the ProductImportStrategy class, the getImportInstructions improperly checks the product.id for each row. With it setup this way, products will always be considered new because the product.id column is not read here. So products will never be updated. [Link to the code line](https://github.com/medusajs/medusa/blob/bd941309161bcee4fbfc7918d310c426ba8d8f15/packages/medusa/src/strategies/batch-jobs/product/import.ts#L166)

* How - Replacing `row["product.product.id"]` to  `row["product.id"]`

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-10-07 09:36:36 +00:00
Sebastian RindomandGitHub 3d255302b0 fix(medusa): Optimize Cart totals calculation (#2372)
**What**

The existing totals calculations are extremely heavy and perform an enormous amount of duplicate work. The changes here remove large parts of the overhead and improves response times for cart endpoints up to 30x.
2022-10-07 08:44:06 +00:00
Philip KorsholmandGitHub 527c587d8f feat(medusa): Add difference due to OrderEdit totals (#2352) 2022-10-07 10:21:13 +02:00
Carlos R. L. RodriguesandGitHub d0f274dbe7 feat(medusa): PaymentCollectionService (#2365) 2022-10-07 09:37:10 +02:00