Adrien de Peretti
d0c679fc7e
feat(medusa): Export BaseEntity/SoftDeletableEntity from the core ( #1594 )
2022-05-30 17:47:20 +02:00
Adrien de Peretti
3503651ff2
Refactor(medusa): Create a BaseEntity and SoftDeletableEntity base class for common columns ( #1315 )
...
* refactor(medusa): Move some column to a base entity to make it easier to add new models without forgetting some columns
* styles(medusa): Cleanup models
* fix(medusa): typings due to model typings update
* feat(medusa): Cleanup models
* fix(medusa): A model must not return the generateId as part of the entity
* fix(medusa): Plugin integration snapshot
* fix(medusa): Typings from discount-rule-migration scripts
* refactor(medusa): Introduct BaseEntity/SoftDeletableEntity that the entity extends
* styles(medusa): Fix models linting
* test(medusa): Fix integration plugin tests
* feat(medusa): Create generateEntityId standalong function utility and update config to properly supprt ts spec files
* feat(medusa): Update entities to use the new utils to generate and apply the id
* test(medusa): Fix test suits
* feat(medusa): Improve generateEntityId utility
2022-05-23 14:27:58 +02:00
adrien2p
f7ef3aac36
feat(medusa): Rename base-service.spec to transaction-base-service.spec
2022-05-03 09:22:00 +02:00
adrien2p
ff9ff21487
feat(medusa): Update TransactionBaseService methods visibility
2022-05-02 13:38:15 +02:00
adrien2p
e7e715ac17
feat(medusa): Split base service to its related TransactionBaseService and utilities methods when required
2022-04-21 13:48:16 +02:00
adrien2p
99146b7403
feat(medusa): Export transaction related methods to the transactionBaseService
2022-04-21 13:48:16 +02:00
adrien2p
bfb81b8b32
feat(medusa): Improve base-service
2022-04-21 13:48:16 +02:00
Adrien de Peretti
3f19a3c4d5
refactor(medusa-interfaces): Migrate baseService to TS + improve the service it self ( #1314 )
...
* refactor(medusa-interfaces): Migrate baseService to TS + improve the service it self
* feat(medusa,medusa-interfaces): Cleanup and move base-service to medusa core
* medusa(medusa, medusa-interfaces): Improve typings
* medusa(medusa, medusa-interfaces): buildQuery make properties optionals
* feat(medusa-interfaces): Revert temporarly the medusa-interfaces while moving the base-service to the medusa core
* feat(medusa): Improve base-service typings
* feat(medusa): Remove template that is not necessary
2022-04-13 17:42:09 +02: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
Sebastian Rindom
491b6eba2d
fix: add tax service registration ( #1225 )
...
* fix: add tax service registration
* fix: cleanup
2022-03-23 11:10:41 +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
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
Sebastian Rindom
edce88c34b
Moves Medusa interfaces defines model schemas for Customer, Cart, Order
2020-01-30 09:38:08 +01:00
Sebastian Rindom
c7cf9b8061
Add core
2020-01-18 15:08:22 +01:00