Commit Graph

2284 Commits

Author SHA1 Message Date
olivermrbl
5ea1d98aa7 Merge branch 'master' into develop 2022-09-06 09:44:11 +02:00
Oliver Windall Juhl
e707b46499 fix(medusa-plugin-meilisearch): Update meilisearch dependency (#2140) 2022-09-05 18:15:09 +02:00
Oliver Windall Juhl
ad717b9533 chore(medusa): Remove deprecated dependency @hapi/joi (#2069) 2022-09-05 16:03:06 +02:00
Frane Polić
ba6416f095 feat(medusa): Convert SwapService to TypeScript (#2000)
**What**
- refactor swap service to typescript
- reimplement legacy methods
- use enums instead of magic strings

RESOLVES CORE-396

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-09-05 13:37:47 +00:00
github-actions[bot]
a1350bfaec chore(docs): Generated API Reference (#2143)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-09-05 10:23:46 +03:00
Shahed Nasser
4961aece1c docs: Add request and error examples (#2109) 2022-09-04 20:08:05 +02:00
Frane Polić
546a963f7b feat: import strategy - sales channels support (#2124)
**What**
- add support for specifying sales channel with import strategy
- additional:
  - refactor SC service to use `retrieve_` pattern
  - fix: pass arguments from `startServerWithEnvironment` to setup server
  - fix: minio undefined resolve/reject calls
  - fix: csv parser - detect missing columns from schema only if the column is required

**How**
- extending schema to expect sales channels columns in an import CSV file

RESOLVES CORE-304
2022-09-02 11:28:43 +00:00
Shahed Nasser
c0a002b262 docs: added link to user guide (#2129) 2022-08-30 17:04:19 +03:00
Shahed Nasser
f3170ba529 docs: rearrange user guide (#2127)
* added lists guide

* restructure existing guides

* added new pages after restructuring

* added blank pages + rearranged sidebar
2022-08-30 16:22:06 +03:00
Shahed Nasser
5a68665f33 docs: fix problem in starter URLs (#2128) 2022-08-30 16:21:46 +03:00
Oliver Windall Juhl
d14a0398fb fix(medusa): Delete ProductOption on Product without Variants (#1846)
**What**
Solves admin issue [166](https://github.com/medusajs/admin/issues/166)

Deleting a product option on a product without variants currently throws, because we are cleaning up variant options as well.  

**How**
Only do variant clean up, if product has variants
2022-08-29 18:51:45 +00:00
olivermrbl
37056b8066 Merge branch 'master' into develop 2022-08-29 18:51:34 +02:00
olivermrbl
2e1f5bffa0 chore(release): Publish 2022-08-29 18:39:07 +02:00
olivermrbl
b1e2830fb2 Merge branch 'master' into develop 2022-08-29 15:47:17 +02:00
Carlos R. L. Rodrigues
846ae637e2 fix(medusa): Hot reloading on Windows (#2105) 2022-08-29 15:46:15 +02:00
Oliver Windall Juhl
6a62a8f1ed chore: Remove lerna (#2116)
**What**
- Removes `lerna` as we are now using `changesets` + Turborepo to handle builds and releases
2022-08-29 13:26:58 +00:00
github-actions[bot]
4c18c9251c chore(docs): Generated Entities Reference (automated) (#2122)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2022-08-29 15:13:25 +03:00
github-actions[bot]
b98a09dd9f chore(docs): Generated API Reference (#2120)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2022-08-29 14:39:35 +03:00
Shahed Nasser
076b41bb89 fix(docs): API reference bugs (#2119)
* fixed shipping method tax line schema name

* added dry run option to build openapi script

* fixed summary of endpoints

* fixed title of endpoint
2022-08-29 14:25:17 +03:00
Shahed Nasser
890732d238 docs: fixed middleware used in the Storefront endpoint documentation. (#2118) 2022-08-29 13:45:55 +03:00
Trang Le
7fd65b1a41 docs: add instruction for setting up PostgreSQL with Docker (#2103)
* docs: set up Postgre with Docker

* docs: link to installing Postgres with Docker

* docs: add tab for Docker

* docs: remove link to setting up Postgres with Docker

* docs: make sure Docker Desktop is running

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* docs: break commang flags into bullet list items

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-26 14:20:15 +03:00
olivermrbl
3a44dd5726 Merge branch 'master' into develop 2022-08-26 13:17:55 +02:00
Frane Polić
03221c4a19 feat: product import strategy (#1706)
* init: copy PI files

* feat: add subscribers, refactor strategies folder

* wip: strategies integration tests package

* fix: rename

* wip: use redis

* wip: use redis deps, redis setup in local tests

* fix: naming collision, medusa config

* fix: typing, update apply changes for new event ordering and reimplement interface

* feat: make redis container run in integration tests

* fix: missing yarn lock

* feat: redis setup v2

* fix: setup server imports

* fix: a lot of integration issues

* fix: a lot of integration issues v2, transform tags, fix `ops` object parsing

* wip: parsing product options

* feat: creating product and variants works, processing product/variant options, update schema

* fix: query keys, logic for finding existing variant

* fix: types

* feat: update product variant's options

* feat: parse MA records

* feat: creating/updating MA records, region detection, error handling

* feat: throw an error when creating an MA for nonexistent region

* refactor: remove unused methods

* refactor: use provided ids to track records, extract a couple of methods

* refactor: remove unused method

* refactor/wip: add initial comment for main methods

* refactor: replace usage of RedisJSON functionality with basic k/v api

* feat: async progress report

* types: define more precise types, cleanup

* feat: error handling

* feat: unit testing preprocessing

* feat: integration testing for CI, fix legacy bug where user is unable to create a variant if regional price is also sent as payload, add csv for integration tests

* fix: error throw for logs

* feat: add product endpoint snap

* refactor: remove log

* feat: add snaps, rebase

* refactor: add comments

* feat: snap update

* refactor: typo

* refactor: change error handler

* feat: Redis cleanup after the job is done

* testing :fix product unit test, remove integration snap, add inline object matcher

* testing: fix obsolete snaps

* refactor: update comments

* fix: rebase issue

* fix: rebase issue v2, remove log form an integration test

* fix: try reverting setup server

* fix: insert variants test

* refactor: don't pass tx manager, refactor methods

* refactor: don't use regionRepo, add `retrieveByName` to region repo

* refactor: don't use productRepo

* refactor: don't use `productVariantRepo`

* refactor: remove repo mocks from unit tests

* fix: product import unit tests

* feat: file cleanup on finalize, kill test logs

* wip: use files to persist ops instead of redis, move strategy class into `batch-job` folder

* fix: minio delete method, add file cleanup method to import, fix promise coordination

* fix: replace redis methods

* feat: store import ops as a file instead of Redis

* feat: test cleanup

* fix: change unit tests after Redis logic removal

* feat: use `results` for progress reporting, add `stat_descriptors` info after preprocessing, remove redis mentions

* feat: extract to other files, use directory from property, fix strategy loader to allow other files in `strategies` directory

* feat: fix instance progress counter

* fix: mock services types

* fix: update snaps

* fix: error handling stream, fix test file service name generation

* fix: remove dir with tmp files after testing

* fix: new yarn.lock after rebase

* fix: remove log, change object shape

* fix: add DI types

* refactor: remove container as a csv parser dep

* fix: remove seeder, change typings

* refactor: reimplement `retrieveByName` in the region service

* fix: unit tests typings

* fix: remove ts-ignore, complete typings for csv parser validators

* fix: don't keep track of progress since it is redundant and only keep track of `advancement_count`

* fix: return of the batch job seeder

* fix: update find region by name method

* fix: update types for service typings

* fix: update redis type usage

* fix: update unit tests file

* fix: unit tests

* fix: remove redis from integration test

* feat: refactor region retrieval by name

* feat: refactor product option update

* fix: remove repo import

* fix: return redis in test

* fix: handle stream error

* fix: tmp data cleanup

Co-authored-by: fPolic <frane@medusajs.com>
2022-08-25 22:16:51 +02:00
Shahed Nasser
bf9bf7abff docs: added "Sales Channels" user guides (#2101)
* added overview user guide

* added manage user guide
2022-08-25 18:36:01 +03:00
github-actions[bot]
605fa625a2 chore(docs): Generated API Reference (#2100)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2022-08-25 18:31:58 +03:00
Shahed Nasser
501bda6aae fix: incorrect exit status of OAS comments test (#2099)
* fix exit status

* fix oas comments
2022-08-25 18:04:15 +03:00
Shahed Nasser
a8293af8e1 fix: overlapping branch names for generated PRs of references (#2097)
* fix overlapping branch names of generated references

* regenerate references
2022-08-25 17:47:58 +03:00
olivermrbl
f7a63f1782 chore(integration-tests): Fixed merge conflict 2022-08-25 16:04:49 +02:00
olivermrbl
384c8efb8b chore(release): Publish 2022-08-25 15:51:21 +02:00
Shahed Nasser
9ea5cb1ce6 docs: added taxes user guide (#2095) 2022-08-25 15:44:59 +03:00
Shahed Nasser
d38a4fb927 docs: Update Payment Provider documentation (#2057) 2022-08-25 11:32:35 +02:00
Shahed Nasser
4d4aa68898 docs: Add upgrade guide for v1.3.6 (#2056)
Added an upgrade guide for v1.3.6.

Closes DOCS-143

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-08-25 09:32:09 +00:00
Shahed Nasser
6b2803fb55 docs: added region user guides (#2093) 2022-08-25 11:45:42 +03:00
Carlos R. L. Rodrigues
ffd6234356 chore(integration): throw errors on catch blocks (#2091)
Why:
Suppressing errors and not failing the execution will lead to misleading errors of the following tests.

Fixes CORE-461
2022-08-25 06:36:24 +00: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
Shahed Nasser
5a964e6439 docs: added "Price Lists Overview" documentation (#2092) 2022-08-24 17:15:54 +03: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
Shahed Nasser
da77a714fa docs: Added "Manage a Gift Card" user guide (#2089)
* docs: Added "Gift Cards" user guide

* fixed images quality
2022-08-24 15:42:16 +03:00
Trang Le
d3c6fd7004 docs: add link to install a Medusa server (#2085)
* docs: add link to install a Medusa server

* docs: update link to quickstart guide

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-24 15:05:05 +03:00
olivermrbl
b7b0a7d3a4 Merge branch 'master' into develop 2022-08-24 12:30:33 +02:00
Carlos R. L. Rodrigues
690ca9e89a chore(integration-tests): Normalize DB config + use single process (#2077) 2022-08-24 12:29:53 +02:00
Shahed Nasser
687a6badeb docs: Added "Discounts Overview" to User Guide (#2084)
* small fixes to customers

* small fixes to products

* docs: added "Discounts Overview" page
2022-08-23 18:06:23 +03:00
Shahed Nasser
136a98ea07 docs: added "Customers Overview" documentation (#2083) 2022-08-23 17:22:57 +03:00
Shahed Nasser
b87b83c7d3 docs: added "Products Overview" user guide (#2082)
* docs: added products overview

* docs: small changes to orders overview
2022-08-23 16:37:02 +03: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
Shahed Nasser
7b6148c1dd docs: added orders overview user guide (#2076) 2022-08-22 18:40:33 +03:00
Shahed Nasser
08d2942ddf docs: added introduction to user guide (#2075)
* docs: added introduction to user guide

* remove link in header

* added UI icons

* small changes
2022-08-22 17:51:25 +03:00
Danijel Predojevic
b78171b80c docs: update api urls (#2074)
* Update homepage.md

* Update add-fulfillment-provider.md

* Update gatsby-medusa-starter.md

* Update how-to-create-notification-provider.md

* Update how-to-create-payment-provider.md

* Update how-to-implement-checkout-flow.mdx

* Update nextjs-medusa-starter.md

* Update paypal.md

* Update quick-start.md

* Update stripe.md

* Update docs/content/advanced/backend/shipping/add-fulfillment-provider.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Update docs/content/quickstart/quick-start.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Update docs/content/advanced/backend/shipping/add-fulfillment-provider.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

Co-authored-by: Danijel Predojevic <danijel@vivant.eco>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-22 14:35:58 +03:00