576 Commits

Author SHA1 Message Date
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
Harminder Virk
ef6d748784 feat: add Filesystem util and load env util (#7487) 2024-05-28 15:31:13 +05:30
Riqwan Thamir
7baedf73d5 feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart (#7470)
* feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart

* chore: split steps into 2 for add-to-cart

* chore: split steps into 2 for add-to-cart

* chore: iterate safely

* chore: parallelize upsert
2024-05-27 17:54:11 +02:00
Adrien de Peretti
b8bc3ed16f chore: Start cleaning up medusa-core-utils (#7450)
**What**
- remove medusa-core-utils
- dispatch the utils where they belongs
- update usage

**NOTE**
I have been wondering if the graceful class should go into the utils package or medusa package, I ve put it in the medusa package as it seems to be the best place I can see for now and is tight to the server as well. Also, I wanted to avoid the utils package to depends on http and net dependencies, happy to change that if you feel like it
2024-05-27 08:00:15 +00:00
Adrien de Peretti
77d72c5791 fix(customer): Unique constraint on customer email (#7439)
**What**
Prevent creating multiple customers with the same email
2024-05-24 14:20:54 +00:00
Stevche Radevski
135772b27b feat: Revert to using app_metadata for authentication (#7433) 2024-05-23 22:01:41 +02:00
Stevche Radevski
8a070d5d85 Revamp the authentication setup (#7419)
* feat: Add email pass authentication provider package

* feat: Revamp auth module and remove concept of scope

* feat: Revamp the auth module to be more standardized in how providers are loaded

* feat: Switch from scope to actor type for authentication

* feat: Add support for per-actor auth methods

* feat: Add emailpass auth provider by default

* fix: Add back app_metadata in auth module
2024-05-23 20:56:40 +02:00
Adrien de Peretti
37ae87fe9b fix(admin-next, utils, medusa): Handle db errors properly and fix form (#7416)
* fix(admin-next, utils, medusa): Handle db errors properly and fix form

* fix(admin-next, utils, medusa): Handle db errors properly and fix form

* fix(admin-next, utils, medusa): Handle db errors properly and fix form

* fix(admin-next, utils, medusa): Handle db errors properly and fix form
2024-05-23 12:36:45 +02: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
Harminder Virk
72f98ea50b refactor: implement query suggestions from Adrien 2024-05-17 14:42:57 +05:30
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
Stevche Radevski
ee924b1b28 feat: Add a simple configurable notifications subscriber (#7331)
* feat: Add a simple configurable notifications subscriber that is configurable

* Proposal on awaiting all subscribers to run

* fix: Clean up wait subscribers util and notifications test

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
2024-05-16 13:36:09 +02:00
Harminder Virk
17486cda99 Validate product and collection handles to be URL safe (#7310)
* fix: allow URL safe characters for product handle

Fixes: CORE-2072
2024-05-15 17:50:26 +02:00
Carlos R. L. Rodrigues
7c4f4d7388 feat(payment): update payment collection status (#7335) 2024-05-15 15:11:40 +00: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
4ef70d37bf feat(order): receive return and additional calculations (#7314) 2024-05-14 08:35:31 -03:00
Carlos R. L. Rodrigues
9dae86daa2 chore: es target 2021 (#7325) 2024-05-14 08:07:14 -03:00
Harminder Virk
a502222582 refactor: remove usage of inventory_quantity from the codebase (#7323) 2024-05-14 13:01:49 +02:00
Adrien de Peretti
63623422fe chore(): Autoload module resources (#7291)
**What**
- automatically build and consume connection and container loader if not exported by the module
- therefore load the services and repositories automatically, including baseRepository
- automatically build run and revert migrations if not provided
- cleaup modules to remove extra unnecessary bits and pieces
- remove the `initializeFactory` in favor of using `medusaApp`

Should drastically improve the module building DX by removing a lot of boilerplate to handle by the user, that plus the base entity should simplify quite a lot the flow cc @shahednasser 

**Note**
I had to choose a way to identify connection and container loader from the exported loader from the module. I decided to go with named function `connectionLoader` and `containerLoader`, also, now the factories will return named function so if the user use the factories we are providing to build those loaders, the function will also be named and identified
2024-05-13 12:12:36 +00:00
Adrien de Peretti
45e2228a07 chore(utils): Provide a mikro orm base entity (#7286)
**What**
Provide a new mikro orm base entity in order to abstract away the on init and on create which include the id auto generation if not provided. The main goal is to reduce complexity in entity definition
2024-05-10 09:27:33 +00:00
Stevche Radevski
144e09e852 feat: Add the basic implementation of notification module (#7282)
* feat: Add the basic implementation of notification module

* fix: Minor fixes and introduction of idempotency key

* fix: Changes based on PR review
2024-05-10 11:22:03 +02:00
Riqwan Thamir
0430e63b0b feat(core-flows,typers,utils,medusa): add payment auth step to complete cart workflow - [complete cart part 3] (#7248)
* chore: authorize payment sessions for cart

* chore: add spec for cart returns

* fix: Correctly select fields for cart

* chore: fix specs + address comments

---------

Co-authored-by: Stevche Radevski <sradevski@live.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
2024-05-06 23:34:56 +02:00
Carlos R. L. Rodrigues
5228b14ca9 feat(medusa): complete cart create reservation (#7250) 2024-05-06 14:36:55 -03:00
Adrien de Peretti
a736e728b8 fix: package.json run test integration in packages (#7249) 2024-05-06 19:25:37 +02: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
bbccd6481d chore(): start moving some packages to the core directory (#7215) 2024-05-03 13:37:41 +02:00