Commit Graph

851 Commits

Author SHA1 Message Date
Adrien de Peretti
b8bc3ed16f chore: Start cleaning up medusa-core-utils (#7450)
**What**
- remove medusa-core-utils
- dispatch the utils where they belongs
- update usage

**NOTE**
I have been wondering if the graceful class should go into the utils package or medusa package, I ve put it in the medusa package as it seems to be the best place I can see for now and is tight to the server as well. Also, I wanted to avoid the utils package to depends on http and net dependencies, happy to change that if you feel like it
2024-05-27 08:00:15 +00: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
Adrien de Peretti
f585b13c96 chore: remove babel usage (#7452) 2024-05-24 20:51:12 +02:00
Stevche Radevski
135772b27b feat: Revert to using app_metadata for authentication (#7433) 2024-05-23 22:01:41 +02:00
Stevche Radevski
8a070d5d85 Revamp the authentication setup (#7419)
* feat: Add email pass authentication provider package

* feat: Revamp auth module and remove concept of scope

* feat: Revamp the auth module to be more standardized in how providers are loaded

* feat: Switch from scope to actor type for authentication

* feat: Add support for per-actor auth methods

* feat: Add emailpass auth provider by default

* fix: Add back app_metadata in auth module
2024-05-23 20:56:40 +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
Stevche Radevski
5ede560f70 feat(auth): Revamp authentication setup (#7387)
* chore: Clean up authentication middlewares

* chore: Rename AuthUser to AuthIdentity

* feat: Define link between user, customer, and auth identity

* feat: Use links for auth, update auth context content

* fix: Adjust user create command with new auth setup

* fix: Make auth login more dynamic, review fixes

* fix: Change test assertions for created by
2024-05-22 10:27:32 +02:00
Frane Polić
b7df447682 fix(core-flows): set SalesChannels on Product update (#7272) 2024-05-21 21:48:34 +02:00
Adrien de Peretti
c4fde7ea5c feat(core-flows, fulfillment): Add create return specific method and add more tests (#7357)
* feat(core-flows, fulfillment): Add create return specific method and add more tests

* fix defautl providers in tests fixtures

* more tests

* wip fixes

* fix flow and tests

* cleanup
2024-05-21 13:48:59 +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
Frane Polić
521b4e7926 feat(dashboard): order fulfillment UI (#7262)
* feat: initial impl. of Unfulfilled section and create flow

* feat: create fulfillment

* feat: order <> fulfillment link, fulfillment section

* feat: accept order_id when creating fulfillment

* feat: finish create and cancel

* fix: integration test

* refactor: real Order<>Fulfillment link instead readonly, add link step to the workflow

* fix: revert `order_id` definitions

* chore: add changeset

* fix: build

* fix: address comments

* fix: fetch inventory and location levels for fulfilled variant

* fix: loading inventory details

* add isList to order fulfillment link

* fix: duplicate declaration

* fix: type

* refactor: link orders step, fix client

* fix: move translations to the new file

* fix: pass order id in test

---------

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2024-05-20 13:41:09 +02:00
Oli Juhl
bf4724b8e6 feat: Destroy session + introduce http config (#7336) 2024-05-19 12:40:28 +02:00
Adrien de Peretti
a775d57255 feat(core-flows, types): Create return order (#7319)
**what**
- Create return workflow partial implementation
- Update some order domain types
- create order fulfillment link

**NOTE**
this PR is partially done but can still be merged as is, it will require some discussions around the flow and some unknowns or uncertainty in regards to some data and some behaviour
2024-05-16 14:10:54 +00:00
Stevche Radevski
07e5c17f86 chore: Remove medusa interfaces package (#7347) 2024-05-16 15:06:21 +02:00
Stevche Radevski
ee924b1b28 feat: Add a simple configurable notifications subscriber (#7331)
* feat: Add a simple configurable notifications subscriber that is configurable

* Proposal on awaiting all subscribers to run

* fix: Clean up wait subscribers util and notifications test

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
2024-05-16 13:36:09 +02:00
Riqwan Thamir
b78703b8c6 chore: fix variant pricing validation for carts (#7344) 2024-05-16 09:03:37 +02:00
Kasper Fabricius Kristensen
490586f566 feat(medusa,dashboard,admin-sdk): Run admin dashboard from Medusa instance (#7330) 2024-05-15 19:52:09 +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
Adrien de Peretti
63623422fe chore(): Autoload module resources (#7291)
**What**
- automatically build and consume connection and container loader if not exported by the module
- therefore load the services and repositories automatically, including baseRepository
- automatically build run and revert migrations if not provided
- cleaup modules to remove extra unnecessary bits and pieces
- remove the `initializeFactory` in favor of using `medusaApp`

Should drastically improve the module building DX by removing a lot of boilerplate to handle by the user, that plus the base entity should simplify quite a lot the flow cc @shahednasser 

**Note**
I had to choose a way to identify connection and container loader from the exported loader from the module. I decided to go with named function `connectionLoader` and `containerLoader`, also, now the factories will return named function so if the user use the factories we are providing to build those loaders, the function will also be named and identified
2024-05-13 12:12:36 +00:00
Stevche Radevski
79758c46b6 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
2024-05-11 17:40:03 +02:00
Riqwan Thamir
9a14aeebcf feat(core-flows,types,medusa): API to add promotions to campaign (#7277)
what:

- adds an API to add promotions to campaign
- reworks module to perform atomic actions
2024-05-10 07:53:56 +00:00
Oli Juhl
948458a43d chore: Re-introduce CLI test (#7268) 2024-05-08 11:11:06 +02:00
Adrien de Peretti
71f4f46cb9 chore(medusa): cleanup medusa package (#7206) 2024-05-07 12:48:49 +02: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
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
Oli Juhl
1366e2efad fix: Retrieve ancestors and/or descendants on product categories (#7226) 2024-05-03 18:09:04 +02: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
Oli Juhl
e78362c000 chore: Remove legacy MWH modules (#7213)
* chore: Remove legacy MWH modules

* chore: Add stock-location deps
2024-05-02 20:07:42 +02: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
Stevche Radevski
ec37576dd0 feat: Add collection and category endpoints to store (#7155)
* feat: Add collection endpoints to store

* feat: Add category store endpoints
2024-05-01 09:54:51 +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