Commit Graph

784 Commits

Author SHA1 Message Date
Stevche Radevski
ccb50bb3da fix: Switch to zod for customer endpoints, fix inconsistencies (#7094) 2024-04-18 10:30:45 +02:00
Stevche Radevski
44829f296a chore: Move several more endpoints to use zod for validation, unify APIs (#7086) 2024-04-18 06:51:43 +00:00
Riqwan Thamir
8d356217bd feat(medusa,core-flows,types): adds batch operations to price list prices (#7077)
what:

- adds batch operations to price list prices

RESOLVES CORE-1969
RESOLVES CORE-1970
2024-04-17 15:36:09 +00:00
Stevche Radevski
a7df6235f9 chore: Move several modules to use zod for validation and cleanup routes (#7079) 2024-04-16 18:06:56 +02:00
Frane Polić
0a9b9b073d feat(dashboard): shipping management (#6995)
**What**
- shipping flow
- shipping profile pages
- delete fulfillment set endpoint
- delete shipping profile endpoint
2024-04-16 13:42:56 +00:00
Riqwan Thamir
00e6b21bb5 feat(medusa,dashboard,tax): added tax rates and regions UI (#7026)
whats missing:

- make rules required for overrides
- conditions for other rules
- populating condition reference ids with labels on update

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-04-16 08:26:12 +00:00
Oli Juhl
bc081a7777 feat: Create product category flow (#7034)
* feat: Create product category

* address PR comments
2024-04-15 17:11:42 +02:00
Stevche Radevski
fd83e75e4b feat: Add support for batch method for products and product variants (#7038)
* feat(products): Add batch methods for product and variants

* chore: Rename batch validator and minor changes based on PR review
2024-04-15 16:48:29 +02:00
Adrien de Peretti
c78915c7c5 feat: Add support for shipping options prices update (#7028) 2024-04-11 18:34:55 +02:00
Philip Korsholm
ab7ff64c4a Feat(admin-next, core-flows, link-modules, medusa, types): Inventory end to end flows (#7020)
* add reservation endpoints

* add changeset

* initial

* add reservations table

* add edit-item modal

* udpate inventory item attributes

* manage locations skeleton

* add combi batch endpoint

* cleanup

* fix manage locations

* add adjust inventory

* prep for pr

* update versions

* fix for pr

* fix for pr

* cleanup

* Update packages/core-flows/src/inventory/workflows/bulk-create-delete-levels.ts

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

* Update packages/core-flows/src/inventory/steps/delete-levels-by-item-and-location.ts

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

* rm wack import

* fix build

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-04-10 15:17:54 +02:00
Philip Korsholm
f175cac4af Feat(medusa, core-flows, types): add reservation endpoints (#7018)
* add reservation endpoints

* add changeset
2024-04-09 18:40:00 +02:00
Adrien de Peretti
e1a0960e20 feat: delete shipping options (#6993) 2024-04-09 15:30:22 +02:00
Riqwan Thamir
8eb2a4156d chore: disable turbo and jest cache (#7024)
* chore: disable turbo cache

* chore: remove cache for build

* chore: disable jest cache
2024-04-09 14:04:31 +02:00
Oli Juhl
3882cac622 feat: Admin V2 customer group (#7000) 2024-04-09 12:32:27 +02:00
Oli Juhl
dbddfc12ed feat: Admin Shipping Profiles API (#7019) 2024-04-09 11:03:37 +02:00
Oli Juhl
c03216efbf fix: Delete service zone (#7017) 2024-04-08 20:24:59 +02:00
Oli Juhl
6cc9a5e469 feat: Categories retrieve + list API (#7009) 2024-04-08 19:26:34 +02:00
Stevche Radevski
db2f0ef53f feat: Make tags unique, clean up searchability of product entities (#7014) 2024-04-08 17:55:40 +02:00
Stevche Radevski
fa5c9bbe8f feat: Improve how options are defined and handled for product (#7007)
* feat: Improve how options are defined and handled for product

* fix: Updating option values supports passing without id
2024-04-08 15:29:41 +02:00
Riqwan Thamir
5e953f8cf3 chore: add batch update prices for price lists (#6999) 2024-04-08 09:23:23 +02:00
Carlos R. L. Rodrigues
dd35a4dbff fix(modules-sdk): Remote Query "order" as config options (#6925) 2024-04-08 08:17:53 +02:00
Oli Juhl
4f88743591 feat: Admin V2 Customers (#6998) 2024-04-07 21:38:50 +02:00
Adrien de Peretti
f132929c7e feat(*): shipping options update API (#6987)
**What**
- Update the `updateShippingOptions` module service API to follow the newest convention
- Add upsert support for shipping options
- update shipping options workflow
- update shipping options api end point and validation
- update shipping options all integration tests

FIXES CORE-1926
2024-04-07 16:28:59 +00:00
Stevche Radevski
f65fbff535 feat: Improvements to the products details page in the admin (#6994) 2024-04-07 17:52:47 +02:00
Oli Juhl
a24d6e6c97 feat: Update service zone (#6990) 2024-04-07 17:30:55 +02:00
Stevche Radevski
44bcde92c8 feat: Add support for setting sales channel when creating a product (#6986) 2024-04-07 13:45:47 +02:00
Oli Juhl
d1728990e9 feat: Delete service zone (#6984) 2024-04-07 10:59:08 +02:00
Oli Juhl
81ea044f31 feat(medusa, core-flows): Create service zones (#6979) 2024-04-06 21:31:23 +02:00
Adrien de Peretti
bc06ad2db4 feat: Clean up shipping options management (#6977)
**What**
- cleanup existing route on some aspects but not all
- add new create shipping options end point and types
- add set of integration tests
- cleanup existing fulfillment routes
- align existing integration tests
- transform old type to zod types and validators
- fix stock location route
2024-04-06 16:52:05 +00:00
Frane Polić
58c68f6715 feat(dashboard): Admin UI regions v2 (#6943) 2024-04-06 17:41:54 +02:00
Carlos R. L. Rodrigues
df0751f122 Feat: draft order api (#6797) 2024-04-06 16:35:10 +02:00
Stevche Radevski
883a75c4f3 feat: Switch to zod for the product API and implement missing primitives (#6978) 2024-04-06 13:45:52 +00:00
Adrien de Peretti
65794f4bb5 feat: Create shipping options workflow (#6962)
**What**

- Create main workflow
- Update create pricing rule types step to be idempotent
- update remote joiner to support granular isList confguration on field aliases
- Add full workflow integration tests
2024-04-06 11:51:48 +00:00
Riqwan Thamir
5e30b8cce6 feat(dashboard): added details page for promotions + edit sliders (#6882)
* chore: added details page for promotions

* chore: add edit rules, edit details and edit campaign pages

* chore: change to type button

* chore: connection for rules

* chore: listing rule labels of multiple modules

* chore: add badge summary list

* chore: fix campaigns
2024-04-06 13:20:31 +02:00
Carlos R. L. Rodrigues
d333db0842 chore(orchestration): serialize error (#6967) 2024-04-06 11:22:48 +02:00
Oli Juhl
626aa09497 feat: Add create location fulfillment set flow + API (#6945) 2024-04-05 19:27:38 +02:00
Stevche Radevski
20e8df914e feat: Normalize known DB errors to a MedusaError when possible (#6922)
Before we would swallow the error and return a generic error to the user. This will provide more information to the caller if it is one of the known errors.
2024-04-04 19:12:59 +00:00
Adrien de Peretti
e944a627f0 feat: region payment providers management workflows/api (#6864) 2024-04-04 20:41:34 +02:00
Riqwan Thamir
483bf98a49 feat(medusa): added endpoints for rule attribute/operator/values options (#6911)
what:

adds endpoints that returns attribute options, operator options and value options for a particular rule.
2024-04-04 09:56:17 +00:00
Philip Korsholm
edafe7db47 Feat(link-module, core-flows, medusa): Add sales channel location management (#6905)
* add locations with sales channels

* init, not working location based management

* working adding sales channel stock locations

* remote sales channels from location

* remove console log

* rm allowedFields

* redo errorhandler

* make validation take an array

* add changeset

* fix build

* Update packages/core-flows/src/sales-channel/workflows/remove-locations-from-sales-channel.ts

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

* add default cases to return early

* cleanup

* add sc test and remove associations

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-04-03 08:38:53 +02:00
Adrien de Peretti
82a176e30e chore(medusa-test-utils):Handle errors gracefully (#6901)
**What**
- Better error handling and error message
- update deps management and dynamic import/require
- Pass a new flag to the modules loaders for the module loaders to be able to act depending on it. In that case, the module can determine what should be run or not. e.g in the workflow engine redis, when we are only partially loading the module, we do not want to set the Distributed transaction storage
2024-04-02 14:10:17 +00:00
Oli Juhl
7895ff3849 feat: add sales channel management (#6761)
Add V2 sales channel management to admin

`@medusajs/medusa`
- Add `POST /admin/sales-channels/:id/products/batch/remove`
- Refactor cross-module filter middleware to comply with the latest convention

`@medusajs/admin-next`
- Add all sales channel routes
- Moves the following sales channel UI to shared components in `modules/sales-channel`:
  - sales-channel-list
  - sales-channel-edit
  - sales-channel-details
    - sales-channel-general-section
  - sales-channel-create

The sales-channel-product-section is not shared because the API in V2 will change.
The sales-channel-add-products component is not shared because the API in V2 will change.

`@medusajs/core-flows`
- Add `detachProductsFromSalesChannelsStep`
- Add `removeProductsFromSalesChannelsWorkflow`
2024-04-02 13:38:33 +00:00
Stevche Radevski
b3ce13d61e fix: Fixes to product module and improving tests (#6898) 2024-04-02 07:13:46 +00:00
Stevche Radevski
585818eaf8 feat: Pricing update and refactor product API tests to not rely on internals (#6892)
This PR achieves the following
- Remove dependency on internals for seeding the tests (more work left, but major work done)
- Adds the workflow for updating variant's price

I will do a follow-up PR to further clean up the tests and remove all internal dependencies
2024-04-01 09:33:52 +00:00
Oli Juhl
1bcb13f892 feat: Remove sales channels from pub keys (#6876)
**What**
- Add workflow + step for detaching sales channels from pub API keys
- Tweak linking error message to be more helpful
- Add `removeRemoteLink` step to delete API key workflow
2024-03-29 15:01:10 +00:00
pepijn-vanvlaanderen
6113af0a66 fix(medusa): Deleted discount missing on order (#6837)
* Fix deleted discount missing on order

* Added integration test

* Added changeset
2024-03-29 11:51:27 +01:00
Carlos R. L. Rodrigues
1c6ba4468e feat(modules-sdk): remote query retrieve (#6849)
What:

Remote Joiner options to check if keys exist on entry points or relations
2024-03-29 09:26:24 +00:00
Stevche Radevski
cbb5e6bd99 feat: Refactor the product module definitions and implementation (#6866)
There are several things done in this PR, namely:

Unify the service endpoints API to always work with a model rather than allowing to pass both ID and model (eg. both type_id and type being available in the request to create).
Start using upsertWithReplace to simplify the code and fix some deassociation bugs
Apply some changes to tests to deal with the pricing breaking changes
Correctly define the model relationships (with both ID and entity fields available)
All tests for the product are passing, which should bring us back to a great baseline.
2024-03-29 09:03:41 +00:00
Philip Korsholm
18438a695a feat(medusa, stock-location-next): add list-stock-locations endpoint to api-v2 (#6788)
* initial create

* add list for stock locations

* add changeset

* redo changes for stock locatino module'

* add changeset

* naming

* prep for pr

* move integration tests

* fix pr feedback

* add changeset

* update changeset

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2024-03-28 17:33:26 +01:00
Oli Juhl
ea8d9d4d42 feat: API key sales channel link (#6851)
What
- Add link between API key and sales channels
- Add API route for batch adding sales channels to a publishable API key
- Clean up API key API routes responses
- Move API key test suite from `integration-tests/modules` to `integration-tests/api`
2024-03-28 10:15:11 +00:00