Commit Graph

935 Commits

Author SHA1 Message Date
Stevche Radevski
00a6e512dc feat: Add support in BE for setting tax inclusivity on currency (#8037) 2024-07-09 15:22:24 +02:00
Riqwan Thamir
b6fd82e31e feat(order,core-flows): added order change create workflow (#8033)
what:

- adds anorder change create workflow
- remove order change service, brings validation to entry point service
2024-07-09 12:12:05 +00:00
Stevche Radevski
1c3ef13371 feat: Add necessary middlewares for tax inclusive pricing (#7827)
We are adding tax inclusive pricing calculation when listing products.

Two things to keep in mind:
- `region_id` will be required if you request calculated prices.
- We won't accept `currency_code` anymore, as that will come from the region info (since ultimately a cart and its currency are tied to a region)

REF CORE-2376
DEPENDS ON #8003
2024-07-09 09:37:13 +00:00
Stevche Radevski
db6969578f feat: Plug tax inclusivity in cart and order workflows (#8013) 2024-07-09 11:10:42 +02:00
Stevche Radevski
b86812f615 fix: Test failing after recent changes (#8031) 2024-07-09 11:05:32 +02:00
Stevche Radevski
cbf2fcd559 Feat: Add tax inclusivity to admin (#8003)
* feat: Add price preference to sdk

* feat: Plug tax inclusivity settings for region in UI

* feat: Add price inclusivity indicator to variant and shipping price table columns

* fix: Rename price title to correct variable name

* feat: Add support for tax inclusive crud on region

* fix: Use the region endpoint for updating tax inclusivity

* chore: Factor out price columns from hooks
2024-07-09 09:26:20 +02:00
Adrien de Peretti
10848c8bf2 chore: rename source to linkable in defineLink options (#8016)
* chore: rename source to linkable in defineLink options

* rm unused const
2024-07-08 16:44:03 +02:00
Stevche Radevski
3e86cb6ac3 feat: Add HTTP endpoints and workflows for price preference management (#7960)
REF CORE-2376

Remaining pieces are adding UI to manage the flag, showing the flag in price editor, plugging it in cart calculations, and https://github.com/medusajs/medusa/pull/7827
2024-07-05 08:47:01 +00:00
Stevche Radevski
5544303b91 feat: Add support for managing tax inclusivity (#7943)
UI / HTTP / Workflows will come in separate PRs

REF CORE-2376
2024-07-04 14:50:09 +00:00
Adrien de Peretti
7b84d854f0 Feat/mikro orm based linkable (#7944)
**What**
- Generate simple linkable for mikro orm based modules 
- fix module util
- fix joiner config builder
- fix define link relationship extension
- fix migrations not loading custom links
2024-07-04 13:30:47 +00:00
Carlos R. L. Rodrigues
d036130604 fix(cart): add shipping method to cart (#7945) 2024-07-04 12:47:39 +00:00
Adrien de Peretti
41c4307fc7 feat: define link util (#7931)
* feat: define link util

* handle pluralized fieldAlias for isList

* serviceName ar reference

* finalize

* todo

* WIP

* finalize

* fix tests

* update typings

* fix Module

* linkable

* update errors
2024-07-04 10:37:30 +02:00
Stevche Radevski
012a624ee4 feat: Flatten the provider config for all modules (#7930) 2024-07-03 16:57:12 +02:00
Carlos R. L. Rodrigues
a7844efd09 chore: move ModuleRegistrationName to utils (#7911) 2024-07-03 06:30:56 -03:00
Stevche Radevski
b4aa7fb9a7 fix: Disallow creating duplicate prices (#7866)
* fix: Disallow creating duplicate prices

* fix: Don't pass id to manager create in upsertWithReplace
2024-07-02 17:06:58 +02:00
Stevche Radevski
9daec5d7ac chore: Migrate notification module to DML (#7835) 2024-07-01 09:17:32 +00:00
Stevche Radevski
c661180c44 feat: Completely revamp the pricing module (#7852)
* feat: Completely revamp the pricing module

* chore: Update all places to the new pricing interfaces

* fix: Remove unnecessary join to itself

* chore: Add data migration for existing users

* fix: Apply the correct index to price rule
2024-07-01 09:47:03 +02:00
Carlos R. L. Rodrigues
9f3998393b fix(totals): order item totals (#7867) 2024-06-28 09:34:25 -03:00
Oli Juhl
b1df20b0dc fix(inventory): Entity Formulas + softDelete and restore (#7851) 2024-06-26 20:51:19 +02:00
Carlos R. L. Rodrigues
61758f374b chore(medusa): return endpoints (#7823) 2024-06-25 13:53:18 +00:00
Riqwan Thamir
96fb7a962e feat(utils,currency): Migrate currency to use DML (#7807) 2024-06-24 19:07:26 +02:00
Stevche Radevski
e8d6025374 Add support for tax inclusivity to region and store (#7808)
This also includes rework of the currency model for the Store module.

This change is breaking as existing stores won't have any supported currencies set, so users would need to go to the store settings again and choose the supported currencies there.
2024-06-24 15:25:44 +00:00
Adrien de Peretti
ae6dbc06be chore: Update module test runner to support DmlEntities when needed (#7799)
* chore: Update module test runner to support DmlEntities when needed

* update es version for core test utils

* fix test

* update swc config
2024-06-24 09:44:01 +02:00
Riqwan Thamir
8ac74c1357 feat(core-flows,types,pricing,medusa): Products API can create prices with rules (#7796)
* chore: Products API can create prices with rules

* chore: fix tests

* chore: cleanup

* chore: address comments
2024-06-21 15:30:36 +02:00
Stevche Radevski
944051a951 fix: Allow filtering products by variant options in store (#7784) 2024-06-21 10:42:09 +02:00
Adrien de Peretti
937a632eb6 chore: make module loaders DML aware and auto generate joiner config (#7781)
* chore: make module loaders DML aware and auto generate joiner config

* fixes and cleanup

* improve dml entity check

* add unit tests on load resources

* cleanup deps

* cleanup deps

* cleanup Modules

* finalise

* fix modules-sdk jest

* fix modules-sdk jest

* fix import

* fix import
2024-06-20 18:18:07 +02:00
Riqwan Thamir
f61557712c chore: make apis nullable (#7763)
what:

- makes top level attributes of each object an optional field in the http layer where possible

RESOLVES CORE-2229
2024-06-20 10:10:59 +00:00
Riqwan Thamir
33c4cd34cc chore: export DML builders + fix default undefined values in SQL (#7776)
* chore: export dml builders through utils

* chore: fix undefined sql error

* chore: upgrade to ts 5

* chore: use isDefined
2024-06-20 10:45:49 +02:00
Adrien de Peretti
48963f55ef Chore/rm main entity concept (#7709)
**What**
Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate.
This pr also includes various fixes in different modules

Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-06-19 13:02:16 +00:00
Riqwan Thamir
288e41856b fix(core-flows): delete existing payment session before creating new (#7751)
what:

Multiple active sessions are used for split payments. We don't currently support split payments. Until we have that implemented, this change is to ensure that whenever we create a new payment session, we delete an existing session if present. 

RESOLVES CORE-2284
2024-06-18 11:51:20 +00:00
Riqwan Thamir
3d33f06e77 chore: upgrade jest everywhere (#7703) 2024-06-14 07:35:30 +02:00
Stevche Radevski
dd1a8e6016 fix: Sort product categories based on rank (#7702) 2024-06-13 14:35:50 +00:00
Oli Juhl
6ee0a2c1b5 feat: Variant inventory quantity in GET requests (#7701)
* feat: Variant inventory quantity in GET requests

* clean up

* fix link name
2024-06-13 13:41:54 +02:00
Stevche Radevski
d862d03de0 feat: Revamp of product categories (#7695)
* feat: Normalize the categories interface to match standards

* feat: Revamp the product category implementation

* fix: Adjustments to code and tests around product categories
2024-06-13 09:10:12 +02:00
Riqwan Thamir
129fb447d0 chore: allow calculating prices without explicit fields (#7691) 2024-06-12 20:04:53 +02:00
Stevche Radevski
0e731dbad0 feat: Add support for category deletion (#7679) 2024-06-11 16:49:42 +02:00
Stevche Radevski
8e2a42b786 Clean up product typings (#7663)
There are a lot of issues in the admin after applying the correct typings, but fixing those should be done gradually, it's better to keep it out of this PR
2024-06-11 09:28:40 +00:00
Carlos R. L. Rodrigues
37426939da Feat(order): post purchase support (#7666) 2024-06-10 18:44:51 -03:00
Riqwan Thamir
39ddba2491 chore: ability to group events on redis event bus (#7655)
* chore: ability to group events on redis event bus

* chore: fix tests

* Update packages/modules/event-bus-redis/src/services/event-bus-redis.ts

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>

* chore: change shape of input and body data

* chore: fix builds

* chore: address comments

* chore: fix unit test

---------

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
2024-06-10 22:15:43 +02:00
Stevche Radevski
a62a8be016 chore: Move price list tests to HTTP folder (#7632)
* chore: Move price list tests to HTTP folder

* chore: Remove several unused helpers
2024-06-06 17:17:41 +02:00
Riqwan Thamir
0507dbe027 chore(core-flows,inventory,types,medusa): add fixes to inventory module + location levels api (#7629)
what:

- santizes inputs to prevent reserved_quantity from being updated directly
- inventory items create api can create location levels
- add validation to update quantity of reservation items
- general cleanup

RESOLVES CORE-2254
2024-06-06 12:58:17 +00:00
Kasper Fabricius Kristensen
50ce223e4b feat(types,js-sdk,medusa,fulfillment): Types and SDK methods related to Stock Locations (#7625) 2024-06-06 11:04:42 +02:00
Stevche Radevski
d2e1e9f8c7 fix: Apply strict schema for all body and query parameters (#7624) 2024-06-05 15:40:54 +00:00
Stevche Radevski
a39b542759 chore: Move fulfillment set tests to http folder (#7618) 2024-06-05 17:35:04 +02:00
Riqwan Thamir
0a5b2b5fa7 chore: fix inventory items specs (#7620) 2024-06-05 15:27:54 +02:00
Stevche Radevski
37b794b89d chore: Move upload tests to HTTP layer (#7610) 2024-06-05 12:24:33 +00:00
Stevche Radevski
b2f2c366ec chore: Move stock location tests to HTTP folder (#7615) 2024-06-05 10:37:14 +00:00
Stevche Radevski
1e3c8747e5 chore: Move inventory tests to HTTP layer (#7613) 2024-06-05 09:36:58 +00:00
Stevche Radevski
fafc92b875 Revamp auth module to support multiple providers linked to a single auth identity (#7521) 2024-06-05 07:47:16 +00:00
Oli Juhl
dc087bf310 feat: Move shipping option + profile test and more (#7609) 2024-06-05 08:36:41 +02:00