Commit Graph

1604 Commits

Author SHA1 Message Date
olivermrbl
384c8efb8b chore(release): Publish 2022-08-25 15:51:21 +02:00
Sebastian Rindom
9e0cb12120 fix(medusa): remove unique cart on payments to allow canceled payments to exist (#1854)
Fixes CORE-321

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-08-24 14:25:40 +00:00
Oliver Windall Juhl
5ac7f08e4d fix(medusa): Incorrect swap difference due (#2086)
### What
Creating a swap on an order with a discount leads to an incorrect difference due. 

**Scenario**
- Create a store with minimum 2 products (Prod A, Prod B)
- Create a discount that only works for Prod A
- Create an order for Prod A with the discount applied
- Create a swap between Prod A and Prod B

**Expected outcome**
We would expect the difference_due amount to come out to the sum of:
- -1 * (price of prod a - discount applied to prod a) 
- price of prod b

**Actual outcome**
Instead the discount is applied across both products when calculating difference due. This results in a total that is instead the sum of:
- -1 * (price of prod a - discount applied to prod a)
- price of prod b - discount on prod b ignoring the condition

### How
Adds `line_item.adjustments` to relations in cart retrieval prior to setting the difference_due to car total

Fixes CORE-361
2022-08-24 14:07:44 +00:00
olivermrbl
b7b0a7d3a4 Merge branch 'master' into develop 2022-08-24 12:30:33 +02:00
Frane Polić
bda83a84bc feat(medusa): Convert RegionService to TypeScript (#1914) 2022-08-22 19:59:02 +02:00
Philip Korsholm
80e02130b4 feat(medusa): Convert SystemPaymentProvider to TypeScript (#1988)
**What**
- convert system payment provider to typescript

Fixes CORE-397

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-08-22 17:37:25 +00:00
Philip Korsholm
c97ccd3fb5 feat(medusa): Convert FulfillmentService to TypeScript (#1962) 2022-08-22 19:19:41 +02:00
Kevin Antonio Rateni Iatauro
8cbebef403 feat(medusa-js): Add deleteSession endpoint (#1234) 2022-08-21 14:08:51 +02:00
Philip Korsholm
a54dc68db7 feat(medusa): Filtering Customer Orders (#975) 2022-08-21 13:26:25 +02:00
endigo
8c4be33536 feat(medusa): Add Mongolian currency tugrug (#2067) 2022-08-21 12:12:40 +02:00
Adrien de Peretti
844d7d1f5f feat(medusa): Migrate Return service to ts (#1926) 2022-08-19 17:26:12 +02:00
Oliver Windall Juhl
fb1105b9c0 fix(medusa-payment-stripe): Add item adjustments relation in CartSubcriber (#2052) 2022-08-16 19:36:57 +02:00
Oliver Windall Juhl
0ba63c70b0 fix(medusa): Complete cart with 100% discount (#2032)
**What**
Naive fix to allow carts with 100% discount to be completed.

**Why**
Discount total is wrongly calculated if `items` and `items.adjustments` is not included in relations upon retrieving the cart.

**Thought**
This is yet another example of why we need to rethink and refactor totals computation to not depend on what is provided by the user.
2022-08-16 09:21:01 +00:00
Adrien de Peretti
f1c2c6c68b feat(medusa): Implement the SC migration scripts (#2037)
**What**
Migrate the existing products to the default sales channel

FIXES CORE-434
2022-08-16 08:47:23 +00:00
Sebastian Rindom
15a5b029ae fix(medusa): join tracking links to all fulfillments in admin/orders (#2045)
Fixes https://github.com/medusajs/medusa/issues/2042
2022-08-15 11:23:36 +00:00
Adrien de Peretti
79acc38a57 feat(medusa): Simplify the transaction base service (#2007)
**What**
Simplify the transaction base service.

**How**

In fact, it does not need to be template and reduce the extensibility as the type is internally enforce. Now, the type is deduced by this which can be any derived class.
2022-08-12 09:17:39 +00:00
Adrien de Peretti
cbe2b7f687 chore(medusa): Remove intepestive services re instanciation in loop (#2036)
* chore(medusa): Renove intepestive services re instanciation in loop

* test(medusa): Fix missing deps

* fix(medusa): Missing await
2022-08-11 22:18:11 +02:00
Adrien de Peretti
c31290c911 feat(medusa): Refactor undefined check into a single util (#2024) 2022-08-10 17:45:48 +02:00
Adrien de Peretti
bd031ef7ad feat(medusa:) Convert PaymentProvider + PaymentProviderInterface to TS + (#1773)
* feat(payments): Refactor core Payment related

* fix(medusa): typings

* test(unit): fix suite

* test(unit): fix suite

* feat(medusa): Improve payment provider container typings

* fix(medusa): typings

* styles(medusa): renove comments

* feat(medusa): cleanup

* feat(medusa): Add uniq constraint on payment session and idem key on create-payment-session end point

* fix(medusa): migration

* fix(medusa): create payment session

* feat(medusa): cleanup
2022-08-10 17:26:16 +02:00
Adrien de Peretti
987ce2ab6d chore(medusa): Feature flag loader simplify, deduplicate and increase readability (#2025) 2022-08-10 13:02:26 +02:00
Oliver Windall Juhl
900260c5b9 feat(medusa,medusa-telemetry): Add telemetry on feature flags (#2017) 2022-08-09 16:27:12 +02:00
Adrien de Peretti
aaebb38eae feat(medusa): Convert IdempotencyKeyService to TypeScript (#1995)
* feat(medusa): Migrate the idempotency key service to ts + fix

* feat(medusa): Finalise idempotency migration

* Create late-owls-pump.md

* feat(medusa): Polish

* feat(medusa): Add case to the error handler

* feat(medusa): Add case to the error handler

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2022-08-09 08:08:07 +02:00
Adrien de Peretti
4b663cca3a feat(medusa): Use transactions in CartCompletionStrategy (#1968) 2022-08-08 21:11:34 +02:00
Philip Korsholm
152934f8b0 feat(medusa): Convert ShippingProfileService to TypeScript (#1963) 2022-08-08 16:51:55 +02:00
Shahed Nasser
cef081d2f2 docs: Change :id to {id} in OAS comments (#2015) 2022-08-08 16:35:13 +02:00
chemicalkosek
40ae53567a feat(medusa-payment-stripe): Add support for Przelewy24 and Blik (#1982) 2022-08-08 13:02:33 +02:00
Richard Ward
2a723dcd4f feat(medusa-react): Add Collection batch (remove, add) endpoints (#1959) 2022-08-08 12:58:23 +02:00
Richard Ward
a88bf3c76e feat(medusa-js): Add Collection batch (remove, add) endpoints (#1958) 2022-08-07 13:22:36 +02:00
Philip Korsholm
11fab121f4 feat(medusa): Convert OauthService to TypeScript (#1983) 2022-08-07 13:15:20 +02:00
Philip Korsholm
42ed209518 feat(medusa): Convert CollectionService to TypeScript (#1976) 2022-08-07 12:06:36 +02:00
Shahed Nasser
73383cc466 chore(docs): Refactor API Reference (#1883) 2022-08-05 14:06:12 +02:00
Shahed Nasser
02d5c1da88 docs: update Typedoc and regenerate references (#1994)
* generated new services reference

* changed from automatic push to automated pull request

* updated typedoc, regenerated JS Client reference

* regenerated the reference after updating typedoc

* added action for js client
2022-08-04 17:29:52 +03:00
olivermrbl
6663a6290b chore(release): Publish 2022-08-04 14:12:54 +02:00
Philip Korsholm
3cde817482 fix(medusa-file-minio): Add missing path import (#1991) 2022-08-04 12:35:30 +02:00
Adrien de Peretti
badda5233c fix(medusa-js): Allow payload in DELETE and POST (#1985) 2022-08-04 11:47:54 +02:00
olivermrbl
bc7c2d9c4a chore(release): Publish 2022-08-03 18:34:24 +02:00
olivermrbl
77ef28d274 Merge branch 'master' into develop 2022-08-03 18:03:14 +02:00
Shahed Nasser
948a9f1188 docs: fixes to the meilisearch docs (#1979) 2022-08-03 14:27:23 +03:00
Philip Korsholm
87fc18137d Feat(medusa): Convert middleware service to typescript (#1936)
Fixes CORE-351
2022-08-02 12:43:55 +00:00
Philip Korsholm
6251aecdaa Feat/convert return reason service to typescript (#1961)
**What**
- Convert return reason service to typescript

Fixes CORE-355
2022-08-02 11:40:11 +00:00
Adrien de Peretti
b603f7dc8f chore(medusa): Add transaction on mutation actions (2) (#1855)
**What**
Wrap all actions that require the usage of an atomic phase into a transaction from the handler

**Info**
The following end points have been removed since that they rely on non existing stuff and can't be used and are not used
admin - create-order
admin - delete order metadata
admin - set region metadata
admin - remove region metadata

Fixes CORE-358
2022-08-02 10:23:01 +00:00
Philip Korsholm
d530ac23d6 Feat(medusa): Convert inventory service to ts (#1937)
Fixes CORE-350
2022-08-02 09:56:57 +00:00
Adrien de Peretti
051bb16dd7 chore(medusa): Add transactions in mutating actions 2 (#1853)
* chore(medusa): Add transaction on mutation actions

* chore(medusa): continue refactoring

* chore(medusa): continue refactoring

* chore(medusa): continue refactoring

* feat(medusa): update invite service mock to provide a withTransaction

* feat(medusa): Include pr feedback

* feat(medusa): Cleanup idempotent places

* feat(medusa): Cleanup idempotent places

* feat(medusa): Better Cleanup idempotent places

* feat(meudsa): cleanup transaction

* fix(medusa): Create cart transaction usage

* fix(medusa): Use the right variable

* fix(medusa): Use the right variable

* fix(medusa): Transaction usage in cart creation flow
2022-08-02 10:04:43 +02:00
Shahed Nasser
f5a42c43fd docs: improved segment documentation (#1956) 2022-08-01 17:50:30 +03:00
Adrien de Peretti
b54d5178c9 feat(medusa): Migrate and fix order service (#1894)
* feat(medusa): Migrate and fix order service

* fix(medusa): Order service pass Payment instead of the session:

* fix(medusa): Remove unnecessary method in the client library

* test(medusa): Fix unit tests

* test(medusa): Fix unit tests

* fix(medusa): Typo

* test(meduas): fix unit test

* feat(medusa): Update base service used and missing transaction

* test(meduas): fix unit test

* fix(medusa): cleanup and missing transaction

* fix(medusa): missing withTransaction on some mocks

* feat(medusa): Update order service method visibility

* include feedback

* feat(medusa); revert order payment status"

* test(medusa): fix unit

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-08-01 11:01:17 +02:00
Oliver Windall Juhl
1998902a94 fix(medusa-js): Use correct customer payment methods path (#1934) 2022-07-28 20:43:42 +02:00
Adrien de Peretti
3b28998421 feat(medusa): Create/update Product Sales Channels (#1870)
* feat(medusa): Allow to create/update object sales channels assignment

* feat(medusa): cleanup

* feat(medusa): Update oas

* feat(medusa): Only add relation if required

* feat(medusa): Add feature flag decorators

* style(medusa): PR feedback

* feat(medusa): Remove circular by moving sales channel product existence check to the repo layer

* feat(medusa): Reduce selected column as they are not necessary

* feat(medusa): Refactor repository and usage

* feat(medusa): Improve entity name formatting

* feat(medusa): Add feature flag to the service

* fix(medusa): typo

* test(medusa): fix unit tests

* feat(medusa): include feedback

* feat(medusa): Adds validator pipe for Sales Channel existence (#1930)

* feat(medusa): Allow to create/update object sales channels assignment

* feat(medusa): cleanup

* feat(medusa): Update oas

* feat(medusa): Only add relation if required

* feat(medusa): Add feature flag decorators

* style(medusa): PR feedback

* feat(medusa): Remove circular by moving sales channel product existence check to the repo layer

* feat(medusa): Reduce selected column as they are not necessary

* feat(medusa): Refactor repository and usage

* feat(medusa): Improve entity name formatting

* feat(medusa): Add feature flag to the service

* fix(medusa): typo

* test(medusa): fix unit tests

* feat(medusa): Adds validator pipe for Sales Channel existence

* feat: Move product payload classes to types file

* fix unit tests

* fix integration test

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>

* feat(medusa): Revert base repository and related

* feat(medusa): cleanup

* remove base repo export

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-07-28 20:19:30 +02:00
Philip Korsholm
5ce8839c54 add is_disabled to create sales channel (#1928)
**What**
- include `is_disabled` when creating a sales channel

**Why**
- To enable creation of draft sales channels
2022-07-28 14:17:11 +00:00
Frane Polić
97c48a5ab9 feat: invalidate product list hooks (#1931)
**What**
- invalidate cache on prodcut list hooks when a product is added/removed to/from a sales channel
2022-07-28 14:01:35 +00:00
Adrien de Peretti
7cb8095ed4 chore(medusa): Add transactions in mutating actions in store domain (#1858) 2022-07-28 11:48:55 +02:00