Commit Graph

292 Commits

Author SHA1 Message Date
timothy22000 7cc94dc479 fix: /api/routes/store/customers pass linting (#646) 2021-10-25 08:55:37 +02:00
Penthaa Patel 5cb1b5687e fix: make packages/medusa/src/api/routes/store/shipping-options pass linting (#648) 2021-10-25 08:22:17 +02:00
timothy22000 2966242bc8 fix: api/routes/store/products pass linting (#644) 2021-10-25 08:18:29 +02:00
Ronaldo Caetano f4307c702a fix: make variants pass eslint (#647) 2021-10-25 08:16:53 +02:00
timothy22000 60e943260b fix: make /api/routes/admin/gift-cards,routes/store/gift-cards,/routes/store/orders pass linting (#643) 2021-10-25 08:00:22 +02:00
Audrey Kon 5fbce42948 fix: make packages/medusa/src/api/routes/admin/upload pass eslint (#627) 2021-10-24 20:30:26 +02:00
Oliver Windall Juhl 3e68069a89 fix: Prepare routes for linting (#603) 2021-10-24 15:13:49 +02:00
Sebastian Rindom b82b43b4c6 fix: pull missing fields 2021-10-23 13:07:41 +02:00
Sebastian Rindom 06f5fe2670 fix: allow changing regions safely 2021-10-19 18:56:52 +02:00
zakariaelas c960851e58 merge develop and resolve conflicts 2021-10-18 12:50:31 +01:00
Sebastian Rindom 690cdd2392 Merge branch 'develop' into feat/rma-shipping-options 2021-10-15 19:55:06 +02:00
Sebastian Rindom dc7ecc959a fix: add possiblity to unset billing address 2021-10-15 19:24:44 +02:00
Sebastian Rindom 9c72acda40 fix: failing integration tests 2021-10-15 19:14:44 +02:00
Sebastian Rindom 2297a84cb9 fix: merge develop 2021-10-15 18:44:19 +02:00
Sebastian Mateos Nicolajsen fbd08e0feb feat:swap/claim on claim and claim on swap (#424) 2021-10-14 18:21:38 +02:00
zakariaelas 7cdd628997 merge develop and resolve conflicts 2021-10-14 15:44:58 +01:00
zakariaelas dba1d5bb69 fix: adjustments based on seb's feedback
- remove eager from shipping_option relationship in `models/custom-shipping-options.ts`
- remove custom_shipping_options relation from cart model
2021-10-14 14:44:36 +01:00
Kasper Fabricius Kristensen fc50aacde2 fix: options relations on GET variant (#532) 2021-10-13 19:46:44 +02:00
pKorsholm 5ef2a3fbcb feat: Product filtering (#439) 2021-10-13 16:01:59 +02:00
Sebastian Mateos Nicolajsen 0cf9e416f3 Allow the user to log out (#459) 2021-10-12 11:09:38 +02:00
Sebastian Mateos Nicolajsen 84d4d791ea feat: allow product selection on discounts allocated to a specific item (#395) 2021-10-11 13:46:32 +02:00
zakariaelas 52be911e50 fix: adjustments based on feedback
rename RMAShippingOption to CustomShippingOption
update models and relations
update unit and integration tests
update services
2021-10-06 14:17:36 +01:00
Oliver Windall Juhl 17b192fe37 fix: Throw on cart creation when no region exist (#455)
If you try to create a cart without a region in your setup, we should throw a proper error message.
2021-10-06 11:19:38 +02:00
zakariaelas db83448d18 fix: tests 2021-10-01 16:41:27 +01:00
zakariaelas 632ad17e3f fix: merge conflicts 2021-09-30 20:29:58 +01:00
zakariaelas 77ee0bf186 feat: rma shipping option + unit tests 2021-09-30 14:52:34 +01:00
pKorsholm 9b64828ec3 Feat:discount expiration date (#403)
* discount expiration validation and testing

* integration testing

* double quotes

* add iso8601 package

* api testing

* add joi validation of start and end dates as well as valid_duration

* valid_duration column

* service testing

* discount validation in services

* integration test with invalid date interval

* include valid_duration when fetching a discount

* rename variable for clarity

* add test for dynamic discount with expiration date

* remove debug code

* adjust tests to reflect valid_duration being included in default fields

* additional discount update validation

* fixed failing test

* set ends_at on dynamic discount creation

* discount integration tests

* removed unused console.log

* removed validation of dynamic discounts by duration and added ends_at to dynamic discount creation

* integration tests for dynamic discount with and without duration

* optional valid duration for dynamic discounts

* allow nullable dynamic discount durations

* expect assertions

* fix unit test after change to dynamic discounts without duration

* change to date instead of string

* add assertions

* error handling

* addressed feedback
2021-09-30 12:13:59 +02:00
Sebastian Rindom 10c87e8d5a Merge remote-tracking branch 'origin/develop' into feat/meilisearch-plugin 2021-09-29 15:20:22 +02:00
pKorsholm 42cdfde6d9 Feat/nested return reasons (#418)
* api endpoints for nested return_reasons

* add nested return reasons to database

* add parent reason to update

* integration tests

* add children relation

* integration tests for nested returns and failing doubly nesting returns

* add delete-route and nested relations

* delete return reason route

* doubly nested return reason creation check and deletion

* nested return reasons migration

* list only parent reasons

* removed null filter

* remove empty migration

* add return reason filter to get list of categories with children

* removed console log

* corrected delete route

* return reason testing

* return reasons query

* listREasonsFromIDs

* create return testing

* listReasonsFromIds

* return reason tests

* failing if returnreason has child on return

* integration tests

* cascading deletes on return reasons

* more elegant checking for children of return reasons when creating a return

* remove console.log

* pr adjust

Co-authored-by: Philip Korsholm <phko@MacBook-Pro.localdomain>
2021-09-29 09:22:09 +02:00
zakariaelas 9b6d0c7334 add: request + response interface changes 2021-09-27 12:42:10 +01:00
Sebastian Mateos Nicolajsen a70e3ed0ae feat: customer-information (#413)
* added the ability to update email as long as user has_account=false

* revamped and added fix for MC-132

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-09-23 10:22:18 +02:00
zakariaelas 451e3bcdcf further adjustments based on seb's feedback 2021-09-22 15:44:52 +01:00
Sebastian Mateos Nicolajsen 897ccf475a Feat/note on order (#399)
* added NoteService and related endpoints && tests

* removed snapshots

* corrected error in service

* removed snapshot

* added the ability to note down author using a string

* updated model for note

* refactored to access logged in user

* added other user id option

* removed snapshot

* updated according to feedback

* removed snapshots

* reintroduced snapshots

* updated to snake case

* removed try catch from use-db
2021-09-22 15:19:35 +02:00
Kasper Fabricius Kristensen a82332da3e feat: add product status (#400)
* added statuses to product + unit test for updating status

* add update to product model

* added integration tests

* added integration test to validate that updating status to null results in invalid_data error

* removed comment

* update GET /store/products integration test

* fixed unit test with IdMap

* changed dbehaviour on invalid status input on admin list products

* updated migration to add status = published on all existing products + added integration test on GET /admin/products when status null is provided

* made requested changes to migration and GET /store/products

* fixed test

* made requested changes to migration
2021-09-21 11:22:17 +02:00
zakariaelas 3a10e37377 adjustments
rename search subscriber
fix: comments in medusa-interfaces/search-service.js
add: use cursor pagination when indexing all products to search engine
fix: emit product_id on product-variant creation
fix: move search API route under products/search
fix: use meilisearchService instead of searchService in plugin loader
2021-09-20 14:44:58 +01:00
Oliver Windall Juhl 00ab03f3a2 feat: Allow backorder on swaps (#404) 2021-09-19 15:33:43 +02:00
Sebastian Rindom bf43896d19 fix: customer endpoints shouldn't use customer id already provided through authentication (#402)
* Updated customers/:id to customers/me - untested

* fix: integration +unit tests

* docs: fix oas docs

Co-authored-by: ColdMeekly <20516479+ColdMeekly@users.noreply.github.com>
2021-09-17 08:27:46 +02:00
zakariaelas 0fbde7c51f add: abstract search functionality to core + adjust meilisearch-plugin
add SearchService interface to medusa-interfaces
add DefaultSearchService skeleton implementation to core
add search-index.js loader to core for indexing db documents
add SearchSubscriber to core
add loadToSearchEngine method in ProductService
switch order of loaders in core to load subscriptions AFTER plugins
adjust service and loader for medusa-plugin-meilisearch
2021-09-16 15:48:09 +01:00
Vilfred Sikker Dreijer d477ca9842 fix: add default relations to variants to include prices (#394) 2021-09-14 16:54:39 +02:00
Vilfred Sikker Dreijer 682741041a Feat: add product default relations support for variant prices (#359)
Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-09-10 14:53:12 +02:00
Sebastian Mateos Nicolajsen cf66f97758 feat: update and cancel swaps, claims, and returns (#310) 2021-09-10 13:57:34 +02:00
pKorsholm fab155c246 Merge pull request #373 from medusajs/feat/product-variant-rank
Feat: Add product variant rank
2021-09-09 09:58:27 +02:00
Kasper Fabricius Kristensen 16b0fa377a fix: make shipping_option_id on requirements optional (#340)
* changed validator so that reqiurement shipping_option_id is now optional + added integration test that confirms that when an update contains a requirement without an ID it is created

* fix: formatting

* fix: un-bump babel-preset-medusa-package

* chore: update yarn.lock

* fix: implemented suggested changes, need to validate behaviour on clean branch so NOT ready for merging just yet

* fix: implemented suggested changes, need to validate behaviour on clean branch so NOT ready for merging just yet

* afix: made it impossible to set a min. subtotal requirement that is greater than max. subtotal

* fix: added explanation to error

* fix: Error when removing requirement on update

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-09-09 09:03:00 +02:00
pKorsholm 0c47c78c08 change variant column 'rank' to 'variant_rank' 2021-09-06 13:29:24 +02:00
olivermrbl 8fdfc87049 integration tests passing 2021-09-05 21:34:13 +02:00
pKorsholm 3ae6bdb7fc add ranking of variants to product creation implementation 2021-09-03 17:18:20 +02:00
pKorsholm 32880dbed3 add ranking of variants to product creation 2021-09-03 17:17:43 +02:00
Sebastian Rindom ae82cfc70a feat: creates support for swaps on the storefront (#355) 2021-08-30 12:14:56 +02:00
Oliver Windall Juhl 5d63b0c8d2 hotfix: Allow sale_amount product updates (#346) 2021-08-20 17:14:19 +02:00
Sebastian Rindom 9467f7ecbd fix: build openapi (#338) 2021-08-16 15:45:50 +02:00