Commit Graph

233 Commits

Author SHA1 Message Date
Adrien de Peretti
225d00cd09 chore: improve mikro orm serializer circular ref and link serialization (#9411) 2024-10-03 08:22:11 +02:00
Zaid Rashid
c4f26120b0 docs: Fix typo. Use instead yuse (#9431)
Fix typo. Use instead of use. I found this while reading through the documents here https://docs.medusajs.com/v2/resources/references/auth/provider#validatecallback
2024-10-02 16:01:14 +00:00
Shahed Nasser
7ce9121095 chore(types, utils): update the TSDocs of AbstractFulfillmentProviderService (#9349)
Updates the `AbstractFulfillmentProviderService` with TSDocs for more useful information and examples

Closes DOCS-950
2024-10-02 09:01:01 +00:00
Adrien de Peretti
13a3c1bd77 fix(utils): knex import (#9408) 2024-10-01 16:34:48 +02:00
Shahed Nasser
20943902f9 chore: update imports in tsdocs (#9379) 2024-10-01 11:04:03 +02:00
Adrien de Peretti
b9e772b530 chore: Add import from framework types at the top of ay generated types file (#9389) 2024-10-01 08:53:52 +02:00
Harminder Virk
a578313db9 feature: bundle all modules (#9324) 2024-09-30 09:04:03 +02:00
Adrien de Peretti
6854feaf50 chore(utils): Cleanup and improve message aggregator (#9300)
* chore(utils): Cleanup and improve message aggregator

* fix
2024-09-26 17:00:03 +02:00
Harminder Virk
48bea267dc chore: perform dependencies scan and fix all dependencies (#9296) 2024-09-26 14:14:38 +05:30
Adrien de Peretti
fba78c0fb1 chore: remove direct usage from graphql (#9316)
**What**
Remove direct usage of graphql toold and instead consume it from utils to have a single entry point to graphql tooling
2024-09-26 08:18:26 +00:00
Adrien de Peretti
ae320ac73f fix: base tsconfig (#9309)
* fix: base tsconfig

* WIP

* wi[]

* update integration typescript version

* update lock file

* fix deps

* fix medusa tests runner
2024-09-25 16:31:57 +02:00
Adrien de Peretti
6e5d007837 fix: Generated types interface name (#9307)
**What**
Fix interface name in the output generated types
2024-09-25 12:32:07 +00:00
Adrien de Peretti
358435d715 chore: Move graphl to a single place (#9303)
* chore: Move graphl to a single place

* add new line
2024-09-25 12:04:25 +02:00
Harminder Virk
1d3a60023a fix: add missing dependency to utils package (#9297) 2024-09-25 08:18:13 +02:00
Adrien de Peretti
802f204d31 fix(orchestration): Throw if not exists using filters (#9275) 2024-09-24 17:12:04 +02:00
Carlos R. L. Rodrigues
b4b1a48987 feat(utils): define read only link (#9254) 2024-09-24 12:00:38 -03:00
Adrien de Peretti
90d530565b chore(): Remove default limit from the build query (#9257)
* chore(): Remove default limit from the build query

* rm take: null

* fix tests

* fix tests

* fix db usage

* fix typo

* rm unsused template arg

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes
2024-09-24 16:06:45 +02:00
Harminder Virk
9e711720dd chore: upgrade moduleResolution to Node16 (#9269) 2024-09-24 17:19:20 +05:30
Harminder Virk
97e003ef4f chore: Cleanup utils package (#9238)
Fixes: FRMW-2712

Old PR: https://github.com/medusajs/medusa/pull/9234 Closed because of incorrect branch naming

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-09-23 10:37:58 +00:00
Carlos R. L. Rodrigues
1215a7c094 chore(orchestrator): remote joiner using entitymap (#9205) 2024-09-20 05:30:08 -03: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
a734184538 chore(): Handle medusa service base methods events (#9179)
* chore(): Handle medusa service base methods events

* cleanup

* cleanup

* fix import

* fix decorator order

* fixes

* apply default event emition

* fix binding

* fix binding

* align tests with new event emition
2024-09-18 17:57:00 +02:00
Adrien de Peretti
81d3ae01c7 chore: Cleanup manager decorator usage (#9181) 2024-09-18 14:16:20 +02:00
Carlos R. L. Rodrigues
8829f89402 chore: query graph api (#9125)
CLOSES: FRMW-2704

**What**
Re-structure the Query graph API as well as introduce dynamic typing from schemas on the filters and better handling of relation treatment for fields/filters inference

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-09-16 11:32:44 +00:00
Riqwan Thamir
3e97a64b21 feat(core-flows,medusa,utils,types): adds delivered_quantity to order (#9130)
what:

- adds delivered_quantity to order


https://github.com/user-attachments/assets/709b1727-08ed-4a88-ae29-38f13540e301
2024-09-16 09:59:01 +00:00
Carlos R. L. Rodrigues
950cf9af79 chore: remove container registration name (#9137) 2024-09-16 06:22:24 -03:00
Adrien de Peretti
a9b559ab2e fix(dml): Throw when many to many are not configured properly (#9085)
**What**
When both sides of a many to many relationship do not define the mapped by option, it leads to misconfigured relations and a malformed SQL query. (ref. https://github.com/medusajs/medusa/issues/9075)

- When both mapped by are not defined, infer look up to try to identify the missing configuration if any
- Disallow defining many to many only on one side
2024-09-12 07:08:24 +00:00
Carlos R. L. Rodrigues
e9280fb254 fix: product options event names (#9108) 2024-09-11 15:50:59 +00:00
Carlos R. L. Rodrigues
9a7daca21e feat(core-flows): product type, option and tag events (#9105) 2024-09-11 12:32:01 -03:00
McTom234
5651e890dc fix: instanceof MedusaError does not work (#9094)
* fix(error): add custom name

* revert: remove changeset

as requested https://github.com/medusajs/medusa/pull/9094#discussion_r1753971768

* refactor(error): use object identifier to check error type
2024-09-11 17:21:44 +02:00
Riqwan Thamir
a729fb3fbb feat(utils,types,framework,medusa): store endpoints should require publishable key (#9068)
* feat(utils,types,framework,medusa): store endpoints should require publishable key

* chore: fix specs

* chore: fix more specs

* chore: update js-sdk

* chore: fix specs wrt to default SC

* chore: revert custom headers + change error message

* chore: fix specs

* chore: fix new store specs
2024-09-11 15:08:37 +02:00
Carlos R. L. Rodrigues
fdd0543011 chore: joiner config entity property (#9084) 2024-09-11 06:25:25 -03:00
Harminder Virk
a944226025 fix: JSON stringify DML json property default value (#9074) 2024-09-10 15:58:42 +05:30
Riqwan Thamir
afd0921326 fix(utils,medusa,order,cart): fix totals when promotions are included (#9014)
* fix(utils): fix totals when promotions are included

* chore: update totals calc

* chore: ignore taxes when taxable amount is 0

* chore: use subtotals everywhere

* chore: fix shipping totals + tests
2024-09-10 10:59:22 +02:00
Harminder Virk
2020b35e52 breaking: turn off mikro orm casing change with DML properties (#9058) 2024-09-09 19:54:02 +05:30
Shahed Nasser
4ffcc41fe7 chore(utils): update auth provider TSDocs + fix errors stopping references build (#9023)
- Updated the TSDocs of the auth provider
- Update the Node version in the docs-util as the outdated version was causing TypeScript error
- Add `@ts-ignore` for a line that was causing a typescript error. If there's a better fix here let me know
2024-09-09 13:53:33 +00:00
Harminder Virk
32ebfa619f feature: introduce types for query.graph method (#9031) 2024-09-09 13:26:40 +05:30
Stevche Radevski
62e0c593c8 feat: Add support for refreshing JWT tokens (#9013)
* feat: Add support for refreshing JWT tokens

* feat: Add refresh method to the auth SDK
2024-09-06 12:58:57 +02:00
Oli Juhl
e27056b3c3 feat: Reset password (#8962)
* wip

* more work

* wip

* more work

* wrap up first iteration

* work on new approach

* more work

* move middleware func to route

* cleanup

* more work

* wrap up

* more work

* fix workflow

* minor tweaks

* finalize

* Use JWT secret instead
2024-09-06 12:28:29 +02:00
Adrien de Peretti
2c5e72d141 feat: Application types generation from project GQL schema's (#8995) 2024-09-06 15:15:32 +05:30
Oli Juhl
f063a69632 chore(core-flows): Add invite resent event (#8986) 2024-09-04 19:53:29 +02:00
Carlos R. L. Rodrigues
fb832072a4 fix(utils): graphql enum options (#8985) 2024-09-04 10:40:31 +00:00
Carlos R. L. Rodrigues
5a097d8954 feat(utils): dml to graphql (#8951) 2024-09-04 06:15:07 -03:00
Riqwan Thamir
ff623f8b00 fix(order,utils): fix outstanding amount stuck on long orders (#8968) 2024-09-03 18:48:47 +02:00
Adrien de Peretti
99461e24ab feat(notification): Handle long running transaction and add status support (#8900)
RESOLVES FRMW-2110
RESOLVES FRMW-2095

**What**
- Fix notification module to not retain transactions open while sending notification
- Add support for notification status [success, pending, failure]
2024-09-01 08:01:47 +00:00
Carlos R. L. Rodrigues
89c6ef8fc9 chore(core-flows): added workflow events (#8915)
* chore(core-flows): added workflow events

* remove from parallelize

* check array
2024-08-30 16:32:08 -03:00
Adrien de Peretti
3da01035f3 fix: Shipping profile deletion with options (#8910)
* fix(fulfillment): Prevent deletion of profiles associated to options

* add tests

* typo

* address feedback
2024-08-30 17:04:29 +02:00
Harminder Virk
9b6c2e5efa fix: ignore metadata when computing relationships from payload (#8895) 2024-08-30 13:32:25 +05:30
Adrien de Peretti
77b874f272 feat: Add support for providers to validate their options at loading time (#8853)
* feat: Add support for providers to validate their options at loading time

* fix missing removal

* fix integration tests

* add tests
2024-08-29 09:08:49 +02:00
Adrien de Peretti
52e394055c fix(utils): DML hasOne - belongsTo not behaving correctly (#8813)
FIXES FRMW-2676

**What**
ref: https://discord.com/channels/876835651130097704/1023889804544458752/threads/1276979858781503528

Currently, when providing the following

```ts
const user1 = manager.create(User, {
  username: "User 1",
  team: {
    name: "Team 1",
  },
})
```

It would result in an error inserting into the database because the foreign key will be sent twice as part of the insert, one for the relation and one for the foreign key that both relate to the foreign key property.

To fix that and allow both approaches (providing the entity to cascade persist or just providing the foreign key in case of another side nullable relation) we need to handle it a bit differently.

now both approaches would be valid. the entities for the example might not be the best ones but it is just to illustrate
option 1 - we create both the user and the team:
```ts
const user1 = manager.create(User, {
  username: "User 1",
  team: {
    name: "Team 1",
  },
})
```
option 2 - the team already exists (for example the previous user have been detached from the team but we kept the team alive and assign a new user to that team) :
```ts
const user1 = manager.create(User, {
  username: "User 1",
  team_id: team.id
})
```
2024-08-28 15:45:48 +00:00