Commit Graph

1064 Commits

Author SHA1 Message Date
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
Shahed Nasser
c962283281 fix(types, medusa): request / response types clean-up (#9043)
More clean-up of request / response types
2024-09-09 06:59:43 +00:00
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
Riqwan Thamir
0573bb924a chore: Remove typeORM (#9005)
* chore: rename js files to txt

* chore: rename ts files to txt

* chore: delete environment helpers

* chore: convert global setup & teardown to txt

* chore: rename helper js/ts files to txt

* chore: rename seeder js/ts files to txt

* chore: remove typeorm

* chore: reintroduce used helpers
2024-09-05 15:45:30 +02:00
Riqwan Thamir
5d7179b7d0 feat(core-flows,types,promotion): register promotion campaign usage upon cart completion (#8970)
* feat(core-flows,types,promotion): register promotion campaign usage upon cart completion

* Apply suggestions from code review

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-09-05 10:43:29 +02:00
Carlos R. L. Rodrigues
2a055b71ef feat(core-flows): custom price flag for order line items and shipping methods (#8969)
CLOSES: CC-402
2024-09-04 20:30:59 +00:00
Riqwan Thamir
de6f61b05f feat: added totals tests for end 2 end RMA flow (#8906)
what:

I've added some specs and comments in the specs for where I think totals are incorrect. 

Lets get this test merged in as the status quo and proceed to fix these issues one by one.

Additionally, this also removes the temporary_difference as its not something we use. 

RESOLVES CC-346

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-09-04 13:11:04 +00:00
Shahed Nasser
423583e06c fix(medusa): fix update promotion's request type (#8966)
Fix the validator of the update promotion API route to match the update workflow input's type.
2024-09-03 15:08:22 +00:00
Riqwan Thamir
e49d004fef chore: remove promotions in campaign validators + move tests to http (#8965) 2024-09-03 14:19:42 +02:00
Riqwan Thamir
230acb700b feat(core-flows,types): Refunds can only be performed when order is imbalanced (#8944)
* feat(core-flows,types): Refunds can only be performed when order is imbalanced

* Apply suggestions from code review

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

* chore: fix tests

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-09-03 13:53:20 +02:00
Adrien de Peretti
479e712c17 fix(core-flows): Handle variant creation duplicate inventory item ids (#8937)
* fix(core-flows): Handle variant creation duplicate inventory item ids

* disabled already selected options

* address feedback

* fix tests
2024-09-02 18:36:42 +02:00
Oli Juhl
cbb0a6adc7 fix: Customer registration (#8896)
* fix: Customer registration

* update test

* one mroe test

* chore: add transformation
2024-09-01 11:41:39 +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
4ffb49efd0 chore(cart): completed at (#8921) 2024-08-31 12:42:58 -03:00
Carlos R. L. Rodrigues
891037081d chore(core-flows): apply taxes to items and shipping on RMA flows (#8858)
** What
Apply taxes to order line items and shipping methods
2024-08-29 17:33:39 +00:00
Carlos R. L. Rodrigues
b6521e4c1a feat(medusa): order changes endpoint (#8728)
What:
- `admin/orders/:id/changes` endpoint to get order changes related to the order
- added `*_by` attributes missing
2024-08-29 14:20:12 +00:00
Carlos R. L. Rodrigues
8dea3e44c6 fix(order): order change references (#8845) 2024-08-28 08:57:44 -03:00
Oli Juhl
c2e7940f61 fix: Validate boolean query params (#8834) 2024-08-28 13:14:15 +02:00
Alexander Nortung
ac18b5d35f fix(product): Add metadata to property to product category data model (#8766)
* fix: Add metadata to property to product category data model

* chore: Add migration for adding metadata column to product category

* chore: Added test for product category metadata
2024-08-27 16:21:41 +02:00
Carlos R. L. Rodrigues
ff6fcfb139 fix(core-flows,order): return damaged items (#8818) 2024-08-27 11:21:10 -03:00
Oli Juhl
c11ef01c15 feat: Separate registration from authentication in auth domain (#8683)
* wip

* feat: Introduce register

* fix: user command

* fix: Invite HTTP tests

* fix: Auth tests

* fix: Invite modules tests
2024-08-27 13:44:52 +02:00
Carlos R. L. Rodrigues
571f0c7629 chore(core-flows): product events (#8769) 2024-08-26 18:38:30 -03:00
Carlos R. L. Rodrigues
058378970a chore: dependecies reorg (#8535) 2024-08-23 07:16:04 -03:00
Riqwan Thamir
59599ac237 feat(core-flows,dashboard): adds item validations for claims, returns and exchanges (#8735)
what:

- adds item validations for claims, returns and exchanges
- prevents autofocus on item add
- reset item quantity when error
2024-08-23 09:30:27 +00:00
Carlos R. L. Rodrigues
9931b69a2a chore(core-flows): test allow backorder (#8725) 2024-08-22 11:47:31 +00:00
Riqwan Thamir
335061d8cd feat(medusa,types,core-flows): apply created_by values - claims, exchanges, returns, fulfillment (#8712)
what:

- Applies created_by values - claims, exchanges, returns, fulfillment

RESOLVES CC-96
2024-08-21 18:15:55 +00:00
Carlos R. L. Rodrigues
27a2dcb10d feat(core-flows): order edit request (#8705) 2024-08-21 13:59:33 -03:00
Riqwan Thamir
de7848f68d fix(core-flows): account for unfulfilled items while generating order status (#8698)
what:

- account for unfulfilled items while generating order status

RESOLVES CC-314
2024-08-21 14:33:43 +00:00
Riqwan Thamir
8bd284779e feat(dashboard,core-flows,js-sdk,types): ability to mark payment as paid (#8679)
* feat(core-flows): create or update payment collections in RMA flows

* chore: change ui to pick payment link from unpaid payment collection

* Apply suggestions from code review

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* chore: fix mathbn

* feat(dashboard,core-flows,js-sdk,types): ability to mark payment as paid

* chore: add captured bt

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-08-20 22:58:28 +02:00
Carlos R. L. Rodrigues
99eca64c20 chore(order): preview removed items (#8680) 2024-08-20 14:53:39 -03:00
Riqwan Thamir
430d9a38c4 feat(core-flows): create or update payment collections in RMA flows (#8676)
* feat(core-flows): create or update payment collections in RMA flows

* chore: change ui to pick payment link from unpaid payment collection

* Apply suggestions from code review

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* chore: fix mathbn

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-08-20 18:40:58 +02:00
Harminder Virk
5f310c0a00 breaking: remove POSTGRES prefix env variables in favor of DATABASE prefix (#8672) 2024-08-20 17:05:19 +05:30
Riqwan Thamir
fa44e3f5a8 feat(dashboard,core-flows,js-sdk,types,link-modules,payment): ability to copy payment link (#8630)
what: 

- enables a button to create a payment link when a payment delta is present
- api to delete order payment collection
- adds a pending amount to payment collections

Note: Not the happiest with the decision on when to create a payment collection and when not to. The code should programatically create or delete payment collections currently to generate the right collection for the payment delta. Adding a more specific flow to create and manage a payment collection will help reduce this burden from the code path and onto CX/merchant.

Another issue I found is that the payment collection status doesn't get updated when payment is complete as it still gets stuck to "authorized" state

https://github.com/user-attachments/assets/037a10f9-3621-43c2-94ba-1ada4b0a041b
2024-08-20 10:30:17 +00:00
Carlos R. L. Rodrigues
1be9373290 chore(core-flows): order update item quantity (#8659) 2024-08-19 18:14:57 +00:00
Riqwan Thamir
4791d1d775 fix(promotion): validate rules accurately when attribute is scoped by context (#8655) 2024-08-19 15:38:42 +02:00
Stevche Radevski
4980285317 chore: Remove create user tests that are no longer relevant (#8638) 2024-08-18 16:53:56 +02:00
Carlos R. L. Rodrigues
be942ff15c fix(order): update order summary when transactions change (#8633) 2024-08-16 19:40:44 +00:00
Stevche Radevski
0f240137e9 fix: Remove the endpoint to create a user (#8629) 2024-08-16 16:12:32 +02:00
Carlos R. L. Rodrigues
5200e816c9 fix(order): order summary on order creation (#8624) 2024-08-16 07:52:24 -03:00
Riqwan Thamir
adcd25650c feat(medusa,core-flows,types): API to create payment collections for order (#8617)
what:

- adds an API to create a payment collection for order
2024-08-16 08:16:40 +00:00
Oli Juhl
9de9b3825f fix(payment): Partial refunds (#8603)
* fix(payment): Partial payment provider refunds

* add tests
2024-08-15 19:01:22 +02:00
Riqwan Thamir
4cb28531e5 feat(core-flows,dashboard): add fixes to allow only outbound or inbound claims (#8590)
what:

- allows completing claim with only inbound items
- allows completing claim with only outbound items
- validates against creating claims when an active change order is present
2024-08-14 21:09:05 +00:00
Riqwan Thamir
6f50e376a9 fix(core-flows): fixes duplicate fulfillment issue (#8581)
what:

- fixes a bug where fulfilling an outbound item was throwing an error due to the entire order being processed for fulfillment

RESOLVES CC-298
2024-08-13 10:40:46 +00:00
Stevche Radevski
a013c4edc5 feat: Move userpass default definition to defineConfig instead of a hard-coded value (#8557) 2024-08-13 11:10:23 +02:00
Carlos R. L. Rodrigues
96bdf3e2c6 chore(core-flows): order transactions (#8568)
What:

- Add order transaction when Cart is completed and payment is refunded
2024-08-12 19:06:58 +00:00
Riqwan Thamir
dd4147314f feat(core-flows,dashboard,medusa): fixes set of tiny bugs in claims flow (#8551)
* feat(types,dashboard): ability to set shipping methods for claim

* chore: fix a bunch of stuff

* chore: update comment
2024-08-12 13:09:19 +02:00
Carlos R. L. Rodrigues
c9c1a5b41c chore: rm pg dependency (#8526) 2024-08-08 17:22:57 +00:00
Riqwan Thamir
a7cace90e0 feat(medusa): filter shipping options by location (#8511)
what:

- filters shipping options by location ID

RESOLVES CC-328
2024-08-08 14:40:02 +00:00