**What**
Create a service abstraction for the modules internal service layer. The objective is to reduce the effort of building new modules when the logic is the same or otherwise allow to override the default behavior.
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
* chore: added item/shipping adjustments for order/items/shipping_methods
* chore: add validation for order type and target rules
* chore: add comment for applied promotions
* chore: add shipping method and item adjustments
* chore: include applied promotions to items/shipping_method for each case
* chore: handle case for items across and order to consider existing applications
* chore: handle case for applied promo values to shipping => across
* chore: added changeset
* chore: update return of function
* chore: campaigns and campaign budgets + services CRUD
* Apply suggestions from code review
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
* chore: minor refactor
* chore: added single/bulk interfaces
* Apply suggestions from code review
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
* chore: use DAL date entity
* chore: align nullable
* Update packages/promotion/src/models/promotion-rule.ts
* chore: fix types
* chore: review changes
* Update packages/promotion/src/utils/compute-actions/shipping-methods.ts
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
what:
- adds compute actions for the following cases:
- items => each & across
- shipping_method => each & across
- order
- adds a remove compute actions when code is no longer present in adjustments array
RESOLVES CORE-1625
RESOLVES CORE-1626
RESOLVES CORE-1627
RESOLVES CORE-1628
RESOLVES CORE-1585
Duplicate of #6008, but I messed up my git history big time :'(
**What**
- CartService and CartRepository + tests
- AddressService and AddressRepository + tests
- CartModuleService skeleton. Full implementation + tests will be added in a separate PR
* feat(types,utils): added promotion create with rules
* chore: add rules to promotion and application method
* chore: use common code for rule and values
* chore: address pr reviews
* chore: fix test
What:
- Promotions can be created with its bare attributes
- Promotions one to one relationship with ApplicationMethod can be created with its attributes + validation
RESOLVES CORE-1592
RESOLVES CORE-1595
* init
* remove date string validator;
* add transformOptionalDate transformer to api
* move type conversion to the datalayer
* fix final module integration test
* update arrow-function
* make string optional
* move work to utils
* make check for value exists
* move util back to pricng
* change utils
* refactor get-iso-string
* fix build
* flip transform condition
* add null check for isDate
* feat(pricing): Separate Pricing Module internal types from `@medusajs/types` (#5777)
* create types for pricing repositories
* create RepositoryTypes input
* add service types
* use models for repository types
* fix build
* update types to match interface types
* add aliases
* types instead of moduletypes
* move repository to types for pricing module
* add changeset
* fix merge error
* fix conflict
* fix build
* re-add validation of dates in updatePriceLists_
**What**
- Add price-rules for prices in price-lists
- make rules object optional when creating prices
**Why**
- more price granularity
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
* remove defaults
* take 2
* works now
* add changeset
* pricing module and pricing service list take null updates
* update handlers
* update product module service with take:null where relevant
* no spread
* note to self:default offset should be 0, not 15
**What**
- Fix issues with update-variant workflow:
- other variants than the updated variant are no longer removed
- options are updated properly
Co-authored-by: Riqwan Thamir <5105988+riqwan@users.noreply.github.com>