Commit Graph

2858 Commits

Author SHA1 Message Date
Adrien de Peretti
1817b810fc fix(medusa): Cancel order missing refunds relation (#2976)
**What**

The order cancelation does not include the refunds relation. It means that the check of the length of the refund is never true and therefore no errors are thrown if the order contains the refunds.

**How**

Add the refunds relation and tests

FIXES CORE-976

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-01-10 09:38:59 +00:00
Riqwan Thamir
47d075351f feat(medusa): Get route for admin product categories API (#2961) 2023-01-10 10:08:16 +01:00
Oliver Windall Juhl
33b3e5f16d chore(feature-flags): Publishable Keys enabled by default (#2967) 2023-01-10 08:59:57 +01:00
Philip Korsholm
16716f5a4f feat(medusa): Create fulfillment with location (#2931)
* remove duplicate key from oas

* changeset

* initial suggestion for adding locations to fulfillments

* update migration

* re-add functionality for removing entire reservations

* fix tests

* add location when adjusting reserved inventory of a line_item

* add changest

* handle multiple reservations for a product in the same channel

* confirm inventory in stock location previous to creating the fulfillment

* fix tests after updating create-fulfillment to confirm inventory prior to creating fulfillment

* remove bugged code

* initial validation

* initial changes for review

* chekcpoint

* update validate inventory at location

* redo some unwanted changes

* typing

* update snapshots

* redo change for eslintrc

* add eslint disable

* re-order methods in interface

* assert no_notification

* iterate one time less

* add test for validation of correct inventory adjustments in case of no inventory service installation

* ensure correct adjustments for order cancellations

* remove comment

* fix tests

* fix but with coalescing

* remove location id from confirm inventory

* don't throw when adjusting reservations for a line item without reservations

* move reservation adjustments to the api

* add multiplication for updating a reservation quantity

* move inventory adjustments from the service layer to the api

* delete reservation if quantity is adjusted to 0

* rename updateReservation to updateReservationItem

* update dto fields

* reference the correct fields

* update with transaction

* add jsdocs

* force boolean cast

* context-ize cancel and create fulfillment transaction methods

* undo notification cast

* update with changes

* refactor withTransaction to variable

* use maps

* fix service mocks
2023-01-09 14:44:34 +01:00
Adrien de Peretti
28bec599ae fix(medusa): Repository util mention of entity specifics (#2965) 2023-01-09 14:18:55 +01:00
Oliver Windall Juhl
32b038fc3f feat(medusa): Reliable retrying of jobs (#2947) 2023-01-09 11:56:29 +01:00
Adrien de Peretti
e4af968531 fix(medusa): Custom repository take/skip when called without relations (#2962)
**What**
The actual behavior is that the skip/take is applied in a first query returning the correct number of results. When there is no relations, we are calling findByIds with the previously retrieved ids, but we also pass skip/take which means that no result are returned after the first increment of the skip.

The skip/take should not be applied in that case as it has already been applied.

FIXES CORE-970
2023-01-09 09:54:25 +00:00
Binzi
0f039a087a docs: Correct import products url (#2960)
Fixes broken URL in `introduction.md`
2023-01-09 10:21:56 +02:00
Riqwan Thamir
b280e53bd3 refactor(medusa): move repository specs into its own folder (#2952)
**What:**

Introduces a new folder under which repository specs will be placed. 

Why:

We don't currently have a good place to test ORM logic or custom queries against the database. The repository folder tests are a place for just exactly that. 

How:

Creates an internal package similar to other integration tests - api and plugins. 

CORE-965
2023-01-09 08:19:01 +00:00
Adrien de Peretti
baeacd1cc5 feat(medusa): Disable subscriber when no search engine is installed (#2958) 2023-01-07 15:58:06 +01:00
Sebastian Rindom
a93d5d437c chore: star prompt (#2955)
Shows a prompt to star Medusa after killing the develop server the first time:
![CleanShot 2023-01-06 at 2 30 19](https://user-images.githubusercontent.com/7554214/211022169-8a0d753e-1628-485e-9037-0e817adf5d3f.png)

The prompt will not reappear on subsequent kills.
2023-01-06 15:12:47 +00:00
Oliver Windall Juhl
8ba0addea3 chore(integration-tests): Add test for database options (#2707)
**What**
- Add integration test suite for database options
- Expose integration tests DB to additional options
- Add test for `idle_in_transaction_session_timeout`
2023-01-06 13:41:05 +00:00
Philip Korsholm
077e4d9606 remove duplicate key from oas (#2953)
**What**
- remove duplicate oas key

**Why**
- oas generation fails when duplicate keys are present
2023-01-06 09:46:23 +00:00
Shahed Nasser
39c834e043 docs: small fixes based on friction log (#2954)
* docs: small fixes

* removed python command
2023-01-06 11:40:18 +02:00
Riqwan Thamir
3f44abe01a feat(medusa): Add ProductCategory model (#2945) 2023-01-05 19:10:46 +01:00
Philip Korsholm
a153289ba3 feat(medusa): Pass location upon receiving returns (#2949) 2023-01-05 19:09:27 +01:00
Oliver Windall Juhl
0b14814d5a fix(medusa): Remove redundant redis delete call when invalidating cache entryies (#2943) 2023-01-05 19:08:14 +01:00
Adrien de Peretti
3d200c41f9 chore: refactor payment collection setPaymentSession (#2928)
**What**

Only use `setPaymentSessionsBatch` in `setPaymentSession` to reuse the logic as it is the same behavior. One for a unique session and the other one for multiple sessions.
This refactoring reduce the risk of introducing bugs when working around payment session if it needs to be changed (which is currently happening as part of the payment refactoring) and having to change it in less places instead of more and more places
2023-01-05 15:22:12 +00:00
Shahed Nasser
8ba27a2e28 docs: changed details related to new payment method signatures (#2876)
* docs: changed details related to new method signatures

* updated the information regarding update_requests

* small changes to the text

* lint fixes

* fixed constructor

* fixes based on review
2023-01-05 11:55:27 +02:00
Shahed Nasser
af7e67e827 docs: added gift card documentation guides (#2939) 2023-01-04 18:16:51 +02:00
Carlos R. L. Rodrigues
c07ffb6165 feat(medusa): Stock location module (#2907)
* feat: stock location module
2023-01-04 13:11:59 -03:00
github-actions[bot]
c62e309629 chore(docs): Generated API Reference (#2935)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2023-01-03 16:26:45 +02:00
Shahed Nasser
8263dc1906 docs: fixed oas tag of price list products endpoint (#2933) 2023-01-03 16:10:15 +02:00
Shahed Nasser
82d66408f9 docs: changed behavior of feedback component (#2929) 2023-01-03 13:09:47 +02:00
github-actions[bot]
cd32795595 chore(docs): Generated API Reference (#2927)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2023-01-03 10:40:03 +02:00
Shahed Nasser
19d7be31eb docs: added missing oas tag of uploads endpoints (#2924) 2023-01-03 10:30:23 +02:00
Yessica Bao
663a0d1a59 docs: fix wrong key for order placed in sendgrid docs (#2923)
Hello!

I just found out that the key in plugin options for Order Placed `order.placed` is wrong. It should be `order_placed_template` instead.
2023-01-03 10:27:27 +02:00
Shahed Nasser
45f7ed8d1b docs: updated steps in MinIO documentation (#2922) 2023-01-02 17:33:10 +02:00
Alex Chiu
cc10c20f35 feat(medusa): Include external_id in CreateProductInput type (#2498) 2023-01-02 10:18:10 +01:00
olivermrbl
7bc5454810 Merge branch 'master' into develop 2023-01-02 09:45:20 +01:00
Shahed Nasser
d1b4b11ff6 chore(docs): added eslint to lint documentation code blocks (#2920)
* docs: added rule for code length

* chore: fixes based on vale errors

* changed to use eslint

* fixes using eslint

* added github action for documentation eslint

* changed allowed max-length

* fixed incorrect heading level

* removed comment
2022-12-30 18:44:46 +02:00
Philip Korsholm
b9680b641f feat(medusa): Add ProductVariantInventoryService (#2883)
* add mw feature flag

* add services

* add types

* add module interfaces

* add interface export

* add models for mw

* to be ammended

* remove featureflag

* use correct count

* update cart completion strategy

* swap service conversion

* update return service

* update order service

* update claim service

* add exception to claim item

* update cart service

* add indicies

* add changeset

* nullable changes in store

* store model update

* fix unit tests

* remove old inventory service

* format integration test

* update snapshots

* remove old inventory service tests

* update snapshots

* remove old code

* option updates

* naming

* add jsdoc to pv inventory service

* rename class variables

* pr feedback

* rename option to context

* if(variant_id) instead of if(typeof varia...)

* update tests

* add jsdoc

* go for custom

* update code for readability
2022-12-30 11:30:04 +01:00
Oliver Windall Juhl
eda26f6e81 fix(medusa): Add tax inclusive flag to return lines from line item (#2909) 2022-12-29 19:32:04 +01:00
Philip Korsholm
90d774f563 tests(integration): Randomize option value name (#2918) 2022-12-29 18:15:10 +01:00
Shahed Nasser
99add15fc3 docs: added a note about watching changes (#2917) 2022-12-29 16:51:30 +02:00
Shahed Nasser
3d4e71aa45 docs: added a section to the troubleshooting guide (#2916) 2022-12-29 16:38:33 +02:00
Philip Korsholm
645e0d0ec5 Feat(medusa): search orders by customer phone and name (#2913)
* add support for customer first- and last names and phone

* test for querying customer first_name, last_name and phone

* add customer as prop for querying orders

* polishing before pr

* changeset
2022-12-29 15:20:18 +01:00
github-actions[bot]
93f4780519 chore(docs): Removed Docs Announcement Bar (automated) (#2912)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2022-12-29 09:55:52 +02:00
Shahed Nasser
123d910ef6 docs: added Manage Customers documentation (#2911)
* docs: added Manage Customers documentation

* fixed link
2022-12-28 19:36:18 +02:00
Shahed Nasser
f89759f069 docs: added Implement Customer Profiles documentation (#2910) 2022-12-28 17:43:35 +02:00
Shahed Nasser
800059bf6e docs: added Customers conceptual guide (#2908) 2022-12-27 18:01:59 +02:00
Akarsh Jain
48baf48eff docs: add git as in the prerequisites section of the Quickstart Guide (#2892)
* docs: Added git as in the prerequisites section of the Quickstart Guide

Fixes: #2850

* added divider

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-12-27 15:21:20 +02:00
github-actions[bot]
d93d337df7 chore(docs): Updated API Reference (#2903)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2022-12-26 16:30:38 +00:00
Shahed Nasser
1f1b85afbb docs: shortened summaries in API reference (#2902) 2022-12-26 18:09:22 +02:00
Shahed Nasser
035790606e docs: added missing sections (#2901)
* docs: added a link to the quickstart guide

* docs: added env variables section
2022-12-26 17:01:23 +02:00
Shahed Nasser
2916ff9861 docs: added troubleshooting docs (#2900) 2022-12-26 16:19:10 +02:00
Shahed Nasser
b0ebfd6bcf docs: added dividers + see also section (#2899) 2022-12-26 15:52:08 +02:00
Shahed Nasser
b0e5769e27 docs: added a feedback component in quickstart guides (#2894)
* docs: added a feedback component in quickstart guides

* docs: added feedback to admin docs
2022-12-23 16:54:18 +02:00
github-actions[bot]
1de91693fc chore(docs): Generated Docs Announcement Bar (automated) (#2893)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-12-23 10:21:01 +02:00
github-actions[bot]
a32a2c4cf1 chore(docs): Generated Services Reference (automated) (#2891)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
2022-12-23 10:20:47 +02:00