Commit Graph

7976 Commits

Author SHA1 Message Date
Pankaj Patel
aee53884a4 docs: fix manual fulfilment package link (#2517) 2022-11-03 10:37:10 +02:00
github-actions[bot]
0f9bf2c6f8 chore(docs): Generated Docs Announcement Bar (automated) (#2529)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-11-03 10:09:42 +02:00
github-actions[bot]
f5d6652026 chore(docs): Generated Services Reference (automated) (#2528)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-11-03 10:09:19 +02:00
github-actions[bot]
bb95afabbb chore(docs): Generated Entities Reference (automated) (#2527)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-11-03 10:08:59 +02:00
github-actions[bot]
3c6fe30ee7 chore(docs): Generated JS Client Reference (automated) (#2526)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-11-03 10:08:09 +02:00
Philip Korsholm
38d4a7db3d Feat(Medusa): Allow custom shipping price on draft orders (#2531)
* create custom shipping option for cart to have custom shipping price on draft orders

* Create moody-chefs-stare.md
2022-11-03 08:44:47 +01:00
Philip Korsholm
ea3d738823 Feat(medusa): config error handling in loaders (#2514)
**What**
- add error handling when loading project config

**How**
- Add error parameter to get-medusa-config result if an error was thrown (previously we returned an empty config)
- Discussion: 
A different, but equally valid approach could be just throwing the error rather than creating an error parameter. This causes a more ugly output without warnings and changes the api a bit but it would force error handling. wdyt?

**Why**
- cli would fail with database error `databaseMissingDriverError` if config was invalid, ex. missing a comma


### example (missing `,` in config)
**old output**
```
Successfully compiled 2 files with Babel (143ms).
[medusa-config] ⚠️ redis_url not found. A fake redis instance will be used.
[medusa-config] ⚠️ database_type not found. fallback to default sqlite.
info:    Using flag MEDUSA_FF_ORDER_EDITING from environment with value true
info:    Using flag MEDUSA_FF_SALES_CHANNELS from environment with value true
info:    Using flag MEDUSA_FF_TAX_INCLUSIVE_PRICING from environment with value true
info:    Using fake Redis
✔ Models initialized – 13ms
✔ Plugin models initialized – 0ms
✔ Repositories initialized – 17ms
⠋ Initializing databaseMissingDriverError: Wrong driver: "undefined" given. Supported drivers are: "aurora-data-api", "aurora-data-api-pg", "better-sqlite3", "capacitor", "cockroachdb", "cordova", "expo", "mariadb", "mongodb", "mssql", "mysql", "nativescript", "oracle", "postgres", "react-native", "sap", "sqlite", "sqljs".
```

**new output** 
```
Successfully compiled 2 files with Babel (185ms).
error:    Error in loading config: Unexpected identifier
error:    /Users/phko/projects/community/my-medusa-store/medusa-config.js:129
  plugins,
  ^^^^^^^

SyntaxError: Unexpected identifier
    at compileFunction (<anonymous>)
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1033:15)
    at Module._compile (node:internal/modules/cjs/loader:1069:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at getConfigFile (/Users/phko/projects/community/my-medusa-store/node_modules/medusa-core-utils/dist/get-config-file.js:26:20)
```
2022-11-02 18:58:02 +00:00
olivermrbl
0b0d50b476 Merge branch 'develop' of github.com:medusajs/medusa into develop 2022-11-02 18:20:54 +01:00
Carlos R. L. Rodrigues
c3f8297599 feat(medusa): manage payment sessions from payment collection (#2402)
* feat: manage payment sessions from payment collection
2022-11-02 13:34:29 -03:00
olivermrbl
ee8a71c692 chore(release): Publish 2022-11-02 16:44:54 +01:00
olivermrbl
a014e3623c chore: Add Stripe plugin changeset 2022-11-02 16:41:11 +01:00
olivermrbl
e6b42702bd Merge branch 'master' into develop 2022-11-02 16:34:33 +01:00
Oliver Windall Juhl
684f68ce12 fix(medusa): Sales Channel migration script (#2521) 2022-11-02 13:37:46 +01:00
Sanyam
d33eeb09f4 docs: update MinIO's port to avoid port clash (#2495)
* update MinIO's port to avoid port clash

added bash command to update the MinIO port to `9001` instead of `9000`

* move `warning` to the new section

* remove `:::warning` & `:::`, update text positioning

* add `:`
2022-11-01 10:25:36 +02:00
Aniketh Varma
096425f7db docs: add zoom functionality on images (#2403)
* Add zoom functionality on images

* Fixes in zooming images

* yarn.lock issue fix
2022-11-01 10:25:08 +02:00
olivermrbl
144ce0e42c chore: Add missing changeset for 2479 2022-10-31 13:42:27 +01:00
Frane Polić
591668d332 fix(medusa): draft order set payment as captured (#2479)
**What**
- when an order is created from a draft order, set the payment of the order as captured

FIXES CORE-592
2022-10-31 12:24:59 +00:00
Sebastian Rindom
58c7ffdc6e fix(medusa): allow filtering collections by handle (#2482) 2022-10-31 08:51:15 +00:00
Sebastian Rindom
a9acb48fc6 feat(stripe): Support automatic payment methods (#2492) 2022-10-30 13:32:00 +01:00
Carlos R. L. Rodrigues
b88cef2b1f feat: Development server for core + plugins (#2448) 2022-10-21 15:53:06 +02:00
Kasper Fabricius Kristensen
4de4f20b46 feat(medusa): add analytics config (#2442)
**What**
- Adds new entity AnalyticsConfig
- Adds new service AnalyticsConfigService
- Adds new repository AnalyticsConfigRepository
- Adds new endpoints to get, create, update, and delete analytics configs

**Why**
As we begin gathering usage insights to help us improve Medusa, we want to give each individual users the ability to control what data they share with us, or not share any data with us at all. The AnalyticsConfig holds information that is used to check if the user wishes for their data to be anonymized or if they have opted out of sharing usage data.

The entire feature can be disabled on a store level by setting the feature flag `MEDUSA_FF_ANALYTICS=false` in their environment variables, the feature is enabled by default. 

**Testing**
Adds integration test for each of the new endpoints

Resolves CORE-656, CORE-655, CORE-654

Also resolves CORE-574
2022-10-21 13:04:46 +00:00
olivermrbl
f83c238a26 Merge branch 'master' into develop 2022-10-21 14:22:30 +02:00
Sebastian Rindom
7fdced0225 chore: Update snapshot this action (#2484) 2022-10-21 14:22:15 +02:00
olivermrbl
8b44618e7c fix: Merge conflicts with master 2022-10-21 14:21:06 +02:00
Ketan Saraf
26627c69a9 docs: fix broken link redis (#2481)
* fix: fixed broken link redis

* Update docs/content/advanced/backend/notification/how-to-create-notification-provider.md

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

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-10-20 21:42:49 +03:00
Adrien de Peretti
299c4ae7f5 feat(medusa): Align product import and export (#2471)
**What**

Create a data structure that facilitate the addition of new column descriptor for both export and import and ensure that the column name is shared between bother import and export to facilitate the import with an exported file. 

**Tests**

Add an additional integration tests that export a file, update the data, and re import the same file

FIXES CORE-716
FIXES CORE-713
2022-10-20 14:48:34 +00:00
Adrien de Peretti
13611e3e53 fix(medusa): Select config should be undefined if length === 0 (#2469) 2022-10-20 13:25:23 +02:00
Shahed Nasser
a03bdaf375 docs: added core package to troubleshooting step (#2473) 2022-10-19 20:07:07 +03:00
Adrien de Peretti
2f00bd100a chore(medusa): Move formatException to the errorHandler to be always applied and not have to apply it manually (#2467)
**What**

Move the usage of the formatException to the errorHandler level in order to not have to try catch here and there to apply it. Also make our error handling uniformed and avoid forgetting to apply it.

FIXES CORE-721
2022-10-19 16:22:42 +00:00
Kasper Fabricius Kristensen
fcfb7d167b fix(medusa): Allow AddressPayload or string on DraftOrder creation (#1902) 2022-10-19 18:01:08 +02:00
Adrien de Peretti
8be67c734c feat(medusa): Filter product list by discount condition id (#2464) 2022-10-19 11:23:33 +02:00
Adrien de Peretti
9deec0fc3c fix(medusa): Idempotency workStage used within transaction (#2358) 2022-10-19 10:47:31 +02:00
Philip Korsholm
3c5e31c645 fix(medusa, medusa-file-*): Protected uploads for file services (#2433) 2022-10-18 10:46:47 +02:00
Oliver Windall Juhl
7d77d91a3d chore: Automate staging releases with action (#2458) 2022-10-17 18:11:49 +02:00
Frane Polić
73db8cfca6 feat: list OE by order id (#2457)
**What**
- allow passing `order_id` param to OE list endpoint
2022-10-17 15:34:20 +00:00
Adrien de Peretti
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
Shahed Nasser
479ae1e257 docs: Added automated freshness check (#2428)
* docs: created freshness check script

* added github action
2022-10-17 10:01:45 +03:00
github-actions[bot]
cae71fee0f chore(docs): Removed Docs Announcement Bar (automated) (#2452)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2022-10-17 09:59:50 +03:00
Shahed Nasser
554360ba19 docs: added missing import in Create Service docs (#2446) 2022-10-14 15:02:46 +03:00
Shahed Nasser
f79698838c docs: changed heroku based on their plan changes (#2441) 2022-10-13 17:57:44 +03:00
Shahed Nasser
6335f166e7 docs: changed JavaScript files to TypeScript (#2440) 2022-10-13 17:40:19 +03:00
Adrien de Peretti
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
Shahed Nasser
358b52cf4f docs: added Dependency Container documentation (#2439) 2022-10-13 16:25:50 +03:00
Adrien de Peretti
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
Akarsh Jain
2e350b204c docs: added missing tabs in Create a Batch Job Strategy documentation (#2434)
Fixes: 2423
2022-10-13 15:20:50 +03:00
Zainab Lawal
60cd94fd60 docs: added missing import for add cart functionality documentation (#2425)
* Add missing import for add cart functionality file

* Added the Tab section to the Update Cart section

* Removed unnecessary spaces
2022-10-13 12:59:08 +03:00
Kasper Fabricius Kristensen
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 Kristensen
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
Frane Polić
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
Oliver Windall Juhl
4013c0c5da chore: Update README.md 2022-10-12 14:38:07 +02:00