Commit Graph

81 Commits

Author SHA1 Message Date
Riqwan Thamir
91c17651f1 feat(core-flows, fulfillment): validate shipping options to stock locations (#8291)
what:

- validate shipping options to stock locations

RESOLVES CC-232
2024-07-26 12:26:26 +00:00
Stevche Radevski
6d0650818a feat:Add confirmation step to product import (#8284)
CLOSES CC-251
2024-07-25 14:54:31 +00:00
Stevche Radevski
444a244eab feat: Add basic support for importing products (#8266) 2024-07-25 11:07:24 +02:00
Stevche Radevski
44f593a7ca fix:Product options were not preserved over updates (#8267) 2024-07-25 08:24:26 +02:00
Carlos R. L. Rodrigues
cae27b08bd fix(order): remove nested entities (#8250) 2024-07-23 18:21:33 +00:00
Carlos R. L. Rodrigues
1aa2d7b611 chore: rm testing path (#8249) 2024-07-23 16:58:54 +00:00
Carlos R. L. Rodrigues
7a5349c0ae chore(core-flows): adjust inventory when return is received (#8222) 2024-07-23 13:36:46 -03:00
Carlos R. L. Rodrigues
f38f6d53b4 fix(core-flows): confirm return request (#8242) 2024-07-23 13:29:06 -03:00
Adrien de Peretti
47dde05517 chore(framework): Initial commit (#8221)
**What**
- Initiate the framework package (which is just a place to move things around for now)
- move the config loader and related resources as well as the `ConfigModule` type
- Create a ConfigManager singleton which prepare and store the config (later can be stored entirely in the container) and allow for easier test override
- re export the logger from the framework
- replace medusa config loader with the framework one
- `build` run type check on tests as well but `prepublishOnly` will not fail on build if tests are typed broken

FIXES FRMW-2607
FIXES FRMW-2609
FIXES FRMW-2614
FIXES FRMW-2618
2024-07-23 15:46:28 +00:00
Stevche Radevski
4b09be3a88 feat: Add skeleton for supporting product imports in BE (#8232) 2024-07-23 11:16:14 +02:00
Stevche Radevski
4c67599730 fix: Event emitter not cleared in export tests (#8228) 2024-07-22 21:43:22 +02:00
Stevche Radevski
0d2e7befbd feat: Add support for exporting products in backend (#8214)
CLOSES CC-221
CLOSES CC-223
CLOSES CC-224
2024-07-22 13:40:04 +00:00
Carlos R. L. Rodrigues
fb29b958fa chore(inventory, core-flows): big number support (#8204) 2024-07-22 06:32:25 -03:00
Adrien de Peretti
c307972a99 chore(medusa): rm default created at field (#8213)
**What**
To maintain the backward compatibility, we use to populate `created_at` no matter what. But since we can break things from v1, I ll remove it as we moved the default ordering to the repository layer
2024-07-22 08:20:14 +00:00
Carlos R. L. Rodrigues
07205e4249 fix(utils): totals calculation (#8190) 2024-07-19 06:49:49 -03:00
Carlos R. L. Rodrigues
535832b692 chore(medusa, core-flows): receive item return request (#8172)
What:
* `POST /admin/returns/:id/receive-items`
* `POST /admin/returns/:id/receive-items/:action_id`
* `DELETE /admin/returns/:id/receive-items/:action_id`
* `POST /admin/returns/:id/dismiss-items`
* `POST /admin/returns/:id/dismiss-items/:action_id`
* `DELETE /admin/returns/:id/dismiss-items/:action_id`
* `POST /admin/returns/:id/receive/confirm`

CLOSES: CC-190, CC-191, CC-192, CC-193, CC-195, CC-196, CC-197

* Inventory management isn't included yet. Will add it in a next PR
2024-07-18 14:46:34 +00:00
Stevche Radevski
8d083d6d0f feat: Add product export endpoint and a dummy workflow (#8178) 2024-07-18 15:19:15 +02:00
Carlos R. L. Rodrigues
1a472733ae chore(medusa,core-flows): begin and cancel receive return (#8171)
What:
* `POST /admin/returns/:id/receive` 
* `DELETE /admin/returns/:id/receive`

CLOSES: CC-189
2024-07-18 12:55:04 +00:00
Carlos R. L. Rodrigues
1acfdc4ffe chore(core-flows, medusa): cancel request return (#8153)
* fix(core-flow): request item return reason

* chore(core-flows): cancel request return
2024-07-17 09:35:46 +01:00
Carlos R. L. Rodrigues
d4fe2daa57 fix(core-flow): request item return reason (#8152) 2024-07-17 09:35:33 +01:00
Carlos R. L. Rodrigues
23053afe95 chore(medusa,core-flows): update request return items and shipping (#8151) 2024-07-16 15:23:28 -03:00
Carlos R. L. Rodrigues
5813216c88 core(core-flows, medusa): remove request item return (#8146) 2024-07-16 11:23:34 -03:00
Oli Juhl
4024935e91 feat(medusa): Order preview endpoint (#8144)
* feat: Add order preview endpoint

* remove log

* add test

* add note
2024-07-16 12:42:02 +01:00
Carlos R. L. Rodrigues
7123f9ff63 feat(core-flows,medusa,order): remove return shipping (#8137)
What:
* `DELETE /admin/returs/:id/shipping_methods/:action_id`

FIXES: CC-187
2024-07-16 10:27:16 +00:00
Oli Juhl
b7e6b1461b feat: Returns order previews (#8135)
* work on order previews

* fix create return shipping flow

* fix http tests

* fix tests
2024-07-16 11:07:04 +01:00
Oli Juhl
ffd4b195ee feat: Add exchange return shipping (#8108)
* wip

* finalize tests

* feat: Add exchange return shipping

* add shipping to preview

* test input

* move utils and ignore already inserted shipping method

* use custom price

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
2024-07-15 22:04:20 +02:00
Oli Juhl
00c7900337 feat: Admin Returns API (#8117)
* feat: Add request item + add shipping APIs

* wip

* finalize workflow

* move steps

* add returns to js-sdk

* few chores

* fix test

* fix another test :)
2024-07-15 15:57:06 +02:00
Carlos R. L. Rodrigues
3d7d629e75 chore(pricing): big number support (#8113) 2024-07-12 19:27:28 +00:00
Stevche Radevski
101ebbe0f0 fix: Have shipping options open by default (#8040)
CLOSES CORE-2455
2024-07-09 13:59:45 +00:00
Stevche Radevski
00a6e512dc feat: Add support in BE for setting tax inclusivity on currency (#8037) 2024-07-09 15:22:24 +02: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
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
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
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
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
Oli Juhl
b1df20b0dc fix(inventory): Entity Formulas + softDelete and restore (#7851) 2024-06-26 20:51:19 +02: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
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