Commit Graph

8063 Commits

Author SHA1 Message Date
Richard Ward
83f5ef1554 docs: last storage plugin is default - minio (#1949)
* docs: caution to say only last configured storage plugin will be used

Added a caution that only the lat configured storage provider will be used

* Update docs/content/add-plugins/minio.md

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

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-01 14:54:29 +03:00
Debashis Biswal
058e66a4d2 docs: fix typos for overview on the homepage.md 📕✏️ (#1954)
* Fix typos for overview in the homepage documentation file

* Rollback partial changes for overview on homepage.md as per PR(#1954) comment
2022-08-01 14:48:04 +03:00
Omar Moustafa
f26d0fcd53 docs: removed docs link from the footer (#1955)
Closes #1906
2022-08-01 14:47:33 +03:00
Olanrewaju Olatunde
aeb5c68d97 docs: Added a note to create PostgreSQL database (#1916)
* Added a note to create PostgreSQL database

* fixed grammar

* closed admonition

* fixed admonition
2022-08-01 12:21:57 +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
Frane Polić
3fbe8d7d08 feat(medusa): Validate LineItems in SalesChannel (#1871)
* wip: validate line item SC

* fix: repository type, remove relation, use sc id, check if cart has associated sc

* feat: setup tests and seeder, change entity retrieval in cart service method

* feat: remove repo usage and method, use Adrien's method from product service to check sc association, add test cases, add seeder entities, accept flag for validating sc on the endpoint

* feat: add a unit test to ensure validation method is called if flag is passed

* feat: allow `validate_sales_channels` flag in other relevant endpoints

* fix: typo

* fix: flag rename

* fix: correct FF in test suites

* fix: address PR feedback

* fix: change error message

* feat: remove query params, guard with FF, refactor

* feat: guard validation in the service

* refactor: rename validation method

* refactor: reorganise tests

* wip: cleanup test file

* wip: revert cart seeder changes use factories

* fix: remove seeder, update mocks

* fix: method name

* fix: units, validate by default

* git: resolve merge conflicts

* refactor: separate line item sales chanel units

Co-authored-by: fPolic <frane@medusajs.com>
2022-07-27 21:39:06 +02:00
Adrien de Peretti
204dd23a39 feat(medusa): Migrate SearchService to TS + add SearchInterface (#1922) 2022-07-27 20:58:44 +02:00
Adrien de Peretti
6014872a72 feat(medusa): Migrate NotificationService to TS + add NotificationInterface (#1922) 2022-07-27 20:07:57 +02:00
Adrien de Peretti
902af55723 feat(medusa): Migrate Note service (#1925)
**What**
Migrate note service to ts

FIXES CORE-352
2022-07-27 17:40:16 +00:00
Adrien de Peretti
c025074aca feat(medusa): Includes Sales channels as part of the product/order export (#1882)
**What**
Add support to sales channel in the product/order export strategy

**How**
Update the strategy to include the sales channel if the flag is enabled

**Tests**
Add new unit tests that check that the exported data does include the appropriate sales channel when the flag is enabled and that the data still does not include the sales channel if the flag is not including the flag

FIXES CORE-303
2022-07-27 17:11:09 +00:00
Adrien de Peretti
df66378535 feat(medusa): Attach or update cart sales channel (#1873)
What

Allow to create a cart with a sales channel, otherwise the default one is attached.
Also allow to update the sales channel on an existing cart and in that case the line items that does not belongs to the new sales channel attached are removed

How

Updating existing end points and service method to integrate the new requirements

Tests

Add new integration tests

Fixes CORE-270
Fixes CORE-272

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-07-27 16:54:05 +00:00
Ankit Singh
2810423258 docs: added deploy to netlify button in next.js storefront (#1913) 2022-07-26 17:37:43 +03:00
Adrien de Peretti
8dd85e5f03 chore: Improve health checks to avoid waiting 10 sec (#1888)
**What**
Sometimes the some integration tests that are depending on external services are failing due to timeout.

One of the reason is that the health check is done every 10 sec with a timeout of 5sec, which can lead to long waiting time before continuing

FIXED CORE-326
2022-07-26 13:44:21 +00:00
Ankit Singh
9216ad0811 docs: added missing link in "What's Next" in Notification Architecture Overview (#1911) 2022-07-26 16:39:40 +03:00
Omar Moustafa
f1256f7e8f docs: Fix Install Command in Quickstart Guide (#1905) 2022-07-26 16:39:09 +03:00
Adrien de Peretti
b8ddb31f6f feat(medusa): Move search indexing into a separate subscriber to defer the work load (#1874)
**What**

Move the preliminary indexing action at boot time to a separate subscriber in order to defer the work load in the background and therefore to avoid increasing the load time when the number of products increase with time.

**Tests**
Add 10k products (since it is our limit, tried with 50k before getting the error limit) using 
```sal
do $$
declare
   counter integer := 0;
begin
   while counter < 10000 loop
     INSERT INTO product (id, title, description, handle, profile_id)
        (SELECT * FROM ((SELECT random(), random(), random(), random(), 'sp_01FNB9K7FXB0SZMKXD013RJYSP')) as T);
      counter := counter + 1;
   end loop;
end$$;
```
then start the server and while the server is starting, hit the search end point repeatedly 

FIXES CORE-258

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-07-26 12:58:28 +00:00
Philip Korsholm
0e0b131488 Feat(medusa): expand store result (#1884)
**What**
- include the default sales channel in the result of `get-store` if featureflag is set

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-07-26 11:59:11 +00:00
Adrien de Peretti
e51fdd3304 fix(medusa-payment-stripe): Fix options typo (#1899)
**What**
Fix the options usage across the plugin `this.options_` instead of `this.options`

**Tests**
New unit tests

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-07-26 11:34:28 +00:00
Adrien de Peretti
aa4bf795b2 fix(medusa-js): Pass undefined instead of empty object to avoid empty payload (#1900) 2022-07-25 19:42:43 +02:00
Shahed Nasser
23d5809255 docs: added note about build (#1892) 2022-07-22 13:14:02 +03:00
Shahed Nasser
668a269eb7 docs: improved contentful documentation (#1891) 2022-07-22 13:03:25 +03:00
Shahed Nasser
b9995cf2a7 docs: added missing link (#1890) 2022-07-21 16:21:41 +03:00
Shahed Nasser
b2602fa9ed docs: improved digitalocean docs (#1889) 2022-07-21 15:22:29 +03:00
Shahed Nasser
ef84b104e6 docs: update heroku's documentation (#1881) 2022-07-20 12:24:59 +03:00
Shahed Nasser
45dcf420c6 docs: update Next.js documentation based on the new storefront (#1880)
* update next.js storefront docs

* made changes to Next.js sections
2022-07-20 12:08:08 +03:00
Sebastian Rindom
8c283ac3b0 fix(medusa): Calculated price on cart shipping options (#1878) 2022-07-20 11:04:31 +02:00
Adrien de Peretti
110c995a6a feat(medusa): Allow to query order/product by SC (#1867)
**What**

Allow to query the products and orders by sales channels

**How**

Updating the existing end points and repositories  (if necessary) to take a new query params that is sales_channel_id as an array of string

**Tests**

Add new integration tests

Fixes CORE-295
Fixes CORE-288
2022-07-19 16:54:20 +00:00
Shahed Nasser
f623a85c5d docs: improved qovery documentation (#1875)
* improved qovery guide

* added cli reference link
2022-07-19 18:14:55 +03:00
Sebastian Rindom
0e5f0d8cd6 fix(medusa-payment-klarna): Calculate shipping totals correctly (#1848) 2022-07-18 18:10:58 +02:00
Shahed Nasser
1029eca944 docs: added a dropdown for references (#1868) 2022-07-18 17:34:12 +03:00
Sebastian Rindom
4dd7fdf61c chore(medusa): Clean up atomicPhase usage (#1850) 2022-07-18 16:04:36 +02:00
Shahed Nasser
8c727f91f4 docs: added deploy to netlify button for admin (#1865)
* added deploy to netlify button

* chore: fix docs test error (#1866)

* added deploy to netlify button
2022-07-18 15:48:32 +03:00
Shahed Nasser
6ed97e2ae0 chore: fix docs test error (#1866) 2022-07-18 15:30:13 +03:00
Derek Wene
f5091c6370 feat(medusa): Add events for creating, updating, and deleting users to event bus (#1836) 2022-07-17 16:02:03 +02:00
Sergio Leon
33bb67bfb9 docs: fix typo in QuickStart next actions (#1861)
check our the… -> check out the…
2022-07-16 23:48:01 +02:00
Shahed Nasser
e134f6d237 chore: fixed commit branch on generate reference action (#1857)
* fixed commit branch

* fixes after yarn upgrade
2022-07-15 18:08:07 +03:00
chemicalkosek
32b066d923 Update to correct placement of webhook secret. (#1856)
Currently the docs say to copy the webhook secret from top right corner which starts with `we_`.
This is not the webhook secret. This is webhook id.
2022-07-15 13:36:17 +02:00
Oliver Windall Juhl
dafbfa7799 fix(medusa): Create tax lines when marking DraftOrder as paid (#1852) 2022-07-15 11:57:46 +02:00
Sebastian Rindom
c148064b4a fix(medusa): accept array of region ids in order filter (#1851) 2022-07-15 05:41:24 +00:00
Adrien de Peretti
f35ea5156a feat(medusa, medusa-js, medusa-react): Bulk add Products to a SalesChannel (#1833) 2022-07-14 16:39:44 +02:00
Adrien de Peretti
cdd91974f9 feat(medusa, medusa-js, medusa-react): Start implementing remove batch products on a sales channel (#1842)
What
Support sales channel remove product batch in medusa, medusa-js and medusa-react

How
By implementing a new endpoint and the associated service method as well as the repository methods.

Medusa-js new removeProductd method in the resource

Medusa-react new hook in the mutations

Tests

Endpoint test
Service test
Integration test
Hook tests

Fixes CORE-292
2022-07-13 19:40:23 +00:00
Oliver Windall Juhl
7162972318 fix(medusa): Free text search for PriceList Products (#1843)
**What**
Fixes #1831 and #1336
2022-07-13 14:06:33 +00:00
Kasper Fabricius Kristensen
cbdc5b7774 fix(gatsby-source-medusa): Unsupported exports warning and schema (#1463)
**What**

- Moves `sourceUpdatedNodes` and `sourceAllNodes` to a separate file, to prevent warning of unsupported exports. See #1455.
- Adds warnings if `GET /store/products`, `GET /store/regions`, and `GET /store/collections` return empty arrays. This should help new users more easily figure out why their storefronts does not work as expected.
- Adds schema to plugin, so that node types for products, regions and collections are always created. This will prevent errors such as `allMedusaRegions query failed` from happening in the storefront, as the query will be valid as the type exists, even if it returns nothing. This should make the gatsby plugin/starter easier to use. This error is an reoccurring issue in our discord, when new users try to run the Gatsby starter without seeding the storefront beforehand. 

Resolves #1455 

Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
2022-07-13 12:42:06 +00:00
Adrien de Peretti
a1a5848827 feat(medusa, medusa-js, medusa-react): Implement Sales Channel list (#1815)
**What**
Support sales channel list in medusa, medusa-js and medusa-react

**How**

By implementing a new endpoint and the associated service method as well as the repository methods.

Medusa-js new list method in the resource

Medusa-react new hook in the queries

**Tests**

Endpoint test
Service test
Integration test
Hook tests

Fixes CORE-280
2022-07-13 10:28:53 +00:00
Sebastian Rindom
c20d720040 fix(medusa-payment-klarna): Fix division by zero on free shipping (#1840) 2022-07-13 09:26:45 +02:00