Commit Graph

108 Commits

Author SHA1 Message Date
olivermrbl
d2dd2e7c72 chore: Version packages 2025-05-15 09:49:09 +02:00
olivermrbl
d3a5868e8b chore: Version packages 2025-05-13 12:56:07 +02:00
Harminder Virk
84f58f9058 feat: implement direct upload (#12328)
* feat: implement direct upload

* feat: add direct-upload endpoint

* refactor: implement feedback

* refactor: have a dedicated endpoint for direct uploads

* refactor: convert responses to snakecase

* refactor: rename method to createImport

* test: add tests for the presigned-urls endpoint
2025-05-04 12:58:10 +02:00
Carlos R. L. Rodrigues
90c61d1898 fix(core-flows): add missing remove remote link (#12326)
* fix(core-flows): add missing remove remote link

* temp disable test
2025-04-30 17:43:37 +02:00
Harminder Virk
ceb504db2c feat: add needed methods to the file module and providers (#12325) 2025-04-30 13:17:31 +05:30
Harminder Virk
552dc52228 test: use shared as integration-tests level (#12278) 2025-04-28 18:41:19 +05:30
olivermrbl
2fec5f4aa0 chore: Version packages 2025-04-23 09:27:02 +02:00
Stevche Radevski
c4a0b63778 feat: Add support for uploading a file directly to the file provider from the client (#12224)
* feat: Add support for uploading a file directly to the file provider from the client

* fix: Add missing types and add a couple of module tests

* fix: Allow nested routes, add test for it
2025-04-18 10:22:00 +02:00
olivermrbl
d61694385d chore: Version packages 2025-04-11 10:25:36 +02:00
Saryazdi-Saman
e05491c24f fix: preserve payment sessions during certain Stripe errors for webhook reconciliation (#11798)
* fix: preserve payment sessions during certain Stripe errors for webhook reconciliation

fix: add retry mechanism for errors that might be fixed after retry

fix: authorizePaymentSession method will update payment_session.status regardless regardless of wether or not the authorization is successful

* Refactor: improve handling structure and syntax

-Move HandledErrorType definition to the top of stripe-base

- Use timers/promises for setTimeout

- Removed data in HandledErrorType when retry is true

* refactor: improve error handling flow and logic

- Simplify return statement in initiatePayment to handle null cases

- Remove redundant if-check in handleStripeError and rely on switch

- Reorder conditional checks in executeWithRetry for clearer flow

- Update executeWithRetry to check for retry=false condition first

* clean up

* fix: improve payment error handling and traceability

- Return structured error state for StripeAPIError instead of null

- Throw error when retries are exhausted and no payment intent exists

- Update type definitions to support error state tracking

* fix formatting and naming
2025-03-13 14:46:31 +01:00
olivermrbl
f1cac99316 chore: Version packages 2025-03-10 15:44:09 +01:00
Oli Juhl
3b470f4142 chore: remove ranges on medusa packages (#11738) 2025-03-06 14:17:05 +01:00
olivermrbl
5d74ac3cc3 chore: Version packages 2025-03-04 14:11:37 +01:00
Adrien de Peretti
c250de7919 chore(): Prevent sub workflow events release early + redis unlink (#11641)
**What**
- Prevent event release when a workflow is run as step and finish
- Use `unlink` instead of `del` when removing keys from redist to push the execution to async thread
2025-02-27 10:33:30 +00:00
olivermrbl
3f7470022c chore: Version packages 2025-02-24 11:36:46 +01:00
Stevche Radevski
99a6ecc12d feat: Add support to update account holder (#11499) 2025-02-18 11:04:25 +01:00
Stevche Radevski
91d3332f9e feat: Add support for idempotency key in payments (#11494) 2025-02-17 18:08:19 +01:00
olivermrbl
682dcf6507 chore: Version packages 2025-02-11 12:00:43 +01:00
Oli Juhl
db03738b5f chore: Revert version range to ^ (#11390) 2025-02-11 11:35:25 +01:00
Stevche Radevski
702d338284 fix: Minor fixes and cleanup to the payments setup (#11356)
This PR adds a couple new statuses to the payment collection and payment webhook results. The payment collection will now be marked as "completed" once the captured amount is the full amount of the payment collection.

There are several things left to improve the payment setup, so non-happy-path cases are handled correctly.
1. Currently the payment session and payment models serve a very similar purpose. Part of the information is found on one, and the other part on the other model, without any clear reason for doing so. We can simplify the payment module and the data models simply by merging the two.
2. We need to handle failures more gracefully, such as setting the payment session status to failed when such a webhook comes in.
3. We should convert the payment collection status and the different amounts to calculated fields from the payment session, captures, and refunds, as they can easily be a source of inconsistencies.
2025-02-09 15:42:02 +00:00
Stevche Radevski
59cbc0ec77 feat: Add support for managing account holder in payment module (#11015) 2025-01-28 08:55:15 +01:00
olivermrbl
986ee8008e chore: Version packages 2025-01-27 09:35:06 +01:00
Adrien de Peretti
9321920227 fix: Medusa package version should use ~ instead of ^ (#11077)
RESOLVES FRMW-2859
2025-01-22 15:15:30 +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
olivermrbl
57e9a7a5bf chore: Version packages 2025-01-20 07:41:15 -05:00
olivermrbl
efe141f54b chore: Version packages 2025-01-17 10:29:04 -05:00
Stevche Radevski
f99f720dd4 feat: Add support for listing saved payment methods in module and Stripe (#10994) 2025-01-16 16:16:04 +01:00
Stevche Radevski
f5235862c0 feat: Improvements to payment module and Stripe provider (#10980)
* fix: Correctly parse Stripe error, remove unused method

* fix: Isolate the payment provider error check function

* fix: Allow passing few extra parameters to Stripe

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-01-16 08:12:53 +01:00
Rahul R.
ecf73780e0 [Fix] Update Repository Directory Paths for All Packages (#10910)
This PR updates the `repository.directory` field in the `package.json` files for packages located within the `modules` folder.
2025-01-13 12:49:50 +01:00
olivermrbl
3919b26eb6 chore: Version packages 2025-01-07 13:31:40 +01:00
Frane Polić
16b0672f8a feat(core-flows,fulfillment, fulfillment-manual, types): make fulfillment typings more specific (#10677)
**What**
- attempt to add more specific type definitions around fulfillment provider APIs

---

CLOSES CMRC-814
CLOSES CMRC-816
CLOSES CMRC-817
2025-01-07 08:08:45 +00:00
Stevche Radevski
fde73dbfae feat(auth-google,auth-github): Allow passing a custom callbackUrl to … (#10829)
* feat(auth-google,auth-github): Allow passing a custom callbackUrl to oauth providers

* feat: Add state management in auth providers

* chore: Changes based on PR review
2025-01-06 17:33:29 +01:00
olivermrbl
348f866ffe chore: Version packages 2024-12-20 11:25:36 +01:00
olivermrbl
a391a29aa8 chore: Version packages 2024-12-17 14:41:05 +01:00
Stevche Radevski
3626118eef feat(file-s3): Add support for IAM role authentication to file-s3 provider (#10528) 2024-12-11 18:30:37 +08:00
Frane Polić
d8a92dbb2d feat(core-flows, dashboard, fulfillment, fulfillment-manual, utils, types): create shipping options with calculated prices (#10495)
**What**
- support creating SO with calculated price
- support updating SO for both types of pricing
- update `validateShippingOptionPricesStep` to handle both SO price_types
- add the `validateShippingOptionsForPriceCalculation` method to `FulfillementModule`
- add `canCalculate` and `calculatePrice` to fulfillment provider service service / interface / manual provider
- disable SO pricing edit on Admin if SO price type is calculated

---

CLOSES CMRC-776
2024-12-11 08:38:44 +00:00
olivermrbl
0e342b491d chore: Version packages 2024-12-10 14:01:50 +01:00
Carlos R. L. Rodrigues
b0448a7c35 chore: locking-postgres provider dml (#10478) 2024-12-06 10:14:14 -03:00
olivermrbl
4723acd949 chore: Version packages 2024-12-04 18:36:57 +01:00
olivermrbl
e9c1b1127e chore: Version packages 2024-11-27 15:40:07 +01:00
olivermrbl
ccf4e801f3 chore: Version packages 2024-11-25 12:14:36 +01:00
olivermrbl
4245312d8d chore: Version packages 2024-11-25 09:57:00 +01:00
Adrien de Peretti
b964b45fb2 fix(stripe): Wrong container type (#10223)
RESOLVES SUP-238

**What**

wrong container type withing payment providers
2024-11-22 10:57:41 +00:00
Adrien de Peretti
b1b7a4abf1 fix(payment): Idempotent cancellation and proper creationg fail handling (#10135)
RESOLVES SUP-188

**What**
Two changes are happening here
- In the stripe payment provider, idempotent cancellation action, if not id is provided then return the existing data unchanged
- Payment module should not try to cancel a session that have failed to be created in the first place
2024-11-18 17:45:13 +00:00
Adrien de Peretti
2822972e04 fix(product): wrong snapshot name and inexistent script (#10119)
* chore(product): Rename wrong snapshot name and add missing elements

* rm non existing command

* Create proud-pigs-deny.md
2024-11-15 15:53:41 +01:00
Carlos R. L. Rodrigues
06ce16c90b chore(local-file): throw error if file exist (#10087) 2024-11-14 12:11:37 -03:00
Furman
4c983557f9 feature: Add email to google provider-identity metadata (#10081)
* feature: Add email to google provider-identity metadata

* Include changeset.

---------

Co-authored-by: Stevche Radevski <sradevski@live.com>
2024-11-14 15:01:53 +01:00
olivermrbl
d5605656ae chore: Version packages 2024-11-12 10:10:07 +01:00
olivermrbl
ecece05b72 chore: Version packages 2024-11-11 10:58:20 +01:00