Commit Graph

8063 Commits

Author SHA1 Message Date
Riqwan Thamir
11bd556133 feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context (#10374)
* feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context

* chore: add test for shipping options returning free shipping
2024-12-01 20:59:26 +01:00
Oli Juhl
eacd691951 fix: Ensure tax lines are generated for all items and shipping methods in cart (#10372)
* fix: Generate tax lines for all items in cart

* fix: Correct test
2024-12-01 14:50:38 +01:00
Kasper Fabricius Kristensen
94f6265dfc fix(ui,icons,ui-preset): Fix CodeBlock and Command components (#10369) 2024-11-29 17:30:25 +01:00
Riqwan Thamir
5719e825ca feat(core-flows,types,medusa): ability to update/create custom shipping prices (#10368) 2024-11-29 15:04:33 +01:00
Adrien de Peretti
ed11834d6e Fix(dml): DML default/nullable management (#10363)
RESOLVES FRMW-2813

**What**
Extract what we have done in the order module DML migration.
This includes all the changes we discussed around default value and nullable management

From now on, when the default is being set through the DML on a property, no default initializer will be created, this means that when a mikro orm class is being instantiated, no default will be applied at instantiation time. This fixes the issue when retrieving data and not selecting fields that have a default. The default initializer was taking the relay making you think the data was present except that it was the value of the default initializer. From now on, the default value is applied as follows
- db column default
- before flush
- on persist
The same applies for nullable properties/columns

Co-authored-by: Harminder Virk <1706381+thetutlage@users.noreply.github.com>
2024-11-29 11:46:26 +00:00
Harminder Virk
194361b95a fix: do not rely on model loading order to find an implicit owner (#10360) 2024-11-29 16:02:34 +05:30
Shahed Nasser
ef6dc53b87 docs: add note about retryInterval making workflow long-running (#10355) 2024-11-29 09:25:03 +02:00
Shahed Nasser
065146c19d docs: document permanentFailure (#10356) 2024-11-29 09:24:29 +02:00
Riqwan Thamir
324b4ab438 feat(pricing, types): add price rule operators to price calculations (#10350)
what:

- adds price rule operators when doing price calculations
- rules now accepts a key where the value can be an array of objects `({ operator: string, value: number })`
  - validation for available types of operator and value to be a number
```
await service.createPriceSets({
  prices: [
    {
      amount: 50,
      currency_code: "usd",
      rules: {
        region_id: "de",
        cart_total: [
          { operator: "gte", value: 400 },
          { operator: "lte", value: 500 },
        ]
      },
    },
  ]
})
```
- price calculations will now account for the operators - lte, gte, lt, gt when the price context is a number

RESOLVES CMRC-747
2024-11-28 20:48:00 +00:00
Frane Polić
805fe4b1db fix(order): archive order status update (#10340)
**What**
- array was passed as an id when updating order status upon archive

---

RESOLVES SUP-305
CLOSES https://github.com/medusajs/medusa/issues/10328
2024-11-28 16:51:02 +00:00
Shahed Nasser
768f970926 docs: changes to deployment + remove admin deployment guides (#10345)
* docs: change headings and text in deployment

* remove admin deployment guide

* generate changes
2024-11-28 14:48:10 +02:00
Shahed Nasser
aca7907d81 docs: revise create brand workflow (#10346)
* docs: revise create brand workflow

* small fix
2024-11-28 14:47:59 +02:00
Harminder Virk
d57c739052 fix: do not initialize FKs to null (#10337) 2024-11-28 17:15:08 +05:30
Stevche Radevski
f7279f1b96 fix: Use the correct defaults for the invite token expiry (#10344) 2024-11-28 12:06:32 +01:00
Shahed Nasser
aced04e182 docs: revised build custom features chapter (#10338) 2024-11-28 12:28:27 +02:00
Shahed Nasser
441b7adaa7 docs: revise implement brand module (#10341) 2024-11-28 12:27:02 +02:00
Riqwan Thamir
3b1a63eca7 feat(pricing,utils,types): add operator field to price rule (#10315)
what:

- adds an operator field to price rule with specific operator fields

RESOLVES CMRC-746
2024-11-28 09:23:26 +00:00
Shahed Nasser
2838100efc fix(product): change export name of ProductImage (#10326)
Change export of `Image` to `ProductImage` to match the data model's name.
2024-11-27 17:35:06 +00:00
Shahed Nasser
030b0cc095 docs: generate references manually (#10325)
* docs: generate references

* prep changes
2024-11-27 19:27:25 +02:00
Shahed Nasser
137913b469 docs: update many-to-many docs (#10323)
* docs: update many-to-many docs

* added note about version

* fix eslint error
2024-11-27 19:11:23 +02:00
Shahed Nasser
ef046844cc fix(medusa): remove request body type argument from cancel order transfer routes (#10327)
Remove the request body type passed as a type argument for admin and store routes for order transfer cancelation. Since the type is empty, it leads to a generated empty request body schema in the API reference.
2024-11-27 17:07:20 +00:00
Shahed Nasser
70e179a475 docs: add note about actor_type in reset password event in v2.0.7 (#10322) 2024-11-27 19:04:40 +02:00
Shahed Nasser
263dbf7872 docs: update details on retrieving nested categories (#10317) 2024-11-27 18:52:33 +02:00
Shahed Nasser
d9574f734e docs: update sanity guide + marketplace recipe to use permanentFailure (#10310) 2024-11-27 18:52:19 +02:00
github-actions[bot]
10a5d22f7b chore(docs): Updated API Reference (automated) (#10321)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2024-11-27 16:09:28 +00:00
github-actions[bot]
51bdd60423 chore(docs): Generated DML JSON files (automated) (#10320)
* chore(docs): Generated DML JSON files (automated)

* fixes

---------

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2024-11-27 17:59:58 +02:00
github-actions[bot]
b733e1ff3e chore(docs): Update version in documentation (automated) (#10319)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2024-11-27 17:25:33 +02:00
olivermrbl
35d9af5b88 chore: Release 2024-11-27 15:43:23 +01:00
olivermrbl
e9c1b1127e chore: Version packages 2024-11-27 15:40:07 +01:00
Carlos R. L. Rodrigues
e9003c3124 fix(utils): read dir recursive (#10318)
What:
 - Using `Object.defineProperty) to avoid issues on Node versions that set this property as readonly.
2024-11-27 14:37:07 +00:00
anthid
e04c9cfb04 fix(dashboard): Correct Spain provinces in country-states.ts (#10264)
Issues Addressed:

- Missing provinces (e.g., Ceuta, Melilla).
- Incorrect inclusion of states as provinces (e.g., Andalucía).
- Inclusion of a province from another country (e.g., Nouvelle-Calédonie).

Solution:

This update provides an accurate list of Spain's provinces based on the ISO 3166-2 standard.   Reference: [ISO 3166-2:ES - Provincias](https://es.wikipedia.org/wiki/ISO_3166-2:ES#Provincias).
2024-11-27 13:31:47 +00:00
Kasper Fabricius Kristensen
0be25a7b69 chore(dashboard): Add missing keys to i18n translation files (#10260)
**What**
- Updates existing translation files with missing keys. Done using AI, so quality is debatable. Will depend on community to provide better translations if needed.
2024-11-27 13:24:59 +00:00
Kasper Fabricius Kristensen
2edc2fe19b fix(dashboard): Prevent product metadata form from throwing error (#10312)
Resolves CMRC-755
2024-11-27 13:20:12 +00:00
Vincent Cottalorda
1b55f477a6 French translation V2 (#10301)
This PR improves the French translations already submitted.
- Corrected missing translations.
- Ensured the JSON structure matches the English version.
- Verified consistency across all keys.

The file is very large and it's hard to make sure everything is right.

The previous Similar PR is [Add french trad in i18n translations #9885](https://github.com/medusajs/medusa/pull/9885)

Let me know if additional changes are needed! Happy to help :)

Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
2024-11-27 12:47:28 +00:00
Frane Polić
2ed63b1534 fix(dashboard): adjust transfer SVG for theme (#10307)
**What**
- make order transfer SVG header work on light and dark theme
2024-11-27 12:07:07 +00:00
Kasper Fabricius Kristensen
030ee87150 fix(dashboard): Align casing of fields in reset password event (#10313)
* fix(dashboard): Align casing of fields in reset password event

* update changeset
2024-11-27 13:06:04 +01:00
Shahed Nasser
00d0c927dd docs: fix database URL in railway guide (#10311) 2024-11-27 13:46:30 +02:00
Shahed Nasser
537a609dfb docs: add resend integration guide (#10268)
* initial guide

* initial draft

* finished draft

* address feedback

* add meta image
2024-11-27 13:28:52 +02:00
Shahed Nasser
cc79f21c91 docs: update list of events (#10308) 2024-11-27 11:57:11 +02:00
Shahed Nasser
01def8e9e4 docs: clarify medusa_url in Stripe docs (#10305) 2024-11-27 11:12:44 +02:00
Shahed Nasser
0b5ebeaa30 docs: revise admin customization pages (#10297)
* docs: revise admin customization pages

* small re-iteration
2024-11-27 10:29:32 +02:00
Shahed Nasser
b024c6c558 docs: fix link to medusa container (#10298) 2024-11-26 19:01:27 +02:00
Shahed Nasser
41e125dadd docs: revise workflows docs (#10294) 2024-11-26 18:53:28 +02:00
Jesus Escalona
a7a7541b9b docs: Update Redis connection string instructions for Railway (#10246)
* Update Railway's Redis and Database URL connection string instructions

- Clarified instructions for enabling IPv6 by adding the ?family=0 suffix due to lack of IPv4 private networking support

* Update www/apps/resources/app/deployment/medusa-application/railway/page.mdx

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* add similar explanation in worker mode

* whitespace

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2024-11-26 18:43:15 +02:00
Shahed Nasser
b871b10b18 docs: fix links in examples guide (#10296) 2024-11-26 18:42:17 +02:00
Carlos R. L. Rodrigues
a8eec16122 fix(core-flows): aggregate payment status (#10278) 2024-11-26 12:23:53 -03:00
Harminder Virk
9f204817b0 feat: convert MikroORM entities to DML entities (#10043)
* feat: convert MikroORM entities to DML entities

* feat: wip on repository changes

* continue repositories and types rework

* fix order repository usage

* continue to update product category repository

* Add foreign key as part of the inferred DML type

* ../../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

* cleanup

* re add foerign key indexes

* chore: remove unused types

* refactor: cleanup

* migration and models configuration adjustments

* cleanup

* 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

* fix ordering

* fix ordering remove logs

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-11-26 20:01:02 +05:30
Shahed Nasser
d6fa912b22 docs: revise scheduled jobs (#10291) 2024-11-26 16:19:53 +02:00
Kasper Fabricius Kristensen
da536aba24 fix(dashboard): Truncate long product organization tags (#10261)
Resolves CMRC-736
2024-11-26 12:00:25 +00:00
Frane Polić
1bf60c7a7d feat(dashboard, js-sdk): customer page transfer order + cancel request in timeline (#10250)
**What**
- request order transfer from admin customers details page
- cancel transfer request from order timeline

---

CLOSES CMRC-730
2024-11-26 11:42:47 +00:00