Commit Graph

38 Commits

Author SHA1 Message Date
Adrien de Peretti
f74fdcb644 breaking: rework how links database migrations are managed (#8162) 2024-07-22 13:12:23 +05:30
Harminder Virk
f579f0b3be feat: restructure events payload (#8143)
* refactor: restructure events payload

Breaking change: This PR changes the event payload accepted by the event
listeners

* refactor: fix failing tests and implement feedback

* add integration tests

* fix timeout

---------

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
2024-07-16 17:09:16 +01:00
Carlos R. L. Rodrigues
de36e2b36e chore: rename return flow (#8050) 2024-07-10 08:09:10 -03:00
Adrien de Peretti
32998b7527 fix: The table existence check should quote the table name (#7949) 2024-07-04 16:17:24 +02: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
Riqwan Thamir
b6e4435c23 chore: cleanup migrations logs (#7924)
what:

when running `medusa run migrations`, cleanup logs with short descriptive message.

Before:

<img width="1262" alt="Screenshot 2024-07-03 at 14 31 36" src="https://github.com/medusajs/medusa/assets/5105988/504e9c24-371c-476d-9b6d-2dfe1a4088dc">

After:

<img width="1004" alt="Screenshot 2024-07-03 at 14 42 57" src="https://github.com/medusajs/medusa/assets/5105988/a89eaed5-04a4-4efb-a2e9-ca480f1eaa6e">
2024-07-03 13:53:59 +00:00
Carlos R. L. Rodrigues
a7844efd09 chore: move ModuleRegistrationName to utils (#7911) 2024-07-03 06:30:56 -03:00
Carlos R. L. Rodrigues
07715e6b50 chore(order): cancel return (#7881) 2024-07-02 06:52:58 -03:00
Carlos R. L. Rodrigues
17e6a83b59 fix(utils): joiner config from medusa project (#7896) 2024-07-01 13:48:34 -03: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
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
03924a4ff6 chore: move to swc/jest (#7739)
* chore: move to swc

* chore: fix tax rate tests

* chore: undo failed test

* chore: fix unit tests script

* chore: use node 20

* Update scripts/run-workspace-unit-tests-in-chunks.sh
2024-06-20 12:59:33 +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
Frane Polić
3ecbec9685 feat(dashboard): inventory details variants section (#7705) 2024-06-14 11:18:23 +02:00
Riqwan Thamir
3d33f06e77 chore: upgrade jest everywhere (#7703) 2024-06-14 07:35:30 +02: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
Oli Juhl
3f661c917b feat: Fix subscribers loading + add order <> cart link (#7617) 2024-06-09 12:31:28 +02:00
Adrien de Peretti
2e77a076b8 feat: Add emitEvent step + cleanup (#7643)
* feat: Add emitEvent step + cleanup

* fix typo

* fix typo
2024-06-07 11:52:19 +02:00
Riqwan Thamir
ecfbfcc707 feat(core-flows,modules-sdk,types,medusa,link-modules): adds variant <> inventory item link endpoints (#7576)
what:

- adds variant inventory link management endpoints:
```
Link inventory item to variant
POST /products/:id/variants/:vid/inventory-items

Update variant's inventory item link
POST /products/:id/variants/:vid/inventory-items/:iid

Unlink variant's inventory item
DELETE /products/:id/variants/:vid/inventory-items/:iid
```

- a batch endpoint that does the above 3 across variants
```
POST /products/:id/variants/inventory-items
```
2024-06-03 18:23:29 +00:00
Carlos R. L. Rodrigues
f1ced57d5f chore: payment auto capture + remove enum from utils (#7513)
What:

- handles payments session that are auto captured
- removes all the enums from `@medusajs/types`
- move all `@medusajs/types` to devDependencies
2024-05-29 11:12:59 +00:00
Shahed Nasser
7390821da5 fix(link-modules): move readonly link to readonly directory (#7446) 2024-05-24 16:32:25 +03:00
Shahed Nasser
98808b6caa fix(link-modules): remove duplicate fulfillment set location link (#7441)
Remove the link defined in `location-fulfillment-set` because it's a duplicate of `fulfillment-set-location`.
2024-05-24 12:04:44 +00:00
Stevche Radevski
135772b27b feat: Revert to using app_metadata for authentication (#7433) 2024-05-23 22:01:41 +02:00
Riqwan Thamir
e3beaf5a29 chore: add cart links to promotions/product (#7428) 2024-05-23 16:54:09 +02:00
Carlos R. L. Rodrigues
f3d19f5394 fix(workflows-sdk): use loaded modules when container is empty (#7422) 2024-05-23 08:26:16 -03:00
Oli Juhl
9a10adfd91 fix: Remove log for read only links (#7410) 2024-05-22 22:36:23 +02:00
Carlos R. L. Rodrigues
e760dbc953 fix(link-modules): fix warn on readonly links (#7403) 2024-05-22 13:07:30 +00:00
Stevche Radevski
5ede560f70 feat(auth): Revamp authentication setup (#7387)
* chore: Clean up authentication middlewares

* chore: Rename AuthUser to AuthIdentity

* feat: Define link between user, customer, and auth identity

* feat: Use links for auth, update auth context content

* fix: Adjust user create command with new auth setup

* fix: Make auth login more dynamic, review fixes

* fix: Change test assertions for created by
2024-05-22 10:27:32 +02:00
Frane Polić
521b4e7926 feat(dashboard): order fulfillment UI (#7262)
* feat: initial impl. of Unfulfilled section and create flow

* feat: create fulfillment

* feat: order <> fulfillment link, fulfillment section

* feat: accept order_id when creating fulfillment

* feat: finish create and cancel

* fix: integration test

* refactor: real Order<>Fulfillment link instead readonly, add link step to the workflow

* fix: revert `order_id` definitions

* chore: add changeset

* fix: build

* fix: address comments

* fix: fetch inventory and location levels for fulfilled variant

* fix: loading inventory details

* add isList to order fulfillment link

* fix: duplicate declaration

* fix: type

* refactor: link orders step, fix client

* fix: move translations to the new file

* fix: pass order id in test

---------

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2024-05-20 13:41:09 +02:00
Adrien de Peretti
a775d57255 feat(core-flows, types): Create return order (#7319)
**what**
- Create return workflow partial implementation
- Update some order domain types
- create order fulfillment link

**NOTE**
this PR is partially done but can still be merged as is, it will require some discussions around the flow and some unknowns or uncertainty in regards to some data and some behaviour
2024-05-16 14:10:54 +00:00
Adrien de Peretti
13ce60b999 fix(medusa, modules-sdk): Fix migrate command and fix revert support (#7340) 2024-05-15 15:46:23 +02:00
Carlos R. L. Rodrigues
70fd355e46 chore(order): link order and payment collection (#7334) 2024-05-14 20:37:27 +00:00
Carlos R. L. Rodrigues
9dae86daa2 chore: es target 2021 (#7325) 2024-05-14 08:07:14 -03:00
Frane Polić
39c3f6d92a feat(dashboard): basic Order UI (#7225)
**WHAT**
- rudimentary list and details pages
- fix Order<>Promotion link
- fix Order<>SalesChannel link

**NOTE**
- displaying basic info since we don't have Fulfillments & Payments linked ATM
- `disaply_id` needs to be added to order
- `tax_rate` needs to be added to order

---


https://github.com/medusajs/medusa/assets/16856471/cd4e98c7-345e-4193-8c1e-ad4ed1584993



Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-05-07 07:28:42 +00:00
Carlos R. L. Rodrigues
5443c69794 feat(link-module): Order Product link (#7243) 2024-05-05 17:26:16 +00:00
Carlos R. L. Rodrigues
aba194de9a chore: complete cart part 2 (#7227) 2024-05-05 10:35:09 -03:00
Oli Juhl
2f7b53488d fix: Accept filters in softDelete + fulfillment location clean-up (#7198) 2024-05-03 16:32:07 +00:00
Adrien de Peretti
4eae25e1ef chore(): Reorganize modules (#7210)
**What**
Move all modules to the modules directory
2024-05-02 15:33:34 +00:00