Carlos R. L. Rodrigues
950cf9af79
chore: remove container registration name ( #9137 )
2024-09-16 06:22:24 -03:00
Frane Polić
9db334554f
fix(core-flows): item id in reservations ( #9097 )
...
**What**
- on cart completion, when creating reservations, use line item id instead of cart item id
- NOTE: inventory reservation is now done after we create the order
---
FIXES CC-448
2024-09-16 07:33:12 +00: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
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
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
4ffb49efd0
chore(cart): completed at ( #8921 )
2024-08-31 12:42:58 -03:00
Carlos R. L. Rodrigues
9931b69a2a
chore(core-flows): test allow backorder ( #8725 )
2024-08-22 11:47:31 +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
Carlos R. L. Rodrigues
3d7dce2bec
fix(core-flows): copy line items attribute ( #8471 )
...
removing `requires_shipping` from variant won't be part of this PR
2024-08-06 18:58:08 +00:00
Carlos R. L. Rodrigues
5125d1328d
chore(medusa,core-flows): cart payment collection link ( #8457 )
2024-08-06 06:12:21 -03:00
Stevche Radevski
3a068c6b27
feat: Use tag ids instead of values wherever possible ( #8394 )
2024-08-02 09:22:03 +02:00
Riqwan Thamir
71411463b1
feat(core-flows,medusa): add endpoint to add/remove fulfillment providers to location ( #8299 )
...
what:
- add endpoint to add/remove fulfillment providers to location
- specs cleanup from previous PR
RESOLVES CC-259
2024-07-26 14:35:19 +00:00
Riqwan Thamir
91c17651f1
feat(core-flows, fulfillment): validate shipping options to stock locations ( #8291 )
...
what:
- validate shipping options to stock locations
RESOLVES CC-232
2024-07-26 12:26:26 +00:00
Carlos R. L. Rodrigues
07205e4249
fix(utils): totals calculation ( #8190 )
2024-07-19 06:49:49 -03:00
Carlos R. L. Rodrigues
1acfdc4ffe
chore(core-flows, medusa): cancel request return ( #8153 )
...
* fix(core-flow): request item return reason
* chore(core-flows): cancel request return
2024-07-17 09:35:46 +01:00
Stevche Radevski
db6969578f
feat: Plug tax inclusivity in cart and order workflows ( #8013 )
2024-07-09 11:10:42 +02:00
Carlos R. L. Rodrigues
d036130604
fix(cart): add shipping method to cart ( #7945 )
2024-07-04 12:47:39 +00:00
Carlos R. L. Rodrigues
a7844efd09
chore: move ModuleRegistrationName to utils ( #7911 )
2024-07-03 06:30:56 -03:00
Adrien de Peretti
937a632eb6
chore: make module loaders DML aware and auto generate joiner config ( #7781 )
...
* chore: make module loaders DML aware and auto generate joiner config
* fixes and cleanup
* improve dml entity check
* add unit tests on load resources
* cleanup deps
* cleanup deps
* cleanup Modules
* finalise
* fix modules-sdk jest
* fix modules-sdk jest
* fix import
* fix import
2024-06-20 18:18:07 +02:00
Adrien de Peretti
48963f55ef
Chore/rm main entity concept ( #7709 )
...
**What**
Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate.
This pr also includes various fixes in different modules
Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com >
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2024-06-19 13:02:16 +00:00
Riqwan Thamir
0507dbe027
chore(core-flows,inventory,types,medusa): add fixes to inventory module + location levels api ( #7629 )
...
what:
- santizes inputs to prevent reserved_quantity from being updated directly
- inventory items create api can create location levels
- add validation to update quantity of reservation items
- general cleanup
RESOLVES CORE-2254
2024-06-06 12:58:17 +00:00
Riqwan Thamir
e7005a0aac
feat(core-flows,medusa): adds inventory kit creation to variants endpoint ( #7599 )
...
what:
When creating a variant, we can now create inventory as a part of the product and variants create endpoint.
This applies only to variants where `manage_inventory=true`. 2 cases present itself:
1. When inventory_items are present
- Link an inventory item with required_quantity to the variant
- the inventory item already needs to be present
2. When inventory_items are not present
- A default inventory item will be created
- links the created item to the variant with a default required_quantity
RESOLVES CORE-2220
2024-06-04 13:49:31 +00:00
Carlos R. L. Rodrigues
f1ced57d5f
chore: payment auto capture + remove enum from utils ( #7513 )
...
What:
- handles payments session that are auto captured
- removes all the enums from `@medusajs/types`
- move all `@medusajs/types` to devDependencies
2024-05-29 11:12:59 +00:00
Oli Juhl
c9de1d28a4
feat: Assign store default sales channel in cart creation ( #7495 )
2024-05-28 12:12:01 +02:00
Riqwan Thamir
7baedf73d5
feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart ( #7470 )
...
* feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart
* chore: split steps into 2 for add-to-cart
* chore: split steps into 2 for add-to-cart
* chore: iterate safely
* chore: parallelize upsert
2024-05-27 17:54:11 +02:00
Stevche Radevski
28a3f9a3df
feat: Add list cart option typings, make region optional on update cart ( #7455 )
2024-05-27 09:37:10 +02:00
Riqwan Thamir
d1d23f1e8d
feat(dashboard,medusa): Promotion Campaign fixes ( #7337 )
...
* chore(medusa): strict zod versions in workspace
* feat(dashboard): add campaign create to promotion UI
* wip
* fix(medusa): Missing middlewares export (#7289 )
* fix(docblock-generator): fix how type names created from Zod objects are inferred (#7292 )
* feat(api-ref): show schema of a tag (#7297 )
* feat: Add support for sendgrid and logger notification providers (#7290 )
* feat: Add support for sendgrid and logger notification providers
* fix: changes based on PR review
* chore: add action to automatically label docs (#7284 )
* chore: add action to automatically label docs
* removes the paths param
* docs: preparations for preview (#7267 )
* configured base paths + added development banner
* fix typelist site url
* added navbar and sidebar badges
* configure algolia filters
* remove AI assistant
* remove unused imports
* change navbar text and badge
* lint fixes
* fix build error
* add to api reference rewrites
* fix build error
* fix build errors in user-guide
* fix feedback component
* add parent title to pagination
* added breadcrumbs component
* remove user-guide links
* resolve todos
* fix details about authentication
* change documentation title
* lint content
* chore: fix bug with form reset
* chore: address reviews
* chore: fix specs
* chore: loads of FE fixes + BE adds
* chore: add more polishes + reorg files
* chore: fixes to promotions modal
* chore: cleanup
* chore: cleanup
* chore: fix build
* chore: fkix cart spec
* chore: fix module tests
* chore: fix moar tests
* wip
* chore: templates + fixes + migrate currency
* chore: fix build, add validation for max_quantity
* chore: allow removing campaigns
* chore: fix specs
* chore: scope campaigns based on currency
* remove console logs
* chore: add translations + update keys
* chore: move over filesfrom v2 to routes
* chore(dashboard): Delete old translation files (#7423 )
* feat(dashboard,admin-sdk,admin-shared,admin-vite-plugin): Add support for UI extensions (#7383 )
* intial work
* update lock
* add routes and fix HMR of configs
* cleanup
* rm imports
* rm debug from plugin
* address feedback
* address feedback
* temp skip specs
---------
Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com >
Co-authored-by: Shahed Nasser <shahednasser@gmail.com >
Co-authored-by: Stevche Radevski <sradevski@live.com >
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com >
2024-05-23 15:28:00 +02:00
Riqwan Thamir
43613f3f58
chore: pick the default store region ( #7369 )
...
* chore: pick the default store region
* chore: fix test
* chore: remove from defaults workflow and move to seeds
* chore: undo payment provider change
* chore: rearrange conditionals
2024-05-21 12:05:01 +02:00
Riqwan Thamir
b78703b8c6
chore: fix variant pricing validation for carts ( #7344 )
2024-05-16 09:03:37 +02:00
Carlos R. L. Rodrigues
7c4f4d7388
feat(payment): update payment collection status ( #7335 )
2024-05-15 15:11:40 +00:00
Carlos R. L. Rodrigues
70fd355e46
chore(order): link order and payment collection ( #7334 )
2024-05-14 20:37:27 +00:00
Stevche Radevski
d680c7ee4c
Remove v1-related code from medusa app ( #7326 )
...
* chore: Remove unused validations and utilities
* chore: Remove all resources that are not being loaded
* chore: Remove unused dependencies, typeorm related code and fix tests
* chore: Use createAdminUser in all module tests
2024-05-14 13:21:30 +02:00
Oli Juhl
5b26f5f2cf
feat: Add publishable key scopes middleware ( #7301 )
...
**What**
Add pub key + sales channel middlewares to the store carts API
- Assign sales channel associated with pub key, if sales channel is not passed in request
- Throw if pub key has multiple associated sales channels
- Throw if sales channel ID in payload is not associated with publishable API key in header
2024-05-13 16:17:52 +00:00
Riqwan Thamir
0430e63b0b
feat(core-flows,typers,utils,medusa): add payment auth step to complete cart workflow - [complete cart part 3] ( #7248 )
...
* chore: authorize payment sessions for cart
* chore: add spec for cart returns
* fix: Correctly select fields for cart
* chore: fix specs + address comments
---------
Co-authored-by: Stevche Radevski <sradevski@live.com >
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com >
Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com >
2024-05-06 23:34:56 +02:00
Carlos R. L. Rodrigues
5228b14ca9
feat(medusa): complete cart create reservation ( #7250 )
2024-05-06 14:36:55 -03:00
Stevche Radevski
4e12168dbd
feat: Consolidate payment functions and handle sessions for storefront ( #7231 )
2024-05-06 13:14:40 +00:00
Carlos R. L. Rodrigues
aba194de9a
chore: complete cart part 2 ( #7227 )
2024-05-05 10:35:09 -03:00
Oli Juhl
2f7b53488d
fix: Accept filters in softDelete + fulfillment location clean-up ( #7198 )
2024-05-03 16:32:07 +00:00
Riqwan Thamir
f129415650
feat(medusa,core-flows): complete cart [part-1] ( #7201 )
...
what:
- adds a very basic complete cart endpoint that creates an order
- the complete cart workflow currently does the following:
- create tax lines
- create order
2024-05-02 22:24:50 +00:00
Carlos R. L. Rodrigues
9d3f495314
feat(fulfillment): shipping options context field ( #7169 )
2024-05-02 09:59:14 -03:00
Riqwan Thamir
d2393f004e
feat(core-flows, medusa): add shipping methods to cart API ( #7150 )
...
* feat(core-flows, medusa): add shipping methods to cart API
* chore: change id to option_id
* chore: use list listShippingOptionsForContext instead of validateShippingOption
* chore: remove comment
* chore: add refresh shipping methods step
* chore: set cart step
* chore: update all workflows to refresh shipping methods
* chore: add tests + cleanup
2024-04-29 09:25:23 +02:00
Carlos R. L. Rodrigues
d333db0842
chore(orchestration): serialize error ( #6967 )
2024-04-06 11:22:48 +02:00
Carlos R. L. Rodrigues
7e93eda1a4
feat(orchestration,workflows-sdk,core-flows): workflow cancel ( #6778 )
2024-03-22 15:03:06 +01:00
Riqwan Thamir
4c98545ab3
feat: shard modules and API integration tests ( #6775 )
...
what:
- runs module and api integration tests in matrix strategy
- v28 of jest comes with sharding support, which we can utilize when we upgrade
- splits the tests by number of matrix jobs and run them in parallel
- This introduced some flakiness in some specs, but couldn't reproduce locally. Those have been skipped for now.
- uses swc/jest for added performance
- Locally, a chunk took 90 seconds with babel and 30 seconds with swc.
- This translated to 2 mins saved per shard in CI, but haven't tested this enough.
2024-03-22 11:15:01 +00:00
Adrien de Peretti
3188e703b3
feat(fulfillment): Separate list and context rules validation ( #6674 )
...
**What**
- Add method to validate fulfillment option from the provider
- Separate list/list and count from context rules validation and add listShippingOptionsForContext
FIXES CORE-1861
2024-03-15 13:25:51 +00:00
Oli Juhl
02e784ce78
feat: Confirm inventory in create cart workflow ( #6635 )
2024-03-13 18:24:08 +01:00
Oli Juhl
25d176b851
feat: List shipping options for cart ( #6677 )
2024-03-13 09:08:47 +00:00
Oli Juhl
f0c8142635
feat: Add shipping method to cart ( #6661 )
2024-03-12 17:52:48 +01:00
Riqwan Thamir
c3c4f49fc2
feat(core-flows,medusa,types): add automatic-taxes to region + generate tax lines endpoint ( #6667 )
...
what:
- endpoint to generate tax lines
- update workflows to force calculate tax lines with a flag
- added automatic_taxes to region
2024-03-12 14:36:22 +00:00
Riqwan Thamir
e4acde1aa2
feat(medusa,core-flows,types): add cart <> tax integration workflows + steps ( #6580 )
...
what:
- adds tax lines to cart when item operations take place
RESOLVES CORE-1821
RESOLVES CORE-1822
RESOLVES CORE-1823
RESOLVES CORE-1824
2024-03-07 16:17:43 +00:00