Commit Graph

106 Commits

Author SHA1 Message Date
Adrien de Peretti
6dc0b8bed8 feat(): Introduce translation module and preliminary application of them (#14189)
* feat(): Translation first steps

* feat(): locale middleware

* feat(): readonly links

* feat(): feature flag

* feat(): modules sdk

* feat(): translation module re export

* start adding workflows

* update typings

* update typings

* test(): Add integration tests

* test(): centralize filters preparation

* test(): centralize filters preparation

* remove unnecessary importy

* fix workflows

* Define StoreLocale inside Store Module

* Link definition to extend Store with supported_locales

* store_locale migration

* Add supported_locales handling in Store Module

* Tests

* Accept supported_locales in Store endpoints

* Add locales to js-sdk

* Include locale list and default locale in Store Detail section

* Initialize local namespace in js-sdk

* Add locales route

* Make code primary key of locale table to facilitate upserts

* Add locales routes

* Show locale code as is

* Add list translations api route

* Batch endpoint

* Types

* New batchTranslationsWorkflow and various updates to existent ones

* Edit default locale UI

* WIP

* Apply translation agnostically

* middleware

* Apply translation agnostically

* fix Apply translation agnostically

* apply translations to product list

* Add feature flag

* fetch translations by batches of 250 max

* fix apply

* improve and test util

* apply to product list

* dont manage translations if no locale

* normalize locale

* potential todo

* Protect translations routes with feature flag

* Extract normalize locale util to core/utils

* Normalize locale on write

* Normalize locale for read

* Use feature flag to guard translations UI across the board

* Avoid throwing incorrectly when locale_code not present in partial updates

* move applyTranslations util

* remove old tests

* fix util tests

* fix(): product end points

* cleanup

* update lock

* remove unused var

* cleanup

* fix apply locale

* missing new dep for test utils

* Change entity_type, entity_id to reference, reference_id

* Remove comment

* Avoid registering translations route if ff not enabled

* Prevent registering express handler for disabled route via defineFileConfig

* Add tests

* Add changeset

* Update test

* fix integration tests, module and internals

* Add locale id plus fixed

* Allow to pass array of reference_id

* fix unit tests

* fix link loading

* fix store route

* fix sales channel test

* fix tests

---------

Co-authored-by: Nicolas Gorga <nicogorga11@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-12-08 19:33:08 +01:00
Adrien de Peretti
b9d6f73320 Feat(): distributed caching (#13435)
RESOLVES CORE-1153

**What**
- This pr mainly lay the foundation the caching layer. It comes with a modules (built in memory cache) and a redis provider.
- Apply caching to few touch point to test

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-09-30 16:19:06 +00:00
Carlos R. L. Rodrigues
e9a06f4b4d fea(providers): locking postgres (#9545)
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-10-17 13:11:39 +00:00
Carlos R. L. Rodrigues
4a03bdbb86 feat(providers): locking redis (#9544) 2024-10-15 12:40:24 -03:00
Carlos R. L. Rodrigues
c8b375ae2d feat(locking): Locking module (#9524)
**What**
- Locking Module to manage concurrency
- Default `in-memory` provider
2024-10-11 16:30:06 +00:00
Adrien de Peretti
58167b5dfa feat(index): Index module foundation (#9095)
**What**
Index module foundation

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-09-18 19:04:04 +00: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
Adrien de Peretti
62a7bcc30c Feat(fulfillment): service provider registration + fulfillment management (#6524)
**What**
- Create the fulfillment manual package with a first iteration API 
- Create a new `AbstractFulfillmentProviderService` and `IFulfillmentProvider`
- Modify the module service interface to add new methods to manipulate the fulfillment and the communication with the external provider
  - create (no bulk)
  - cancel (no bulk)
  - update (no bulk)
  - list
  - listAndCount
  - retrieve
- Add new methods to the service provider service to include communication with the third party provider
  - get options
  - create
  - cancel
  - validate data
  - validate option
- Update/create interfaces and DTO's
- fix repository serializer to allow non entity to be passed without throwing
- split module tests into multiple files to simplify navigation
- Add integration tests to validate fulfillments manipulation and external provider loading + communication

FIXES CORE-1729
FIXES CORE-1785
FIXES CORE-1784
FIXES CORE-1766
2024-03-05 11:11:14 +00:00
Adrien de Peretti
12054f5c01 feat: Fulfillment module basic structure (#6319)
**What**
Scafold the fulfillment module basic structure

**Bonus**
Simplified module scaffolding with new factories and less directories to manage
- mikro orm connection loader factory
- initialize factory

FIXES CORE-1709
FIXES CORE-1710
2024-02-06 13:29:36 +00:00
Kasper Fabricius Kristensen
8cbf6c60fe feat(dashboard): DataTable component (#6297) 2024-02-02 21:56:55 +01:00
Shahed Nasser
f29948a6a8 docs-util: created docblock-generator tool (#6096) 2024-01-24 11:13:40 +01:00
Carlos R. L. Rodrigues
302323916b feat: Workflow engine modules (#6128) 2024-01-23 10:08:08 -03:00
Adrien de Peretti
ddbeed4ea6 chore(workflows, core-flows): Split workflows tooling and definitions (#5705) 2023-11-24 13:55:48 +00:00
Carlos R. L. Rodrigues
9f9db39698 feat(workflows): Workflow DX (#5607) 2023-11-22 17:23:39 +00:00
Riqwan Thamir
8af55aed87 feat(product, types, modules-sdk): added event bus events for products (#4654)
what:

- adds an eventbus dependency to product module.
- emits events on product, category and collection CUD

RESOLVES CORE-1450
2023-08-04 09:26:02 +00:00
Shahed Nasser
c04d93cd04 feat(create-medusa-app): update command for a better onboarding experience (#4215)
* feat(create-medusa-app): update command for a better onboarding experience

* use medusa-telemetry for tracking

* update used snapshot

* added changeset

* update yarn.lock

* increased facts timer

* updated snapshot version

* show facts throughout installation + add first_run to url

* added message after server termination

* print message only once

* added github to process terminated message

* address pr feedback

* added onboarding seeding

* fix for npm install
2023-06-07 20:34:50 +02:00
Adrien de Peretti
5307408894 feat(medusa-payment-paypal): Migrate to the new payment processor API (#3414)
* feat(medusa-payment-paypal): Migrate to the new payment processor API

* WIP

* WIP

* WIP unit tests

* WIP

* unit tests

* fix package.json

* yarn

* cleanup

* address feedback 1/2

* Start to implement a new Paypal SDK

* cleanup

* finalise sdk

* cleanup

* fix push missing file

* rename sdk methods

* unit test the http client

* WIP

* fix http client

* Create .changeset/empty-melons-eat.md

* refactor tests

* fix quote

* fix options

* cleanup

* do not retry auth

* WIP

* retry mechanism max attempts

* use both old and new options

* fix capture

* remove totals fields

* add missing method

* cleanup

* fix current tests

* authorize should update the data with the fresh order

* remove comments

* fix tests

* Update packages/medusa-payment-paypal/src/core/paypal-http-client.ts

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>

* fix unit tests

* update changeset

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2023-03-28 13:49:09 +02:00
Carlos R. L. Rodrigues
4e9d257d3b Chore(medusa,utils,types,inventory,stock-location): remove core dependency modules (#3531) 2023-03-23 08:07:32 -03:00
Oliver Windall Juhl
74bc4b16a0 feat(medusa-plugin-algolia): Revamp Algolia search plugin (#3510) 2023-03-22 12:55:26 +01:00
Oliver Windall Juhl
ef5ef9f5a2 feat(medusa,event-bus-local,event-bus-redis): Event Bus modules (#2599) 2023-03-22 10:26:21 +01:00
Kasper Fabricius Kristensen
40de54b010 feat(admin,admin-ui,medusa): Add Medusa Admin plugin (#3334) 2023-03-03 10:09:16 +01:00
Adrien de Peretti
589d1c09b0 feat(medusa-payment-stripe): Stripe PaymentProcessor implementation (#3257) 2023-02-28 18:44:24 +01:00
Adrien de Peretti
c8724da503 feat(medusa,medusa-payment-stripe): Move database mutation from plugin to core (#2743)
**what**
The goal of that PR is to first refactor the payment provider and payment plugin to support the new API that removes the data mutation from within the plugin to be done by the core instead. In any case, this pr does not include the steps of the deeper refactoring. The last part will come in later pr.

**How**
- The payment plugin is now capable to handle both the deprecated and new API and the plugin works the same as it use to works.
- The mutation made by the plugin have been moved into the core as well as the subscriber
- The tests have been updated to reflect the changed
- Remove all new methods introduced by the payment collections
  - Mutualise types
  - Update provider and payment collection services
  - cleanup around all those refactoring including cleanup of the payment collection
  - refactor stripe payment plugin

FIXES CORE-887
2022-12-19 14:37:35 +00:00
Carlos R. L. Rodrigues
a94d9816fe chore: Centralise ESLint rules (#2162)
* chore: centrilize eslint rules
2022-09-13 07:42:33 -03:00
Adrien de Peretti
5f9197a656 refactor(medusa): Loaders to TS (#1288)
* refactor(medusa): Loaders

* refactor(medusa): Improve MedusaContainer typings

* refactor(medusa): Improve MedusaContainer typings
2022-04-03 21:16:17 +02:00
Edin Skeja
f2ba4018fc medusa-file-minio (#883)
* A first commit for medusa-file-minio

* Cleanup and remove unnecessary env vars

* Update packages

* Small fix big letter
2021-12-08 10:04:47 +01:00
Oliver Windall Juhl
373532ecbc feat: Typescript for API layer (#817)
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
Co-authored-by: Zakaria El Asri <33696020+zakariaelas@users.noreply.github.com>
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com>
Co-authored-by: Sebastian Rindom <seb@medusa-commerce.com>
2021-11-18 15:19:17 +01:00
Ajordat
caf4357c4d fix: make packages/medusa/src/services/payment-provider.js pass eslint (#549)
* fix: make packages/medusa/src/services/payment-provider.js pass eslint

* Linted files line-item, payment-provider and shipping-option.

* Update README.md (#692)

* fix: make packages/medusa/src/services/payment-provider.js pass eslint

* Linted files line-item, payment-provider and shipping-option.

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2021-11-10 17:37:23 +01:00
Leo Lou
0caba0d491 fix: make packages/medusa/src/services/cart.js pass eslint (#700) 2021-11-07 19:12:15 +01:00
Mihir50
a351398379 fix: Make packages/medusa/src/services/product-variant.js pass linting (#693) 2021-10-31 12:48:18 +01:00
Asian Cat
f01166272d fix: make packages/medusa/src/api/routes/admin/notes pass eslint (#690) 2021-10-31 09:34:47 +01:00
Emme Bravo
d9ee127284 fix: make api/routes/store/swaps pass eslint (#678) 2021-10-31 09:32:17 +01:00
Abdullah Pathan
c9234c2343 fix: make api/routes/admin/apps pass eslint (#641) 2021-10-31 08:55:58 +01:00
Srujan Deshpande
7a230ec7e9 fix: make packages/medusa/src/api/routes/admin/store pass eslint (#686) 2021-10-29 14:49:41 +02:00
Oliver Windall Juhl
5ce949f3b0 Revert "fix: make packages/medusa/src/api/routes/store/carts pass eslint (#652)" (#689)
Integration tests not passing.
2021-10-29 11:27:40 +02:00
Leo Leone
1ba63cce08 fix: make packages/medusa/src/api/routes/store/carts pass eslint (#652) 2021-10-29 11:18:38 +02:00
Marlon Emmerich
2c415ea520 fix: make packages/medusa/src/services/shipping-profile.js pass eslint (#582) 2021-10-29 11:09:59 +02:00
Alok Kumar Sahoo
6c50d4ddfd chore: make /packages/medusa/src/services/event-bus.js pass linting (#575) 2021-10-29 11:05:23 +02:00
Woramat Ngamkham
dc8821095c fix: make packages/medusa/src/api/routes/admin/orders pass eslint (#649) 2021-10-27 19:49:59 +02:00
michizhou
ce4d3616d7 fix: make packages/medusa/src/api/routes/admin/shipping-profiles pass eslint (#642) 2021-10-27 09:15:46 +02:00
Leo Leone
2f7deea1d0 fix: make packages/medusa/src/api/routes/admin/returns pass eslint (#653) 2021-10-26 20:05:58 +02:00
Leo Leone
a8fc89af06 fix: make packages/medusa/src/api/routes/admin/return-reasons pass eslint (#654) 2021-10-26 20:01:30 +02:00
Daniel Tiringer
c648a3c960 Fix linting errors in admin/draft-orders (#676) 2021-10-26 19:59:36 +02:00
Luca Pizzini
748270a75d chore: Make packages/medusa/src/api/routes/admin/customers pass linting (#681) 2021-10-26 19:55:08 +02:00
Ronaldo Caetano
662b1ee670 Merge branch 'medusajs:develop' into develop 2021-10-25 22:07:36 -03:00
Ronaldo Caetano
3df2b4279f fix: make discounts pass eslint 2021-10-25 22:06:46 -03:00
Sebastian Rindom
d0733e0b63 Merge branch 'develop' into develop 2021-10-25 21:14:45 +02:00
AjayPrabuR
bd86d3c995 fix: make packages/medusa/src/api/routes/admin/shipping-options pass eslint (#674) 2021-10-25 20:53:14 +02:00
Nick Ni
25ed7dc056 chore: Make packages/medusa/src/api/routes/admin/notifications pass linting (#675)
Co-authored-by: Nicholas Ni <nicholas_ni@intuit.com>
2021-10-25 20:48:11 +02:00
Audrey Kon
95f80f8a66 fix: make packages/medusa/src/api/routes/admin/auth and 3 others pass eslint (#666) 2021-10-25 20:17:42 +02:00