* api routes for user management
* add invites and roles to db
* services
* invite repo
* include user in accepting invitation
* include user role in create user
* api password reset
* delete invite
* include email in reset password token
* added metadata as dbawarecolumn
* added events for invite handling and delete functionality
* added invite model to exports
* add default value member and allow null roles
* conditional inclusion of invites in "list-users"
* integration tests for users
* helpers for user testing
* add unauthenticated routes to users
* simplifying create invite
* create users with first and last name, and dev role
* reset password endpoint
* removed token from response
* update user with firstname, lastname and role
* create invite refactor
* test password reset without email in body
* removed redundant router variable
* cleanup
* unit tests
* adjustments
* service tests
* adjustments according to api changes
* fix cart test
* cloned now works
* change name to verified token for the verified token
* add a space
* db aware columns
* fix: timestampz dbaware
* more testing
* add list-invites endpoint
* reset-password error handling
* pr issues adjusted
* fixed test
* add optional to link templates
* move invites to a new endpoint
* migrate invites to own testsuite
* adjust snapshots
* email constraint for invite
* fix integration tests
* addressing pr feedback
* unit tests for extended user api
* linting
* fix integration tests
* fix unit tests
* fix: Addresses breaking change from class-transformer
* fix orders testing
* merge "create-claim" js and ts files
* add out commented tests
* update typescript endpoints to reflect changes made for user management
* converted invites to typescript
* add exports from api endpoints
* remove old js files used for reference
* integration test
* import reflect metadata
* invite service conversion to ts
* removed unused import
* update invite service to match styleguide
* add "expires_at" and "token" to invite table
* update invite service to save tokens and validate expires_at
* fix failing tests
* fix tests after adding token and expires_at to invite
* add expiration to create
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
Co-authored-by: olivermrbl <oliver@mrbltech.com>
* 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
* init plugin
* changed dbehaviour on invalid status input on admin list products
* mprices
* updated migration to add status = published on all existing products + added integration test on GET /admin/products when status null is provided
* merged product status
* init ShopifyService
* made requested changes to migration and GET /store/products
* fixed test
* made requested changes to migration
* push progress on source plugin
* add webhook product/create handler
* fixed normalization of variant weight
* removed weight func
* work on events
* finished product hooks (error on new variant needs to be fixed)
* fixed order status
* create fulfillments
* update fulfillment on cancel
* refactored services, handle returns though medusa, helper methods
* order updates
* removed dist
* update gitignore
* emit cahnges to product
* added redis ignore check to prevent update loops
* fixed product-variant.deleted event
* fix more events
* fix test
* fix: order taxes
* added refund with no items
* fixes to hooks
* fixed handling refunds and returns issued from Shopify
* added unit tests to ShopifyProductService and ShopifyCollectionService
* linting fix
* prepared loader PR
* fix: jsDocs
* fix: pager
* fix: build output and babelrc
* chore: linting
* fix: address type
* fix: migration clean up
* fix: update snapshots with ext_ids
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* testing for deletes of variants when a product is deleted
* remove variants with products
* test using direct db query
* formatting
* removed unused imports
* 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