add: composite unique constraint for shipping_option_id and cart_id
fix: fetchCartOptions to format custom shipping options like normal shipping options
fix: addShippingMethod should throw when custom shipping options is not empty and no optionId corresponds to custom shipping options
* auth tests
* customer auth tests
* user auth test
* store auth snapshot
* auth snapshot
* auth with deleted password hashes
* manual field input for test scripts
* fix circleci with double retrieve of user and customer
* add email validation to user
* fix: cleanup
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* 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
* 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>
* 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
* 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
* fix: replace ILIKE operator with ILike function where possible
* remove: unused import
* fix: remove alias from test case as it is not needed
* fix: product variant query
* add: integration tests + fallback to original query for all queries searching on the display_id field
* remove: console.log
* 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>
* draft order now creates customer when creating cart
* corrected to update instead of create
* corrected tests
* added creation of customer to create of cart
* removed update function from mock
* added test
* corrected update to update email properly
* corrected tests
* removed unused func
* updated core properly
* removed manual-payment service