Commit Graph

44 Commits

Author SHA1 Message Date
Harminder Virk
7f53fe06b6 Initial implementation of data types and base schema (#7644) 2024-06-10 14:31:42 +05:30
Oli Juhl
3f661c917b feat: Fix subscribers loading + add order <> cart link (#7617) 2024-06-09 12:31:28 +02:00
Riqwan Thamir
fbb00f3863 chore: group & release events for local eventbus (#7649)
* chore: stage & release events for local eventbus

* chore: address review

* chore: mock emitter correctly
2024-06-07 15:31:16 +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
Adrien de Peretti
3f62bfad5a fix: should disable db connection ssl when some url params are provided (#7634)
**What**
Enable ssl identification from the client url query params as well
2024-06-06 14:52:12 +00:00
Adrien de Peretti
3fbb8aa671 feat: Product module events (#7598)
WIP, not ready to review

**what**
- add events
- integration tests of emitted events
- remove integration tests on auto generated services in favor of module method integration tests
2024-06-06 11:47:38 +00:00
Adrien de Peretti
da3837f2bc chore: return meta information on created/updated/deleted object from upsertWithReplace (#7616)
**What**
- Return the updated/deleted/created entities from the upsert with replace according to the configuration

This will help to emit the events from the product module as it rely on this abstraction in many places
2024-06-05 20:04:45 +00:00
Harminder Virk
2b62686ec6 implement events to the pricing module (#7584) 2024-06-05 17:33:49 +05:30
Shahed Nasser
6646a203df chore(types, utils): add TSDocs for AbstractNotificationProviderService (#7556)
Add TSDocs for `AbstractNotificationProviderService` which will be used to generate a reference on how to create a notification provider module.
2024-06-04 13:36:06 +00:00
Adrien de Peretti
337b8ce0bb chore: Resolve flaky integration tests (#7587) 2024-06-03 16:29:08 +02:00
Adrien de Peretti
9608bf06ef feat: Event emitting part 1/N (Fulfillment) (#7391)
**What**
Add support for event emitting in the fulfillment module

**NOTE**
It does not include the review of the events for the abstract module factory if the method is not implemented in the module itself and rely on the default implementation
2024-06-03 08:29:35 +00:00
Shahed Nasser
28d2a5347a chore(types, utils): added TSDocs for file provider module (#7553)
* chore(types, utils): added TSDocs for file provider module

* fix import
2024-06-03 10:18:02 +02:00
Shahed Nasser
872c42c6dc chore(utils): added TSDocs to AbstractAuthModuleProvider (#7550)
Added TSDocs to AbstractAuthModuleProvider. These are used to generate the reference on how to create an auth provider module.
2024-06-03 07:41:09 +00:00
Sebastian Rindom
e66cf9112d fix(utils): support omitting modules in config (#7563)
* fix: skip module loading if mod: false

* fix: don't include disabled modules in config

* add test

* fix: revert changes to module loading in medusaapp
2024-05-31 15:28:52 +02:00
Harminder Virk
11528526fa feat: loosely typed container 2024-05-31 15:22:03 +05:30
Carlos R. L. Rodrigues
096372463e chore(promotion): big number calc (#7537) 2024-05-30 07:23:57 -03:00
Stevche Radevski
aeda24265d feat: Remove returning token from customer and user endpoints (#7523)
* chore: Move generateJwtToken to utils

* feat: Stop returning token on user and customer endpoints
2024-05-29 17:13:01 +02:00
Harminder Virk
a40b6aef6d Add defineConfig helper (#7517) 2024-05-29 17:10:15 +05:30
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