Kasper Fabricius Kristensen
7a1e394b9d
Feat/expand on list discounts ( #1304 )
2022-04-21 15:22:07 +02:00
Adrien de Peretti
313cb0658b
feat(medusa): Improve config loading ( #1290 )
2022-04-21 12:49:56 +02:00
Adrien de Peretti
530bbd4cac
refactor: LineItemService migration to TS + refactoring + fix ( #1254 )
...
* refactor(medusa): LineItemService migration to TS + refactoring
* feat(medusa): Cleanup line-item service
* feat(medusa): Rebase develop
* test(medusa): Fix integration cart tests
* fix(medusa): Cart service updateUnitPrices
2022-04-14 20:53:35 +02:00
Adrien de Peretti
12c06b4c9d
refactor(medusa): Cleanup and fix CartService ( #1306 )
...
* 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
2022-04-13 18:35:13 +02:00
Oliver Windall Juhl
edc6d9d29c
fix: Remove region_id from countries on region deletes ( #1330 )
...
* Remove region id from countries on delete
* Update snapshots
2022-04-13 10:52:25 +02:00
Zakaria El Asri
1cfeb5dbd8
feat: line item adjustments ( #1319 )
...
* add: crud services + model + totals
* fix: enforce unique constraint on line item adjustment model and update service (#1241 )
* add: unique constraint on model + fix service
* fix: unique constraint
* fix: add cascade on delete + fix discount relation
* fix: remove optional unique prop
* add: tests for ensuring line item adjustment db constraints (#1279 )
* add: tests for ensuring db constraints
* fix: use given when then
* feat: adjust cart to include line item adjustments (#1242 )
* fix: cart service + cart tests
* fix: remaining tests
* fix: swap tests
* fix: add relationship + fix oas
* refactor: applyDiscount
* fix: refactor applyDiscount and fix + add unit tests
* fix: plugins tests
* feat: line item adjustments draft orders (#1243 )
* fix: draft order tests
* fix: constraint
* fix: wrong variable name
* fix: unique constraint
* progress: add tests
* fix: add cascade on delete + fix discount relation
* fix: remove optional unique prop
* fix: cart removeLineItem + tests
* fix: cart unit tests
* fix: update snapshot
* remove: verbose option
* rename arg
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
* add: create adjustments for swap additional_items
* add: create adjustments for return lines
* fix: unit test for creating adjustment for additional_items
* fix: create adjustments only for non return items + no deletion when item is a return item
* add: integration tests
* refactor: use refreshAdjustments method
* refactor test
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
2022-04-12 15:49:31 +02:00
Sebastian Rindom
607a382b4e
fix: ensures no duplicate tax lines when completing cart ( #1262 )
...
* fix: ensures that no duplicate tax lines are created when completing cart
2022-04-05 21:25:48 +02:00
Sebastian Rindom
fb33dbaca3
feat: price list products ( #1239 )
...
* 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
2022-03-30 13:29:14 +02:00
Philip Korsholm
3083aaee81
Fix: Add Customer id in generate line item for customer specific pricing ( #1245 )
...
* 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
2022-03-28 09:57:33 +02:00
Sebastian Rindom
e4af6b8f9c
chore: fix integration tests ( #1240 )
...
* chore: fix integration tests
* chore: fix integration tests
* fix: store tests
* fix: store tests
* fix: cleanup
2022-03-25 15:08:54 +01:00
Oliver Windall Juhl
a610805917
feat: Add DiscountConditions ( #1230 )
...
* feat: Add DiscountCondition entity + Join table per relation (#1146 )
* feat: Convert DiscountService to TypeScript (#1149 )
* feat: Add DiscountRepository + bulk insert and remove (#1156 )
* feat: Add `conditions` to payload in `POST /discounts` and `POST /discounts/:id` (#1170 )
* feat: Add DiscountRuleCondition entity
* fix relation
* fix join key
* Add discount rule condition repo
* add join table per relation
* Convert DiscountService to TypeScript
* feat: Add DiscountConditionRepository
* Add migration + remove use of valid_for
* revert changes to files, not done yet
* init work on create discount endpoint
* Add conditions to create discount endpoint
* Add conditions to update discount endpoint
* Add unique constraint to discount condition
* integration tests passing
* fix imports of models
* fix tests (excluding totals calculations)
* Fix commented code
* add unique constraint on discount condition
* Add generic way of generating retrieve configs
* Requested changes + ExactlyOne validator
* Remove isLocal flag from error handler
* Use postgres error constant
* remove commented code
* feat: Add `isValidForProduct` to check if Discount is valid for a given Product (#1172 )
* feat: Add `canApplyForCustomer` to check if Discount is valid for customer groups (#1212 )
* feat: Add `calculateDiscountForLineItem` (#1224 )
* feat: Adds discount condition test factory (#1228 )
* Remove use of valid_for
* Tests passing
* Remove valid_for form relations
* Add integration tests for applying discounts to cart
2022-03-24 16:47:50 +01:00
Philip Korsholm
e2423020c0
Feat: use price selection strategy ( #1165 )
...
* init
* add query params
* added buld id validation to repo
* admin done
* updated price reqs
* initial price selection strategy
* update customer seeder
* format models
* price selection strategy
* price selection testing
* update price selection tests
* update price selection strategy
* remove console.warn
* update price seleciton strategy
* use price selection strategy in "get-product"
* price selection strategy integration testing
* update integration tests
* update price selection strat
* remove console.log
* fix unit tests
* update product snapshot integration tests
* fix failing unit tests
* update variant test snapshots
* update variant test snapshots
* fix failing unit tests
* update product snapshot integration tests
* intial implementation of PriceList
* add price selection strategy test to list-products
* add price selection to list products
* add price selection strategy to getRegionPrice
* add price selection strategy to get variant
* update product snapshot test
* store testing of price selection
* variant services
* update cart service
* update product tests
* update test
* unit testing with price selection strategy
* integration tests for price lists
* update sort prices for consistent results
* update snapshot
* update product snapshot with product ids
* this time pipelines work
* swap tests
* redo ordering
* updated admin/product integration tests
* update updateVariantPrices method
* remove comment from error handler
* add integration test for batch deleting prices associated with price list
* named ids
* run with verbose
* add console.log
* sort products in integration test
* remove verbose flag
* make update to prices through variant service limited to default prices
* update store/products.js snapshot
* update comment
* add todo
* lift existing price calculations to variant level
* remove unused import
* add api unit tests and update product integration tests to validate that prices from Price List are ignored
* fix product test
* update integration tests
* pre merge commit
* requested changes
* cascade
* ensure delete variant cascades to MoneyAmount
* fetch variants correctly
* use find options
* add pricelist to relevant seeders
* update integration tests
* update price selection with "includeDiscountPrices"
* use transaction with price selection strategy
* add await to prevent store test errors
* remove verbose
* addresses PR feedback
* removed unused endpoint
* remove unused repository from constructor
* remove from constructor argument
* update mock
* update unit tests
* fix failing store integration tests
* remove medusajs ressource
* re add env.template
* price selection strategy methods
* fix integration tests
* update unit tests
* remove commented out code
* update jsdoc
* update price selection strategy parameter
* update snapshots
* integration tests cleanup
* pr feedback
* update integration tests
* pr feedback
* price selection unit tests
* add calculated price type to results
* cleanup include discount prices and price selection configs
* refactor price selection params to a separate file
* update tests and refactor price selection seeder
* remove prices from variant update
* rename result
* pr feedback
* remove unused import
* create getRegionPriceContext
* remove from params in search
* remove unused import
Co-authored-by: Kasper <kasper@medusajs.com >
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com >
2022-03-23 17:17:19 +01:00
Philip Korsholm
dfa3502e41
Feat: Price selection implementation ( #1158 )
...
* init
* added buld id validation to repo
* admin done
* updated price reqs
* initial price selection strategy
* update customer seeder
* format models
* price selection strategy
* price selection testing
* update price selection tests
* update price selection strategy
* remove console.warn
* update price selection strat
* remove console.log
* fix unit tests
* update product snapshot integration tests
* fix failing unit tests
* update variant test snapshots
* intial implementation of PriceList
* integration tests for price lists
* updated admin/product integration tests
* update updateVariantPrices method
* remove comment from error handler
* add integration test for batch deleting prices associated with price list
* make update to prices through variant service limited to default prices
* update store/products.js snapshot
* add api unit tests and update product integration tests to validate that prices from Price List are ignored
* fix product test
* requested changes
* cascade
* ensure delete variant cascades to MoneyAmount
* addresses PR feedback
* removed unused endpoint
* update mock
* fix failing store integration tests
* remove medusajs ressource
* re add env.template
* price selection strategy methods
* fix integration tests
* update unit tests
* update jsdoc
* update price selection strategy parameter
* fix unit tests
* pr feedback
Co-authored-by: Kasper <kasper@medusajs.com >
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com >
2022-03-21 19:03:42 +01:00
Kasper Fabricius Kristensen
5300926db8
feat: Implement PriceList and extend MoneyAmount ( #1152 )
...
* init
* added buld id validation to repo
* admin done
* updated price reqs
* intial implementation of PriceList
* integration tests for price lists
* updated admin/product integration tests
* update updateVariantPrices method
* remove comment from error handler
* add integration test for batch deleting prices associated with price list
* make update to prices through variant service limited to default prices
* update store/products.js snapshot
* add api unit tests and update product integration tests to validate that prices from Price List are ignored
* fix product test
* requested changes
* cascade
* ensure delete variant cascades to MoneyAmount
* addresses PR feedback
* removed unused endpoint
* update mock
* fix failing store integration tests
* remove medusajs ressource
* re add env.template
* Update integration-tests/api/__tests__/admin/price-list.js
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com >
* Update integration-tests/api/__tests__/admin/price-list.js
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com >
* fix: update snapshots
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com >
2022-03-18 15:18:50 +01:00
Sebastian Rindom
e3655b53f7
fix: storefront product filtering ( #1189 )
...
* fix: allow multiple ids in list + expand, fields param
* fix: add filtering by title
* fix: adds integration test
* fix: adds integration test of product variant filtering
* fix: integration tests
* fix: unit tests
* fix: refactor query param parsing
2022-03-17 23:28:15 +01:00
Philip Korsholm
dacc9c6c4b
Feat: Add groups to list customer ( #1113 )
...
* 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 >
2022-03-10 13:05:46 +01:00
Zakaria El Asri
8e7de6dd36
fix: make sure @medusajs/medusa is loaded correctly regardless of integration test suite being run ( #1166 )
2022-03-09 17:20:18 +01:00
Frane Polić
a514d84ccf
feat: list customer groups ( #1099 )
2022-03-02 11:38:44 +01:00
Philip Korsholm
4b4463f0e2
Feat: Bulk add customers to customer group ( #1095 )
...
* 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 >
2022-02-28 10:03:26 +01:00
Zakaria El Asri
33426ddb4c
fix: make plugin tests run with integration test suites ( #1101 )
...
* fix: make plugin tests run with integration test suites"
* add: plugins to test pipeline
* add: run integration tests on different jobs + fix failing test command
* fix: typo
* fix: pipeline
2022-02-25 16:39:28 +01:00
Philip Korsholm
0394be36ef
Feat: bulk delete customers from customer group ( #1097 )
...
* integration testing
* customer seeder
* initial bulk removal
* integraiton testing of deletes
* delete fix
* not found test
* remove unused code
* Apply suggestions from code review
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
* update integration tests
* pr review fixes
* update migration
* formatting
* integration tests for deletion
* pr feedback
* fix failing integration tests
* remove integration tests before merging
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
2022-02-25 15:29:13 +01:00
Sebastian Rindom
c56660fca9
feat: new tax api ( #979 )
...
* feat: add tax calculation strategy (#885 )
* feat: add tax calculation strategy
* fix: adds strategy loader
* fix: eslint ignore
* chore: cleanup
* fix: allow plugin overwrites
* fix: allow plugin overwrites
* fix: fake region
* Update packages/medusa/src/loaders/strategies.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
* feat: adds tax related db entities + tax provider (#896 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: pr comments
* fix: unit test
* feat: totals service to ts (#911 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: adds TotalsServiceProps
* feat: adds integration tests for automatic tax calculation + shipping tax rates (#945 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: jsdoc types
* Feat/manual taxes (#950 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: add integration tests for manual taxes
* fix: cart service - cleanup jsdoc
* feat: add /carts/id/taxes to manually calculate taxes
* feat: add integration tests for order tax calculations
* fix: unit tests
* fix: merge
* fix: rm verbose
* fix: unit tests
* fix: object -> cartOrOrder
* fix: rounding
* Feat/complete order w tax lines (#951 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: add integration tests for manual taxes
* fix: cart service - cleanup jsdoc
* feat: add /carts/id/taxes to manually calculate taxes
* feat: add integration tests for order tax calculations
* feat: adds cart completion strategy + create order w. tax lines
* fix: unit tests
* fix: merge
* fix: rm verbose
* fix: unit tests
* fix: unit tests
* fix: unit tests
* fix: ensure calculation for list orders
* fix: unit tests
* fix: integration tests
* fix: adds cart order type gaurds
* Docs/tax api (#954 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: add integration tests for manual taxes
* fix: cart service - cleanup jsdoc
* feat: add /carts/id/taxes to manually calculate taxes
* feat: add integration tests for order tax calculations
* feat: adds cart completion strategy + create order w. tax lines
* fix: unit tests
* fix: merge
* fix: rm verbose
* fix: unit tests
* fix: unit tests
* fix: unit tests
* fix: ensure calculation for list orders
* fix: unit tests
* fix: integration tests
* docs: documents tax related methods and types
* fix: require either item_id or shipping_method_id
* feat: product type tax rate (#969 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: add integration tests for manual taxes
* fix: cart service - cleanup jsdoc
* feat: add /carts/id/taxes to manually calculate taxes
* feat: add integration tests for order tax calculations
* feat: adds cart completion strategy + create order w. tax lines
* fix: unit tests
* fix: merge
* fix: rm verbose
* fix: unit tests
* fix: unit tests
* fix: unit tests
* fix: ensure calculation for list orders
* fix: unit tests
* fix: integration tests
* docs: documents tax related methods and types
* fix: require either item_id or shipping_method_id
* feat: adds returns tests for new tax system
* feat: adds return lines + integration tests for swaps
* feat: return integration tests
* feat: adds product type tax rates
* feat: add tax management endpoints
* fix: create single migration
* fix: adds tax rates to js client
* fix: strats
* Fix/plugin tests (#998 )
* plugin testing setup
* fix: test sendgrid plugin
* fix: test sendgrid plugin
* chore: clean
* chore: clean
* fix: clean up tests
* fix: remove dirty import
* fix: sendgrid + brightpearl
* fix: plugin integration tests
* fix: klarna
* fix: shipping method tax
* fix: remove taxrates
* fix: unit tests
* fix: integration
* fix: integration
* fix: plugins tests
* fix: ignore plugins
* fix: tests
* fix: taxes (#1017 )
* fix: taxes
* fix: taxes
* fix: faulty ref
* fix: create tax-lines with claim items
* fix: snapshot tax-liens
* fix: allows integration test teardown to force deleting tables
* fix: tests
* fix: merge
* fix: adds tax-rates to client
* fix: adds tax-rates to medusa-react
* fix: tests
* fix: tests
* fix: add product types
* fix: adds tax provider endpoint + cascaded deletes on tax rate relations
* fix: move errors to service layer
* fix: cleanup api
* fix: unit tests
* fix: error handler in base-service
* fix: Add order region to swap on createFulfillment (#1110 )
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2022-02-24 20:14:09 +01:00
Frane Polić
694e2df20f
feat: customer group update ( #1098 )
2022-02-24 18:03:20 +01:00
Philip Korsholm
e35a4fb2ea
Feat: Delete customer group ( #1102 )
2022-02-24 14:20:58 +01:00
Zakaria El Asri
cb7b211c9b
fix: variant price update ( #1093 )
...
* fix: variant prices update + integration tests
* add: unit tests
* fix: rename variable
* add: integration tests
* fix: integration tests
* fix: test name
* fix: move db logic to repo layer + create upsert method
* fix: linting
2022-02-22 20:23:11 +01:00
Frane Polić
1909d20e48
Merge pull request #1073 from medusajs/feat/get-customer-group
...
feat: get customer group
2022-02-22 09:37:07 +01:00
Frane Polić
75fb2ce9c3
feat: update customer groups ( #1075 )
...
* 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 >
2022-02-21 16:24:38 +01:00
fPolic
f21454970c
fix: typo in an assertion
2022-02-21 15:26:28 +01:00
fPolic
ecd6ed820e
feat: add extend param for customer groups
2022-02-21 15:24:52 +01:00
fPolic
8313680a71
fix: integration test case
2022-02-21 14:33:20 +01:00
fPolic
963b594a8a
test for the 404 case
2022-02-21 13:56:41 +01:00
fPolic
21d99a44a9
feat: GET customer group endpoint
2022-02-21 13:56:23 +01:00
Zakaria El Asri
c2241d1101
fix: allow offset and limit in products free text search ( #1082 )
2022-02-18 11:39:32 +01:00
Philip Korsholm
b16976a6f4
Feat: Create customer group ( #1074 )
...
* 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 >
2022-02-18 09:58:54 +01:00
Adrien de Peretti
22d387dcce
Feat(medusajs) Allow to pass custom headers ( #1009 )
...
* Feat(medusajs) Allow to pass custom headers
* fix: axios exprexted output
* fix: integration test cart
* refactor: Update types object > Record<string, any>
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
2022-02-17 16:50:03 +01:00
Oliver Windall Juhl
9f4a9f7db4
Add expand to /admin/customers/:id ( #1070 )
...
* fix: 1055 add expand to /admin/customers/:id
* fix tests
* fix tests
2022-02-16 23:41:30 +01:00
Kasper Fabricius Kristensen
66294038f0
feat: add and remove products to/from collection in bulk endpoints ( #1032 )
...
* 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
2022-02-16 22:45:19 +01:00
Philip Korsholm
8141e12a3d
add pagination and date filtering to regions ( #976 )
2022-02-10 09:15:07 +01:00
Kasper Fabricius Kristensen
ff9e2e58cb
adds ability to update balance to 0 and adds integration test ( #1036 )
2022-02-10 09:11:32 +01:00
Kasper Fabricius Kristensen
d2a7534615
fix: admin collections default relations ( #1023 )
...
* 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
2022-02-04 16:24:42 +01:00
Oliver Windall Juhl
59bb413245
fix: Updating store currencies ( #984 )
...
* fix: Adds default currency to store currencies on create
* fix: Adds integration tests + currency update error handling
* add test
* Lowercase currency codes
* fix tests
* fix: Await drop database to stop Jest from complaining
* revert itnegration tests fix
* fix store tests
2022-02-03 20:03:25 +01:00
Sebastian Rindom
3bf32e5dc9
fix: adds order by functionality to products ( #1021 )
...
* fix: adds order by functionality to products
* feat: adds product tags list
* fix: adds client and react support for product tags
* fix: unit test
* Update packages/medusa/src/services/product-tag.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
* Update packages/medusa/src/services/product-tag.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
* Update packages/medusa/src/services/product-tag.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
* Update packages/medusa/src/services/product-tag.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
* Update packages/medusa/src/services/product-tag.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
* Update packages/medusa/src/services/product-tag.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2022-02-03 19:03:15 +01:00
Zakaria El Asri
2e384842d5
feat: medusa-react admin hooks ( #978 )
...
* add: medusa admin hooks + tests
* fix: remove unneeded props
* fix: deps
* fix: deps
* fix: deps
* fix: failing tests
* fix: failing tests
* fix: query key
* add: yarn workspaces
* fix: linting medusa-react
* fix: add prepare script
* fix: buildOptions
* fix: useAdminShippingOptions query
* fix: use qs instead for query params (#1019 )
* fix: formatting
* debug: ci pipeline
* debug: log node_modules structure
* debug: use lerna bootstrap
* debug: update node version
* debug: print pkgs in workspace
* debug: print pkgs in workspace
* debug: print pkgs in workspace
* debug: print pkgs in workspace
* debug: add explicit build step
* fix: jsdoc
* debug: run build step
* debug: fix build errors
* debug: add build step to integration tests
* fix: failing test
* cleanup
Co-authored-by: Sebastian Rindom <seb@medusajs.com >
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
2022-02-02 17:10:56 +01:00
Philip Korsholm
24175025d1
Fix: admin list products expand integration test ( #974 )
2022-02-02 08:35:16 +01:00
Philip Korsholm
7fcdac51ea
Feat: object notation in queryparams ( #1002 )
...
* add object notation for queryparams
* test rule.type query params in list-discount
* pr feedback
2022-02-01 17:31:12 +01:00
Philip Korsholm
f4f9653efc
Feat: admin collections filtering ( #977 )
...
* collections filtering
* filtering collection tests
* oas for list collections
2022-02-01 17:24:47 +01:00
Oliver Windall Juhl
fdc493df7f
fix: Support array of payment status filters when listing orders ( #1013 )
2022-02-01 17:24:13 +01:00
Philip Korsholm
f61eaeec12
feat: expand store product filtering ( #973 )
2022-01-11 16:06:16 +01:00
SaintMalik
0f9fbbb732
docs: Fix typos in docs ( #497 )
2022-01-04 16:35:38 +01:00
Zakaria El Asri
321c271e53
fix: allow integration tests to run from integration-test/api folder ( #940 )
2021-12-16 14:56:25 +01:00