Commit Graph

1007 Commits

Author SHA1 Message Date
Shahed Nasser
d7342c6f82 chore(types): add TSDocs for retentionTime (#11345) 2025-02-06 15:22:32 +02:00
Adrien de Peretti
a33aebd895 feat(index): full sync operations (#11178)
Closes: FRMW-2892, FRMW-2893

**What**
Wired up the building block that we merged previously in order to manage data synchronization. The flow is as follow
- On application start
  - Build schema object representation from configuration
  - Check configuration changes
    - if new entities configured
      - Data synchronizer initialize orchestrator and start sync
        - for each entity
          - acquire lock
          - mark existing data as staled
          - sync all data by batch
          - marked them not staled anymore
          - acknowledge each processed batch and renew lock
          - update metadata with last synced cursor for entity X
          - release lock
      - remove all remaining staled data
    - if any entities removed from last configuration
      - remove the index data and relations

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-02-05 16:49:18 +00:00
Frane Polić
742babfe3f fix(core-flows): shipping profile update (#11322)
**What**
- prevent unsetting shipping profile on product update
2025-02-05 14:37:43 +00:00
Shahed Nasser
da25980d24 chore(core-flows): update the TSDocs of new steps (#11315) 2025-02-05 16:20:23 +02:00
Kasper Fabricius Kristensen
6db96c80d0 fix(ui,types): Add Metadata form for collection (#11300)
**What**
- Adds missing Metadata form for collections
- Fixes type of metadata in update payload
- Fixes an issue where deleting the last row of a metadata form would prevent adding new ones.

Resolves SUP-784
2025-02-05 12:53:30 +00:00
Shahed Nasser
4be327819f chore(types): add @version to new payment provider methods (#11316) 2025-02-05 12:51:08 +02:00
Shahed Nasser
9f1a3b2a42 fix(medusa, types): fix promotion HTTP types in cart (#11304) 2025-02-05 12:31:24 +02:00
Harminder Virk
3c51709daf feat: map container types for core services to interface (#11295) 2025-02-04 15:47:55 +05:30
Frane Polić
462c3e8057 feat(core-flows): cart complete shipping validate (#10984)
**What**
- validate that there is a shipping method if any of the line items have requires_shipping=true
- validate that products shipping profile is supported by a shipping method on the cart
- update tests

---

CLOSES CMRC-683
2025-02-04 10:10:08 +00:00
Kasper Fabricius Kristensen
f07af7b93c fix(dashboard,core-flows,types,medusa): Allow editing Order metadata (#11285)
Resolves SUP-780
2025-02-04 10:08:20 +00:00
Harminder Virk
016e332e9b feat: make AbstractModuleService create method type-safe (#11216) 2025-02-03 21:25:01 +05:30
Shahed Nasser
c366ae3b61 chore(framework): add example of admin's vite configurations (#11283) 2025-02-03 16:30:06 +02:00
Carlos R. L. Rodrigues
65fae943c9 feat(orchestration): hydrate resultset (#11263)
What:
* Add support for aggregating data into existing resultset.
* `query.graph` new option `initialData` containing the resultset to be hydrated
* It fetches data where the requested fields are not present and merge with the existing resultset
2025-02-03 11:24:57 +00:00
Shahed Nasser
18f7b71b1b chore(core-flows,types): update TSDocs following latest payment changes (#11241) 2025-01-31 11:39:10 +02:00
Jay Kanjia
356c877878 fix: complete cart workflow (#10780)
cart metadata not assigned to order metadata,
added metadata field in completeCartFields (core-workflow)
2025-01-31 08:18:48 +00:00
Carlos R. L. Rodrigues
e98d3c615e chore(orchestration): validate PK when throwIfKeyNotFound (#11190)
CLOSES: FRMW-2895
2025-01-29 19:17:36 +00:00
Stevche Radevski
614ff2907f fix: Add missing typings around creating a payment method (#11209) 2025-01-29 10:55:36 +01:00
Harminder Virk
c982117186 fix: always load .env file alongside the environment specific file (#11188) 2025-01-29 14:22:50 +05:30
Harminder Virk
716de2cb3a fix: exit process with a status code when build fails (#11206)
Fixes: FRMW-2897
CLOSES CLO-434

Still need the frontend Admin bundler to provide some way to know if the build has failed or not.
2025-01-29 08:34:47 +00:00
Oli Juhl
ae3292c98b chore(js-sdk): Remove create user method from SDK (#11186)
Endpoint doesn't exist. Admin users can only be created through invites at the HTTP level.
2025-01-28 12:11:58 +00:00
Riqwan Thamir
8af4fb0ba7 feat(medusa): add sku to variant query params (#11151)
what:

- adds sku to variant query params
2025-01-28 10:26:29 +00:00
Stevche Radevski
59cbc0ec77 feat: Add support for managing account holder in payment module (#11015) 2025-01-28 08:55:15 +01:00
Oli Juhl
961ad4723e fix(dashboard): Matching product profile with shipping profile (#11183) 2025-01-27 17:13:07 +00:00
Kasper Fabricius Kristensen
65d8d6dc0e fix(js-sdk,admin-bundler): Fix qs import (#11172) 2025-01-27 15:00:18 +00:00
Adrien de Peretti
ea402875a5 Feat/index sync data (#11169)
**what**
Synchronisation process  implementation for configured entity to be indexed
2025-01-27 13:56:12 +00:00
Frane Polić
864d772e34 feat(core-flows, dashboard, link-modules,medusa, types, utils): fulfillment shipping changes (#10902)
**What**
- product <> shipping profile link
- create and update product workflows/endpoints accepts shipping profile
- pass shipping option id when creating fulfillment to allow overriding customer selected SO
- validate shipping profile delete
- dashboard
  - set shipping profile on product create
  - manage shipping profile for a product
  - **update the create fulfillment form**
- other
  - fix create product form infinite rerenders
 
---

CLOSES CMRC-831 CMRC-834 CMRC-836 CMRC-837 CMRC-838 CMRC-857 TRI-761
2025-01-27 12:00:20 +00:00
Dano Alexander
956a50e934 Added currency symbol for Turkish lira (#11150) 2025-01-27 09:47:51 +01:00
olivermrbl
986ee8008e chore: Version packages 2025-01-27 09:35:06 +01:00
Frane Polić
d4cbc6218c feat(medusa,product,types): product type & tag store missing endpoints (#11057)
* wip: tag endpoints

* feat: types, product types

* feat: tests

* fix: update product type schema
2025-01-26 14:16:49 +01:00
Carlos R. L. Rodrigues
a76208ed02 chore(utils): patch unique index migration (#11136) 2025-01-24 13:48:37 -03:00
Roman Shuper
c1ae373967 product categories hooks (#11093)
* hooks

* workflow result fixed
2025-01-24 10:48:37 +01:00
Frane Polić
6e5912612c fix(core-flows, dashboard): handling fulfillment rules (#11111)
**What**
- fix storing "true" | "false" strings from admin
- use strings instead of booleans for context filtering
2025-01-23 16:32:25 +00:00
Harminder Virk
0deffe7b9b fix: switch from tsc watch to chokidar (#11110) 2025-01-23 19:12:07 +05:30
Adrien de Peretti
9321920227 fix: Medusa package version should use ~ instead of ^ (#11077)
RESOLVES FRMW-2859
2025-01-22 15:15:30 +00:00
Harminder Virk
e53b8b0a97 fix: Flaky behavior of Yalc (#11084) 2025-01-22 14:26:07 +05:30
Shahed Nasser
2d0e50624f fix(core-flows): change some types to interfaces (#11061) 2025-01-22 10:29:31 +02:00
Adrien de Peretti
da3906efa4 fix: Unique constraint should account for soft deleted records (#11048)
FIXES FRMW-2878

**What**
Currently, the `one-to-one` unique constraints does not account for deleted record. This prevents from inserting a new record wth the same fk if another one is deleted.

**Caveat**
`hasOne` with FK option is meant to be a special case, for example a many to one - one to many without defining the other side of the relation. In that case we don't handle this behaviour and keep it as it is
2025-01-22 07:42:06 +00:00
Adrien de Peretti
ecc8efcb04 fix(event): Subscriber ID miss usage (#11047)
PARTIALLY RESOLVES FRMW-2876

**What**
Fix wrong usage of the `subscriberId` in the event bus. It happens that the subscriber id coming from the context was not used at all. This issue lead to duplicated event subscriber with the same subscriber id, it also prevent unsubscribing from event since rand id will be assigned.

**NOTE**
This PR does not handle overide strategy for subscribers with the same id. this still needs to be discussed
2025-01-22 07:40:31 +00:00
Carlos R. L. Rodrigues
cc73802ab3 chore(order): dml (#10292)
* ../../core/types/src/dml/index.ts

* ../../core/types/src/dml/index.ts

* fix: relationships mapping

* handle nullable foreign keys types

* handle nullable foreign keys types

* handle nullable foreign keys types

* continue to update product category repository

* fix all product category repositories issues

* fix product category service types

* fix product module service types

* fix product module service types

* fix repository template type

* refactor: use a singleton DMLToMikroORM factory instance

Since the MikroORM MetadataStorage is global, we will also have to turn DML
to MikroORM entities conversion use a global bucket as well

* refactor: update product module to use DML in tests

* wip: tests

* WIP product linkable fixes

* continue type fixing and start test fixing

* test: fix more tests

* fix repository

* fix pivot table computaion + fix mikro orm repository

* fix many to many management and configuration

* fix many to many management and configuration

* fix many to many management and configuration

* update product tag relation configuration

* Introduce experimental dml hooks to fix some issues with categories

* more fixes

* fix product tests

* add missing id prefixes

* fix product category handle management

* test: fix more failing tests

* test: make it all green

* test: fix breaking tests

* fix: build issues

* fix: build issues

* fix: more breaking tests

* refactor: fix issues after merge

* refactor: fix issues after merge

* refactor: surpress types error

* test: fix DML failing tests

* improve many to many inference + tests

* Wip fix columns from product entity

* remove product model before create hook and manage handle validation and transformation at the service level

* test: fix breaking unit tests

* fix: product module service to not update handle on product update

* fix define link and joiner config

* test: fix joiner config test

* test: fix joiner config test

* fix joiner config primary keys

* Fix joiner config builder

* Fix joiner config builder

* test: remove only modifier from test

* refactor: remove hooks usage from product collection

* refactor: remove hooks usage from product-option

* refactor: remove hooks usage for computing category handle

* refactor: remove hooks usage from productCategory model

* refactor: remove hooks from DML

* refactor: remove cruft

* order dml

* cleanup

* re add foerign key indexes

* wip

* chore: remove unused types

* wip

* changes

* rm raw

* autoincrement

* wip

* rel

* refactor: cleanup

* migration and models configuration adjustments

* cleanup

* number searchable

* fix random ordering

* fix

* test: fix product-category tests

* test: update breaking DML tests

* test: array assertion to not care about ordering

* fix: temporarily apply id ordering for products

* types

* wip

* WIP type improvements

* update order models

* partially fix types temporarely

* rel

* fix: recursive type issue

* improve type inference breaks

* improve type inference breaks

* update models

* rm nullable

* default value

* repository

* update default value handling

* fix unit tests

* WIP

* toMikroORM

* fix relations

* cascades

* fix

* experimental dml hooks

* rm migration

* serial

* nullable autoincrement

* fix model

* model changes

* fix one to one DML

* order test

* fix addresses

* fix unit tests

* Re align dml entity name inference

* update model table name config

* update model table name config

* revert

* update return relation

* WIP

* hasOne

* models

* fix

* model

* initial commit

* cart service

* order module

* utils unit test

* index engine

* changeset

* merge

* fix hasOne with fk

* update

* free text filter per entity

* tests

* prod category

* property string many to many

* fix big number

* link modules migration set names

* merge

* shipping option rules

* serializer

* unit test

* fix test mikro orm init

* fix test mikro orm init

* Maintain merge object properties

* fix test mikro orm init

* prevent unit test from connecting to db

* wip

* fix test

* fix test

* link test

* schema

* models

* auto increment

* hook

* model hooks

* order

* wip

* orm version

* request return field

* fix return configuration on order model

* workflows

* core flows

* unit test

* test

* base repo

* test

* base repo

* test fix

* inventory move

* locking inventory

* test

* free text fix

* rm timeout mock

* migrate fulfillment values

* v6.4.3

* cleanup

* link-modules update sql

* revert test

* remove fake timers

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
Co-authored-by: Harminder Virk <virk.officials@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-01-21 08:04:47 -05:00
Stevche Radevski
05c8a67d8e feat: Add support for creating payment methods to payment module (#11063)
CLOSES CLO-407
2025-01-21 11:31:44 +00:00
Adrien de Peretti
13fe2f6776 fix(framework): migration scripts regexp (#11072)
FIXES FRMW-2879

**What**
The exclusion regexp was broken and instead use the ignore options of the glob sync function to properly ignore definition files
2025-01-21 09:34:57 +00:00
Kasper Fabricius Kristensen
d4e042e9ad fix(dashboard,js-sdk,types): Remove redundant body for markAsDelivered (#10964)
Resolves CMRC-623
2025-01-20 17:17:48 +00:00
Shahed Nasser
45b47bf813 fix(medusa): use correct request and response types for batch location levels route (#11055)
Use HTTP types for request / response types of the new batch location levels route
2025-01-20 17:03:07 +00:00
olivermrbl
57e9a7a5bf chore: Version packages 2025-01-20 07:41:15 -05:00
Harminder Virk
171088b47a fix: missing dependencies in the framework package (#11049)
In the framework package we are directly importing many uninstalled dependencies. The issue does not occur for transitive dependencies. However, the `glob` package is not a transitive dependency of any production dependency and hence it fails.

Fixes: #11044
Fixes: FRMW-2877
2025-01-20 11:51:44 +00:00
Shahed Nasser
e4487341b6 chore(core-flows): general fixes to core-flows TSDocs (#11046) 2025-01-20 11:11:37 +02:00
Frane Polić
c1385c7002 fix(core-flows): cart validate sales channel (#11024) 2025-01-18 10:48:58 -05:00
Shahed Nasser
f15fb4d4fa chore(framework): update the TSDocs for a plugin in the medusa config (#10991)
* chore(framework): update the TSDocs for a plugin in the medusa config

* change version
2025-01-17 17:41:05 +02:00
olivermrbl
efe141f54b chore: Version packages 2025-01-17 10:29:04 -05:00
Shahed Nasser
544580e6a5 chore(core-flows,types): improve TSDocs for remaining workflows (#11021) 2025-01-17 16:13:00 +02:00