Commit Graph

124 Commits

Author SHA1 Message Date
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
Oli Juhl
cf9605fe6f feat(order): Add display_id to order table (#7242)
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-05-05 19:43:13 +02: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
Adrien de Peretti
224ebb2154 chore: remove legacy plugins (#7224)
* chore(): remove more legacy plugins

* chore(): remove more legacy plugins

* rm plugins
2024-05-03 14:47:16 +02: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
Adrien de Peretti
25b0ccc60a fix(fulfillment): Update shipping options rules (#7204)
**What**
Fix the update shipping options to apply the rules update properly and remove unused code
2024-05-02 12:30:13 +00:00
Stevche Radevski
6487931f54 fix: Add shipping options for cart fix (#7205) 2024-05-02 10:33:58 +00:00
Stevche Radevski
d930d88369 fix: Ensure passed Id filters get applied on top of maybe link filter (#7182) 2024-05-01 11:25:24 +02:00
Adrien de Peretti
e26cda4b6a feat(medusa, core-flows, types): Allow to update the rules from a shipping options (#7175)
**What**
Add support for the following operations
- update rules from the update shipping options end point
- update rules from the batch update end point

Also added some improvements, that can be revisited later
- Add a rule value normalizer, jsonb will transform the input value to a [primitive](https://www.postgresql.org/docs/current/datatype-json.html#JSON-TYPE-MAPPING-TABLE) when possible meaning that passing `"true"` will result in storing `true` and not the string. The normalizer takes care of that
2024-04-30 16:45:17 +00:00
Riqwan Thamir
efa3308d78 feat(medusa): add middleware filters + scope products (#7178)
* chore: add middleware filters + scope products

* chore: fix spec + add changeset

* chore: add internal category to list test
2024-04-30 16:59:43 +02:00
Riqwan Thamir
11517f0faf feat(medusa,types): added store apis for products (#7144)
what:

- adds products list api
- adds products retrieve api

RESOLVES CORE-2016
2024-04-29 15:14:41 +00:00
Stevche Radevski
32c2a9d76b feat: Add missing endpoints and normalize customer and currency endpoints for storefront (#7160) 2024-04-29 16:15:05 +02:00
Adrien de Peretti
08a9297f76 feat(medusa): Remove require id from update shipping options validator (#7166)
* feat(medusa): Remove require id from update shipping options validator

* update type apply

* Create great-stingrays-clap.md
2024-04-29 11:35:40 +02: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
4b57c5d286 feat(modules-sdk): remote query context filter (#7153)
What:

- Remote query now handles `context` keywork in the arguments to forward it as a filter to the method `list`
- Pricing module `list` method returning `calculated_price` if requested as a field
2024-04-26 10:20:42 +00:00
Stevche Radevski
aef222278b fix: Corrections to the store region endpoint for v2 (#7152) 2024-04-26 08:36:37 +00:00
Stevche Radevski
f03a822253 feat: Add support for search to all endpoints (#7149)
* feat: Add search capability to api keys

* feat: Add support for searching to currency and customer endpoints

* fix: Clean up product search filters

* feat: Add search support to regions

* feat: Add search support to sales channels

* feat: Add search support to store module

* feat: Add search support to user module

* fix: Clean up inventory search

* feat: Add search support for payments

* fix: Add searchable attributes to stock location models

* feat: Add search support to tax

* feat: Add search support to promotions

* feat: Add search support for pricing, filtering cleanup

* fix: Further cleanups around search
2024-04-25 17:36:59 +02:00
Carlos R. L. Rodrigues
d02905cefa feat(order): bundled actions (#7133) 2024-04-25 07:06:23 -03:00
Riqwan Thamir
93ef94cad3 feat(medusa,types): create promotion flows (#7029)
* chore: create promotion phase

* chore: fix specs + minor ui changes

* chore: minor fixes

* chore: added changeset

* address pr reviews

* chore: fix spec

* Update packages/admin-next/dashboard/src/v2-routes/promotions/common/edit-rules/edit-rules.tsx

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>

* chore: fix specs

---------

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
2024-04-23 12:08:39 +02:00
Stevche Radevski
9e3556686b fix: Standardize remaining batch methods and update FE calls (#7122) 2024-04-23 09:12:38 +00:00
Riqwan Thamir
18f3aacee6 feat(core-flows,medusa,types): fulfillment API: create (#7101)
what:

- adds fulfillment create API

RESOLVES CORE-1962
2024-04-23 08:35:44 +00:00
Riqwan Thamir
38c971f111 feat(medusa,types): add fulfillment provider list api (#7124)
* feat(medusa,types): add fulfillment provider list api

* chore: remove timestamps
2024-04-22 19:35:33 +02:00
Stevche Radevski
0df523594f feat: Convert several batch methods to the standardized format (#7116) 2024-04-22 16:35:10 +02:00
Oli Juhl
0eb68541b8 fix: Resume workflow execution (#7103)
Supercedes #7051 – if OK, I'll move the base of this PR to `develop` and we can run reviews only of this one.

**What**
- Gracefully close BullMQ Worker in Redis Event Bus and Redis Workflow Engine (by @edast, @sradevski)
- Register workflows before MedusaApp is loaded*
- Introduce `onApplicationPrepareShutdown`**
- Refactor plugin resolving for reusability purposes

*We now register workflows before modules are loaded to ensure modules can run workflows as part of bootstrapping. E.g. the Redis Workflow Engine resumes workflows when it starts, which has until this change failed, because the workflows were not registered yet.

**We introduce a new hook to prepare resources for an application shutdown. E.g. closing the BullMQ worker as a preparatory step to closing the BullMQ queue. The worker will continue to process jobs while the queue is still open to receive new jobs (without processing them). 

Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com>
Co-authored-by: Darius <618221+edast@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-04-22 12:32:50 +00:00
Carlos R. L. Rodrigues
cc557c8752 Feat(orders,utils, cart): orders get endpoints and cart totals (#7010) 2024-04-22 09:01:18 +00:00
Stevche Radevski
89143e1032 feat: Add batch method to collection and clean up some batch implementations (#7102) 2024-04-22 08:36:22 +00:00
Stevche Radevski
9bd2d30595 Chore/finish migration zod (#7098)
* chore: Finish migrating all http endpoints to zod

* chore: Final changes to fully migrate to zod in the HTTP layer
2024-04-19 09:36:44 +02:00
Stevche Radevski
be00a2eb51 chore: Move most of the remaining endpoints to zod (#7096) 2024-04-18 14:12:13 +02:00
Riqwan Thamir
62b9dcc6c1 feat(core-flows,medusa,types): cancel fulfillments API (#7095)
what:

- adds POST cancel fulfillments endpoint

RESOLVES CORE-1972
2024-04-18 11:00:01 +00:00
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
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
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
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
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
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