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
Adrien de Peretti
617a5972bf
feat: refactor module joiner config and links generation ( #7859 )
...
* feat: refactor module joiner config and links generation
* improve typings
* WIP
* WIP
* WIP
* rename type file
* create link config
* finish typings and add utils
* improve links
* WIP typings
* finalize ExportModule utils
* finalize ExportModule utils
* fix: dml tests
* improve and fixes
* simplify typings with id changes
* add toJSON
* multiple fixes and entity builder fixes
* fix currency searchable
* fix tests
* medusa service refactoring
* cleanup
* cleanup and fixes
* make module name optional
* renaming
---------
Co-authored-by: Harminder Virk <virk.officials@gmail.com >
2024-07-03 13:12:49 +02:00
Riqwan Thamir
3f16b011fa
feat(utils,types): DML Index can generate where SQL from a query builder ( #7849 )
...
what:
- introduces a simple query builder
- uses the query builder to tranform an object in where to SQL when applying indexes
```
Examples:
{ where: { column: null } } -> column IS NULL
{ where: { column: { $ne: null } } } -> column IS NOT NULL
{ where: { boolean_column: true } } -> boolean_column IS TRUE
{ where: { column: "value", another_column: { $ne: 30 } } } -> column = "value" AND another_column != 30
```
```
const user = model
.define("user", {
email: model.text(),
account: model.text(),
organization: model.text(),
})
.indexes([
{
on: ["organization", "account"],
where: { email: { $ne: null } },
},
{
name: "IDX-email-account-special",
on: ["organization", "account"],
where: {
email: { $ne: null },
account: null,
},
},
```
RESOLVES CORE-2392
2024-06-27 10:24:34 +00:00
Adrien de Peretti
34c44078e7
fix: DML relation management for many to one relation ship foreign keys ( #7790 )
...
FIXES CORE-2369
cc @thetutlage
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2024-06-24 18:54:54 +00:00
Shahed Nasser
79d90fadc4
feat(utils): configure notification module by default ( #7814 )
...
Add the notification module to `defineConfig` and configure the local notification module.
2024-06-24 14:47:40 +00: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
Harminder Virk
fd87858bd9
Handle embedded pg schema name inside the table name when generating indexes ( #7774 )
2024-06-19 16:48:44 +05:30
Carlos R. L. Rodrigues
cfa983001b
feat(order): create claim and exchange ( #7734 )
2024-06-18 08:08:16 -03: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
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
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
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
Harminder Virk
a502222582
refactor: remove usage of inventory_quantity from the codebase ( #7323 )
2024-05-14 13:01:49 +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
bbccd6481d
chore(): start moving some packages to the core directory ( #7215 )
2024-05-03 13:37:41 +02:00