* refactor(medusa): Cleanup + fix
* styles(medusa): Lint
* refactor(medusa): Finalize cleanup
* feat(medusa): Prefer the usage of bulk operations instead of sequential/conccurent operations
* feat(medusa): Improve cart service
* refactor(medusa): Explicitly specifying protected methods when needed as well as enfore the usage of the local transactionManager_ in those methods
* tests(medusa): Fix tests according to the new changes
* feat(medusa): Cleanup after rebase
* test(medusa): Fix cart service tests
* feat: add product list for price lists
* feat: add product list for price lists
* refactor: product list controller
* fix: add integration test for price list products
* fix: use getListConfig
* initial
* add logged in item to cart gets correct price
* customer id or cart_id customer id
* move customer_id to a config
* update unit test
* run pipelines
* add controllers directory and loaders
* update integration tests
* start groups
* move controllers to pure functions
* group filtering for customers
* print errors
* remove verbose flag
* controller refactor
* update imports
* Feat/list customers by customer group (#1114)
* move controllers to pure functions
* add customer group test
* add api for list customer group customers
* remove unused imports
* controller refactor
* update imports
* Update packages/medusa/src/api/routes/admin/customer-groups/get-customer-group-customers.ts
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* fix: dedupe
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* fix babel transform-runtime regenerator required for migrations
* add customer group model
* add migration for customer group
* add customer group model export
* add customer group repository
* add customer group service
* add CustomerGroupRepository to "withTransaction" in CustomerGroupService
* remove unnecessary argument to runtime plugin
* service export ordering
* add create customer group endpoint
* add customergroup to route index in admin
* add customer group service
* add customer groups test
* cleanup
* add customers batch initial
* batch creation of customer groups
* integration testing batch creation
* integration tests
* chaining existing customers creation in repo
* remove commented test
* update unit tests to reflect change in idempotent behavior
* ensure that exceptions are expected
* update idempotency behavior
* update formatting
* update format
* Update packages/medusa/src/repositories/customer-group.ts
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* pr feedback
* add In import
* add seperate model dto
* add integration test
* error handling in repository
* remove unused import
* jsdoc
* Update packages/medusa/src/api/routes/admin/customer-groups/add-customers-batch.ts
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* Update packages/medusa/src/api/routes/admin/customer-groups/add-customers-batch.ts
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* pr review comments
* rename variable
* fix: adds atomic phase clean up callback
* fix: call error handler in new transaction block too
* restore
* error handling
* fix: error handler in no isolation case
* add integration test for missing group on update
* final adjustments to test
* fix pr feedback
* cleanup core for pr
* remove console.log
* remove customergroupservice test from customers
* Apply suggestions from code review
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* add end bracket to customer tests
* remove comments
* change model decorator
* fix integration test merge
* onDelete cascade instead of cascade:true
* remove verbose flag
* fix: dedupe type
* add save to customer groups
* customer model delete cascade
* add await to asyncronous save operations
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* update customer service prep
* expand on the update customer groups test case
* add the test case for customer group update
* docs for `groups` prop on update customer endpoint
* refactor, update comments
* expend on integration tests, add customer mock with a group
* refactor to use `customerGroupService.list` method
* update units
* remove `updateCustomerGroups`
* fix rebase conflict
* fix customer seed data, add JoinTable on groups
* group retrieval using the expand param
* fix: use `buildQuery_`
* fix: validation for `groups`, enable `expand`param on update customer endpoint
* fix: remove fileds form the `FilterableCustomerGroupProps`
* fix: spearate body/query validation
Co-authored-by: fPolic <frane@medusajs.com>
* fix babel transform-runtime regenerator required for migrations
* add customer group model
* add migration for customer group
* add customer group model export
* add customer group repository
* add customer group service
* add CustomerGroupRepository to "withTransaction" in CustomerGroupService
* remove unnecessary argument to runtime plugin
* service export ordering
* add create customer group endpoint
* add customergroup to route index in admin
* add customer group service
* add customer groups test
* cleanup
* duplicate error handling
* ducplicate name integration test
* add jsdoc
* customergroup not customer
* pr feedback
* pipeline test
* fix weird merge
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
* adds bulk add/remove products to/from collection. Adds endpoint updateProducts on collections that uses these bulk operations
* fix integration tests and test description
* undo change to swap
* made requested changes
* added removeProducts endpoint
* made requested changes
* fix: set collection_id null
* updated collection_id to type string | undefined
* added default relations to retrieve collection endpoint
* push snapshot
* added created at and updated at to collection list endpoint
* updated integration tests
* added q param to list collections
* updated snapshots
* 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>