Commit Graph

111 Commits

Author SHA1 Message Date
Philip Korsholm
09627c01d3 feat(medusa): Support OrderEdit removal (#2204) 2022-09-16 08:39:40 +02:00
Adrien de Peretti
f863d28b9a feat(medusa): Implement premises of order edit retrieval (#2183)
**What**
- Implements the admin/store retrieval end point 
- Service implementation of the retrieve method
- Service implementation of the computeLineItems method which aggregates the right line item based on the changes that are made
- client
  - medusa-js api
  - medusa-react queries hooks

**Tests**
- Unit tests of the retrieval end points
- Unit tests of the service retrieve method and computeLineItems
- Integration tests for admin/store
- client
  - medusa-js tests
  - medusa-react hooks tests

FIXES CORE-492
2022-09-15 09:12:20 +00:00
olivermrbl
3efeb6b84f chore(release): Publish 2022-09-14 11:36:53 +02:00
Carlos R. L. Rodrigues
a94d9816fe chore: Centralise ESLint rules (#2162)
* chore: centrilize eslint rules
2022-09-13 07:42:33 -03:00
Kasper Fabricius Kristensen
64949dc721 feat(medusa-js,medusa-react,medusa): Add missing Currency endpoints (#2185) 2022-09-12 19:28:43 +02:00
olivermrbl
384c8efb8b chore(release): Publish 2022-08-25 15:51:21 +02:00
Kevin Antonio Rateni Iatauro
8cbebef403 feat(medusa-js): Add deleteSession endpoint (#1234) 2022-08-21 14:08:51 +02:00
Richard Ward
a88bf3c76e feat(medusa-js): Add Collection batch (remove, add) endpoints (#1958) 2022-08-07 13:22:36 +02:00
olivermrbl
6663a6290b chore(release): Publish 2022-08-04 14:12:54 +02:00
Adrien de Peretti
badda5233c fix(medusa-js): Allow payload in DELETE and POST (#1985) 2022-08-04 11:47:54 +02:00
olivermrbl
bc7c2d9c4a chore(release): Publish 2022-08-03 18:34:24 +02:00
Adrien de Peretti
b603f7dc8f chore(medusa): Add transaction on mutation actions (2) (#1855)
**What**
Wrap all actions that require the usage of an atomic phase into a transaction from the handler

**Info**
The following end points have been removed since that they rely on non existing stuff and can't be used and are not used
admin - create-order
admin - delete order metadata
admin - set region metadata
admin - remove region metadata

Fixes CORE-358
2022-08-02 10:23:01 +00: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
aa4bf795b2 fix(medusa-js): Pass undefined instead of empty object to avoid empty payload (#1900) 2022-07-25 19:42:43 +02: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
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
olivermrbl
fb0346f1fa fix: Merge conflicts 2022-07-12 09:29:41 +02:00
Zakaria El Asri
9fa4238ee4 chore: improve ci pipeline (#1764)
* fix: caching deps + add true parallelization to integration tests api

* fix: github action

* chore: upgrade to yarn berry (#1762)

* init migration

* remove: yarn.lock from all pkgs

* fix: build script in pkgs

* adjust yarn config

* fix: yarn.lock and yarnrc.yml

* fix: github actions

* fix: wrong type

* fix (medusa-react): use dts-cli instead of tsdx

* fix: yarn.lock

* fix: yarn v

* fix: prepare script

* add: comment on why we need to downgrade yarn before medusa-dev

* chore: move to Turborepo (#1763)

* increase number of parallel nodes

* fix (medusa-fulfillment-webshipper): build script

* fix: use new version of medusa-dev

* fix: rename cache-bootstrap to cache-deps
2022-07-10 12:11:11 +02:00
Shahed Nasser
3b28f46705 docs: added reference for JS Client (#1629)
* added reference for JS Client

* added reference for JS Client

* added reference for JS Client
2022-07-08 18:21:46 +03:00
Adrien de Peretti
2d03634cfc feat(medusa, medusa-js, medusa-react): Implement Sales Channel deletion (#1804) 2022-07-07 10:47:51 +02:00
Frane Polić
0d1624cf6a feat(medusa, medusa-js, medusa-react): Implement Sales Channel creation (#1795) 2022-07-06 22:18:05 +02:00
Philip Korsholm
428a801293 feat(medusa-js, medusa-react): Update jsdoc with experimental annotation for sales channels (#1811)
**What**
- Add tag to indicate methods are part of an experimental feature under development

**Why**
- To notify developers because we cant support featureflags in the same way from the client side libraries.
2022-07-06 15:38:26 +00:00
Philip Korsholm
9d19cc0818 feat(medusa, medusa-js, medusa-react): Implement Sales Channel update (#1797) 2022-07-06 15:44:09 +02:00
Adrien de Peretti
263a661031 feat(medusa, medusa-js, medusa-react): Implement Sales Channel retrieval (#1793) 2022-07-06 12:17:26 +02:00
olivermrbl
f87c268913 chore(release): Publish
- @medusajs/medusa-cli@1.3.1
 - medusa-dev-cli@0.0.25
 - medusa-file-minio@1.0.7
 - medusa-file-s3@1.1.3
 - medusa-file-spaces@1.2.3
 - medusa-fulfillment-webshipper@1.3.3
 - medusa-interfaces@1.3.1
 - @medusajs/medusa-js@1.2.3
 - medusa-payment-paypal@1.2.3
 - medusa-payment-stripe@1.1.41
 - medusa-plugin-algolia@0.2.3
 - medusa-plugin-brightpearl@1.3.1
 - medusa-plugin-contentful@1.2.3
 - medusa-plugin-ip-lookup@1.2.1
 - medusa-plugin-mailchimp@1.1.42
 - medusa-plugin-meilisearch@0.2.3
 - medusa-plugin-sendgrid@1.3.3
 - medusa-plugin-slack-notification@1.3.3
 - medusa-plugin-twilio-sms@1.2.3
 - medusa-react@0.3.3
 - medusa-source-shopify@1.2.1
 - @medusajs/medusa@1.3.3
2022-07-05 09:51:23 +02:00
Oliver Windall Juhl
7bee57f7c5 fix(medusa-js): Fix stringifyNullProperties util (#1766)
**What**
Changes the order of object type evaluation to properly handle null properties.

Previously, `stringifyNullProperties({ test: null })` would fail in the 2nd iteration due to an attempt to iterate `null` in `Object.keys(obj)`.
2022-07-02 15:29:27 +00:00
Adrien de Peretti
fc1cbe72c7 feat(medusa-js): Create utils to stringify null values and respect object types (#1748)
### What

At the moment it is not possible to pass explicitly null on a property since the qs.stringify will transform it as `url?property=` which is then interpreted on the backend side as `""` value which is not what we expect.
The actual way to pass null value is to set the property as `{ prop: "null" }` in order to get the stringify method to send it correctly.

### How

I just created a small util that loop through the input object and transform all null values to "null" before being passed to the qs.stringify method.

The new util is only applied on the list batch job since this is for now the only place that require that behaviour.
2022-06-30 09:17:57 +00:00
Philip Korsholm
9018d270be Feat(medusa-js, medusa-react): Upload endpoints in medusa js and react (#1716)
* export types from admin uploads

* add delete and download to medusa-js

* add upload endpoints to hooks

* remove upload from js and react

* pr feedback

* Apply suggestions from code review

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* rename types for admin uploads

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-06-29 11:36:19 +02:00
Oliver Windall Juhl
7302d76e12 feat(medusa,medusa-js,medusa-react): Add BatchJob API support in medusa-js + medusa-react (#1704)
* Add BatchJob API to medusa-js

* Adds BatchJob API hooks

* Fix tests in medusa-react
2022-06-21 11:08:44 +02:00
olivermrbl
8e43ef2b3a chore(release): Publish
- medusa-file-minio@1.0.6
 - medusa-file-s3@1.1.2
 - medusa-file-spaces@1.2.2
 - medusa-fulfillment-webshipper@1.3.2
 - @medusajs/medusa-js@1.2.2
 - medusa-payment-paypal@1.2.2
 - medusa-payment-stripe@1.1.40
 - medusa-plugin-algolia@0.2.2
 - medusa-plugin-contentful@1.2.2
 - medusa-plugin-mailchimp@1.1.41
 - medusa-plugin-meilisearch@0.2.2
 - medusa-plugin-sendgrid@1.3.2
 - medusa-plugin-slack-notification@1.3.2
 - medusa-plugin-twilio-sms@1.2.2
 - medusa-react@0.3.2
 - @medusajs/medusa@1.3.2
2022-06-19 13:11:05 +02:00
olivermrbl
6c1a722b38 chore(release): Publish
- medusa-file-minio@1.0.5
 - medusa-file-s3@1.1.1
 - medusa-file-spaces@1.2.1
 - medusa-fulfillment-webshipper@1.3.1
 - @medusajs/medusa-js@1.2.1
 - medusa-payment-paypal@1.2.1
 - medusa-payment-stripe@1.1.39
 - medusa-plugin-algolia@0.2.1
 - medusa-plugin-contentful@1.2.1
 - medusa-plugin-mailchimp@1.1.40
 - medusa-plugin-meilisearch@0.2.1
 - medusa-plugin-sendgrid@1.3.1
 - medusa-plugin-slack-notification@1.3.1
 - medusa-plugin-twilio-sms@1.2.1
 - medusa-react@0.3.1
 - @medusajs/medusa@1.3.1
2022-05-31 09:12:18 +02:00
Adrien de Peretti
fa031fd28b feat(medusa): Support deleting prices from a price list by product or variant (#1555) 2022-05-30 09:41:57 +02:00
Oliver Windall Juhl
a87e1cdf65 feat(medusa): Add endpoint for retrieving a DiscountCondition (#1525) 2022-05-17 11:17:17 +02:00
olivermrbl
4198ee7756 Merge branch 'master' into develop 2022-05-13 14:32:24 +02:00
Oliver Windall Juhl
9ca45ea492 feat(medusa): Add endpoints specific to DiscountConditions (#1355) 2022-05-13 12:42:23 +02:00
Shahed Nasser
98f5c4ec8b fix(medusa-js): Updated URLs for JS Client (#1435) 2022-05-06 14:54:04 +02:00
olivermrbl
ae5801c518 chore(release): Publish
- gatsby-source-medusa@0.1.0
 - @medusajs/medusa-cli@1.3.0
 - medusa-file-s3@1.1.0
 - medusa-file-spaces@1.2.0
 - medusa-fulfillment-webshipper@1.3.0
 - medusa-interfaces@1.3.0
 - @medusajs/medusa-js@1.2.0
 - medusa-payment-klarna@1.3.0
 - medusa-payment-paypal@1.2.0
 - medusa-plugin-add-ons@1.2.0
 - medusa-plugin-algolia@0.2.0
 - medusa-plugin-brightpearl@1.3.0
 - medusa-plugin-contentful@1.2.0
 - medusa-plugin-ip-lookup@1.2.0
 - medusa-plugin-meilisearch@0.2.0
 - medusa-plugin-segment@1.3.0
 - medusa-plugin-sendgrid@1.3.0
 - medusa-plugin-slack-notification@1.3.0
 - medusa-plugin-twilio-sms@1.2.0
 - medusa-react@0.3.0
 - medusa-source-shopify@1.2.0
 - @medusajs/medusa@1.3.0
2022-05-01 15:16:35 +02:00
Kasper Fabricius Kristensen
7a1e394b9d Feat/expand on list discounts (#1304) 2022-04-21 15:22:07 +02:00
Oliver Windall Juhl
9acee2799e fix(medusa): Remove unsupported Discount endpoints (#1367) 2022-04-19 13:39:49 +02:00
Philip Korsholm
b164977a19 Feat: Medusa react price list (#1258)
* export everything from price lists in core

* medusa-js price list

* feat: add product list for price lists

* feat: add product list for price lists

* add price list to admin module

* add price list hooks initial

* refactor: product list controller

* fix: add integration test for price list products

* update types

* add tests for price lists

* update medusa react tests

* update update request for price lists

* Apply suggestions from code review

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>

* rename methods

* pr feedback

* list products from price list

* fix errors after merge

* update medusa react with medusa-js method name changes

* redo changes

* update hook names

* fix: routes in msw handler

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
Co-authored-by: Zakaria El Asri <zakaria.elas@gmail.com>
2022-04-03 20:48:49 +02:00
Frane Polić
b7f699654b feat: customer group customers client endpoints (#1221)
* feat: add `listCustomers` (by group) to `medusa-js`

* feat: add `useAdminCustomerGroupCustomers` hook

* fix: remove log

* fix: import/export

* fix: change query keys

* wip: sublist query keys

* fix: revert query factory changes

* fix: add query as a param when building the "detail" key

* fix: revert keys logic, use special case

* fix: query path, change batch keys

* change admin customer groups cache key generation

* spread query params

Co-authored-by: fPolic <frane@medusajs.com>
2022-03-23 20:07:13 +01:00
Frane Polić
218b20b26d fix: CustomerGroups missing features in the clients (#1159)
* feat: support for query params in customer groups retrieve method

* feat: add `useAdminDeleteCustomerGroup`hook

* fix: formatting

* fix: pass `query` object in `useAdminCustomerGroup` hook

Co-authored-by: fPolic <frane@medusajs.com>
2022-03-10 13:10:18 +01:00
Kasper Fabricius Kristensen
4e7435e4d7 fix: default POST request payloads to an empty object (#1141)
* defaulted carts.create payload to an empty object

* fix linting

* requested changes
2022-03-09 17:19:38 +01:00
Frane Polić
daf49bcaf3 feat: customer groups react hooks (#1153)
* fix: msw handlers for medusa-react storybook

* feat: add customer groups query hooks

* feat: add create/update customer groups hooks

* feat: add customer group batch  hooks

* feat: add test files, fix import

* add customer groups fixture

* add customer gorup mock endpoints

* add test cases

* add hook comments

* fix: typos

* fix: comments refactor

* fix: comment

Co-authored-by: fPolic <frane@medusajs.com>
2022-03-07 12:52:48 +01:00
olivermrbl
6b34a9adab Merge branch 'master' into develop 2022-03-04 16:56:58 +01:00
Frane Polić
93426bfc02 feat: customer groups client endpoints (#1147)
* feat: WIP add customer group endpoints, fix generated type exports from api

* fix: export api types, add `list`method

* fix: export customer groups types from the `medusa-js` package

* fix: cleanup type exports from customer groups api

* feat: add customer group batch methods

* fix: refactor comments

* fix: address PR comments

Co-authored-by: fPolic <frane@medusajs.com>
2022-03-03 03:52:40 +01:00
olivermrbl
6c010c019f chore(release): Publish
- @medusajs/medusa-cli@1.2.1
 - medusa-fulfillment-webshipper@1.2.1
 - medusa-interfaces@1.2.1
 - @medusajs/medusa-js@1.1.1
 - medusa-payment-klarna@1.2.1
 - medusa-payment-paypal@1.1.1
 - medusa-plugin-algolia@0.1.1
 - medusa-plugin-brightpearl@1.2.1
 - medusa-plugin-meilisearch@0.1.1
 - medusa-plugin-segment@1.2.1
 - medusa-plugin-sendgrid@1.2.1
 - medusa-plugin-slack-notification@1.2.1
 - medusa-react@0.2.1
 - medusa-source-shopify@1.1.1
 - @medusajs/medusa@1.2.1
2022-02-28 16:57:42 +01:00
olivermrbl
806c42650c chore(release): Publish
- @medusajs/medusa-cli@1.2.0
 - medusa-fulfillment-webshipper@1.2.0
 - medusa-interfaces@1.2.0
 - @medusajs/medusa-js@1.1.0
 - medusa-payment-klarna@1.2.0
 - medusa-payment-paypal@1.1.0
 - medusa-plugin-algolia@0.1.0
 - medusa-plugin-brightpearl@1.2.0
 - medusa-plugin-meilisearch@0.1.0
 - medusa-plugin-segment@1.2.0
 - medusa-plugin-sendgrid@1.2.0
 - medusa-plugin-slack-notification@1.2.0
 - medusa-react@0.2.0
 - medusa-source-shopify@1.1.0
 - @medusajs/medusa@1.2.0
2022-02-25 18:53:50 +01:00