Commit Graph

124 Commits

Author SHA1 Message Date
olivermrbl
8ddb3952c0 chore(release): v1.8.0-rc.2 2023-03-28 21:04:57 +02:00
olivermrbl
990c79d2d5 chore(release): v1.8.0-rc.1 2023-03-28 19:32:36 +02:00
olivermrbl
b57ea22461 chore: Enter pre-release mode and version packages 2023-03-24 10:16:11 +01:00
Riqwan Thamir
4ede91952d fix(medusa-react): invalidate products query on category delete (#3485) 2023-03-15 18:38:02 +01:00
Patrick
6748877c69 fix(oas,js,react): use AdminExtendedStoresRes instead of AdminStoresRes (#3478)
## What

Declare and use AdminExtendedStoresRes for `[get] /admin/store` endpoint.

## Why

Only `[get] /admin/store` returns `ExtendedStoreDTO`. Other `/admin/store` endpoints return `Store`.

## How

* Create new AdminExtendedStoresRes OAS schema
* Update medusa-js
* Update medusa-react
2023-03-15 11:17:34 +00:00
Philip Korsholm
fe9eea4c18 feat(medusa, admin-ui, medusa-react, medusa-js): Allow toggling of manage inventory (#3435)
**What**
- Toggle manage inventory in the inventory management modal

**How**
- Create/update/remove inventory item based on if `manage_inventory` is set and if an inventory item already exists
- Move all stock location updates to when the modal is submitted
- Add create-inventory-item endpoint in the core

Fixes CORE-1196

Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
2023-03-14 16:14:31 +00:00
Carlos R. L. Rodrigues
54dcc1871c feat(medusa,medusa-core-utils): graceful shutdown server (#3408)
* feat: graceful shutdown
2023-03-10 09:11:45 -03:00
Riqwan Thamir
9ba09ba4d7 feat(medusa, medusa-js, medusa-react): Add store queries to react medusa (#3436)
What:

- Adds queries to medusa react for core
- Fix naming issues in types

RESOLVES CORE-1131
2023-03-10 10:14:48 +00:00
Philip Korsholm
80b95a2300 Fix(medusa, admin-ui): Order allocations (#3419)
**What**
- Fix `delete-reservation` endpoint to allow deletions of reservations 
- remove `inventory_item_id` from reservation update call to properly update reservation
- invalidate all list caches to properly update order overview after an allocation has been created
- Fix overlap for long product titles in edit-allocation-modal

Fixes CORE-1214
2023-03-09 17:07:49 +00:00
Rares Stefan
57d7728dd9 feat(admin-ui, medusa-js, medusa-react, medusa): Multiwarehousing UI (#3403)
* add "get-variant" endpoint

* import from a different place

* fix unit test

* add changeset

* inventory management for orders

* add changeset

* initial create-fulfillment

* add changeset

* type oas and admin

* Move inv. creation and listing from admin repo

* Fix location editing bug (CORE-1216)

* Fix default warehouse on inventory table view

* remove actions from each table line

* Use feature flag hook instead of context directly

* remove manage inventory action if inventory management is not enabled

* Address review comments

* fix queries made when inventorymodules are disabled

* variant form changes for feature enabled

* move exclamation icon into warning icon

* ensure queries are not run unless feature is enabled for create-fulfillment

---------

Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com>
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
2023-03-08 16:08:56 +01:00
Riqwan Thamir
47d3440766 feat(admin-ui, medusa-react): product page categories management + nested multiselect (#3401)
* chore: allow products to be categorized in product create/edit page

* refactor: cleanup

* feat: invalidate product details cache when categories change

* fix: update changesets

* fix: push ner changeset

* feat: limit popup height

---------

Co-authored-by: fPolic <frane@medusajs.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-03-07 19:42:01 +01:00
Patrick
2d2727f753 fix(eslint): remove unused .eslintignore in medusa-react package (#3406)
## What

remove unused .eslintignore in medusa-react package

## Why

Some IDEs, like JetBrains, will establish the eslint working directory by finding the nearest .eslintrc or .eslintignore file. The  .eslintignore in `/packages/medusa-react` adds complexity to configuring and resolving eslint for that package.

## How

.eslintignore is already declared at the root of the monorepo and /packages/medusa-react is already ignored as a whole. We can safely remove the `.eslintignore` from `/packages/medusa-react`
2023-03-07 16:10:56 +00:00
Kasper Fabricius Kristensen
40de54b010 feat(admin,admin-ui,medusa): Add Medusa Admin plugin (#3334) 2023-03-03 10:09:16 +01:00
Riqwan Thamir
75924b682f feat(medusa-react): add product category queries and mutations (#3218) 2023-02-16 10:22:23 +01:00
Rares Stefan
12d304307a feat(medusa-js, medusa-react, medusa): Prepare API for admin implementations (#3110)
********What********
Add `joinSalesChannels util to stock locations

Add the following endpoints to medusa-react
- inventory items
    - mutations
        - update
        - delete
        - update location level
        - delete location level
        - create location level
    - queries
        - list inventory items
        - get inventory item
        - list location levels
- Stock locations
    - mutations
        - create stock location
        - update stock location
        - delete stock location
    - queries
        - list stock locations
        - get stock locatoin
- Variants
    - queries
        - get inventory
- Reservations
    - mutations
        - create reservation
        - update reservation
        - delete reservation
    - queries
        - list reservations
        - get reservation
- sales channels 
  - mutations
    - associate location with sc
    - remove location association

**Why**
- Update clients to reflect new api endpoints in the core with inventory modules

Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
2023-02-16 08:49:48 +00:00
olivermrbl
da9fb4aaa8 chore: Lint package.json 2023-02-14 17:27:43 +01:00
Adrien de Peretti
8c5219a31e chore: Update ignored files for npm (#3217) 2023-02-09 17:25:14 +01:00
olivermrbl
3b474ec35c chore(release): Publish 2023-02-08 19:35:44 +01:00
Oliver Windall Juhl
08324355a4 chore: Patch bump all dependencies + minor bumps winston (#3185) 2023-02-07 19:15:29 +01:00
Kasper Fabricius Kristensen
4fbf6b7ad3 fix(medusa-react): Fix production.min.js causing invalid hook usage error in CJS environments (#3144) 2023-02-01 14:07:02 +01:00
olivermrbl
8f07738d88 chore(release): Publish 2023-01-24 13:58:41 +01:00
Kasper Fabricius Kristensen
6293fccc65 hotfix(medusa-react): Invalidate query keys on successful mutations (#3099)
**What**
- Fixes an issue where query keys weren't invalidated on successful mutations.

**How**
- Update `buildOptions` function to be called per `QueryKey` instead of passing them all as a single query key, resulting in no matches found.
- Fixes imports that aren't compatible with ESM modules.
2023-01-24 12:55:24 +00:00
Shahed Nasser
7cafff14b9 docs: added migration guide for Medusa React (#3066)
* docs: added migration guide for Medusa React

* docs: fixed vale error
2023-01-19 16:59:49 +02:00
olivermrbl
6481b0c357 chore(release): Publish 2023-01-18 18:48:57 +01:00
Kasper Fabricius Kristensen
150696de99 feat(medusa, medusa-js, medusa-react): Add endpoint to retrieve product tags from the storefront (#3051) 2023-01-18 10:47:15 +01:00
olivermrbl
ab580066ae fix: Merge conflicts with master 2023-01-18 10:17:39 +01:00
Kasper Fabricius Kristensen
cb25244007 hotfix(medusa-js, medusa-react): Fix issue with JS client bundle (#3038) 2023-01-16 17:44:24 +01:00
Kasper Fabricius Kristensen
8d1275c942 feat(medusa-react): Upgrade react-query and clean up dependencies (#2969) 2023-01-11 19:19:34 +01:00
olivermrbl
233d6904f8 chore(release): Publish 2022-12-22 15:54:20 +01:00
Patrick
0a9c891853 chore: explicitly add devDependencies for monorepo peerDependencies (#2808) 2022-12-15 08:46:52 +01:00
olivermrbl
29135c0519 chore(release): Publish 2022-12-13 10:34:07 +01:00
Kasper Fabricius Kristensen
c2c38dd091 fix(medusa, medusa-react): Typing of optional fields on multiple product endpoints (#2771) 2022-12-12 19:10:06 +01:00
Philip Korsholm
a6243618fe feat(medusa): Claim customer orders (#2710) 2022-12-08 17:48:49 +01:00
olivermrbl
2b2ea157a6 chore(workflows): Fix merge conflicts with master 2022-12-07 20:28:32 +01:00
Carlos R. L. Rodrigues
15c667fbd3 feat(medusa,medusa-react): PaymentCollection support (#2659)
* chore: medusa react, order edit complete fix and single payment session
2022-12-07 12:39:35 -03:00
Frane Polić
3b2c929408 feat(medusa-js, medusa-react): PublishableKeys SC management (#2734) 2022-12-07 12:16:48 +01:00
chemicalkosek
5bd2faa02b docs: fix import path in medusa-react README (#2731) 2022-12-06 17:26:13 +02:00
Frane Polić
9eafde07fe feat(medusa-js): Register PublishableApiKey (#2616)
**What**
- register a publishable API key through `medusa-js` i.e. define the key that will be sent with each request

**How**
- introduce KeyManager class which is used to share keys between medusa-js objects.

**Usage**
1. Set the key through the `Medusa` config
2. Set the key through `KeyManager` dynamically:
```ts
import { KeyManager } from "medusa-js"

KeyManager.registerPublishableApiKey("pk_123")
```

---

RESOLVES CORE-794
2022-11-17 12:19:18 +00:00
Frane Polić
03fc9e18e9 feat(medusa, medusa-js, medusa-react): PublishableApiKey "update" endpoint & add "title" property (#2609)
**What**
- update PK endpoint
  - medusa-js/react implementation
- add a title property to the entity
  - update the migration file
  - pass a title on create
  - list PKs by title
  - update the client libs with new param signatures
- change id prefix to: "pk_"
2022-11-16 04:35:22 +00:00
Frane Polić
3de553c27f feat(medusa-js, medusa-react): PublishableApiKeys clients (#2582)
**What**
- add `PublishableApiKeys` endpoints to the `medusa-js` and `medusa-react` clients

--- 

RESOLVES CORE-791
DEPENDS ON https://github.com/medusajs/medusa/pull/2567
2022-11-15 15:41:58 +00:00
olivermrbl
a4dd26e137 chore(release): Publish 2022-11-09 19:34:59 +01:00
Patrick
7b0ceeffb4 feat: /store api product types (#2552)
## What
Allow users to fetch ProductTypes from the storefront API.

## Why
This endpoint will allow developers to implement better faceted product search in Medusa without the need for search plugin. Developers will be able to use this to render refinement lists based on types, like this:
![image](https://user-images.githubusercontent.com/116003638/200417828-863065de-3607-49db-bd72-62a6815129fa.png)

## How
Endpoint `GET /store/products/types` and `GET /store/product-types` (use [product types listing in admin](https://github.com/medusajs/medusa/blob/master/packages/medusa/src/api/routes/admin/products/list-types.ts) as reference)

Support added in @medusajs/medusa-js
Support added in medusa-react

## Testing
Similar automated tests as `GET /admin/products/types` and `GET /admin/product-types`

---

Resolves CORE-699
2022-11-09 16:10:17 +00:00
olivermrbl
ee8a71c692 chore(release): Publish 2022-11-02 16:44:54 +01:00
Kasper Fabricius Kristensen
fcfb7d167b fix(medusa): Allow AddressPayload or string on DraftOrder creation (#1902) 2022-10-19 18:01:08 +02:00
Philip Korsholm
3c5e31c645 fix(medusa, medusa-file-*): Protected uploads for file services (#2433) 2022-10-18 10:46:47 +02: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
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
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
Frane Polić
308b99cc5d fix(medusa-react): OrderEdit add item hook renaming (#2392) 2022-10-11 12:28:24 +02:00
olivermrbl
35df4962f8 chore(release): Publish 2022-10-10 18:02:50 +02:00