Commit Graph

2392 Commits

Author SHA1 Message Date
Adrien de Peretti
befc2f1c80 feat(product): Create (+ workflow), delete, restore (#4459)
* Feat: create product with product module

* feat: create product wip

* feat: create product wip

* feat: update product relation and generate image migration

* lint

* conitnue implementation

* continue implementation and add integration tests for produceService.create

* Add integration tests for product creation at the module level for the complete flow

* only use persist since write operations are always wrapped in a transaction which will be committed and flushed

* simplify the transaction wrapper to make future changes easier

* feat: move some utils to the utils package to simplify its usage

* tests: fix unit tests

* feat: create variants along side the product

* Add more integration tests an update migrations

* chore: Update actions workflow to include packages integration tests

* small types and utils cleanup

* chore: Add support for database debug option

* chore: Add missing types in package.json from types and util, validate that all the models are sync with medusa

* expose retrieve method

* fix types issues

* fix unit tests and move integration tests workflow with the plugins integration tests

* chore: remove migration function export from the definition to prevent them to be ran by the medusa cli just in case

* fix package.json script

* chore: workflows

* feat: start creating the create product workflow

* feat: add empty step for prices and sales channel

* tests: update scripts and action envs

* fix imports

* feat: Add proper soft deleted support + add product deletion service public api

* chore: update migrations

* chore: update migrations

* chore: update todo

* feat: Add product deletion to the create-product workflow as compensation

* chore: cleanup product utils

* feat: Add support for cascade soft-remove

* feat: refactor repository to take into account withDeleted

* fix integration tests

* Add support for force delete -> delete, cleanup repositories and improvements

* Add support for restoring a product and add integration tests

* cleaup + tests

* types

* fix integration tests

* remove unnecessary comments

* move specific mikro orm usage to the DAL

* Cleanup workflow functions

* Make deleted_at optional at the property level and add url index for the images

* address feedback + cleanup

* fix export

* merge migrations into one

* feat(product, types): added missing product variant methods (#4475)

* chore: added missing product variant methods

* chore: address PR feedback

* chore: catch undefined case for retrieve + specs for variant service

* chore: align TEntity + add changeset

* chore: revert changeset, TEntity to ProductVariant

* chore: write tests for pagination, unskip the test

* Create chilled-mice-deliver.md

* update integration fixtuers

* update pipeline node version

* rename github action

* fix pipeline

* feat(medusa, types): added missing category tests and service methods (#4499)

* chore: added missing category tests and service methods

* chore: added type changes to module service

* chore: address pr feedback

* update repositories manager usage and serialisation from the write public API

* move serializisation to the DAL

* rename template args

* chore: added collection methods for module and collection service (#4505)

* chore: added collection methods for module and collection service

* Create fresh-islands-teach.md

* chore: move retrieve entity to utils package

* chore: make products optional in DTO type

---------

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

* feat(product): Apply transaction decorators to the services (#4512)

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2023-07-16 20:19:23 +02:00
Philip Korsholm
5b91a3503a feat(medusa): Add proper pagination (#4517)
* update method for listing regions

* add changeset

* fix unit tests

* listAndCount swaps

* add count calculation to list-returns

* swap integration test

* notes pagination

* pagination props for notifications

* listAndCount store regions

* fix nit

* fix note unit test

* update list-regions store unit test

* cleanup integration test

* rename introduced tests

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-07-14 16:14:51 +02:00
Philip Korsholm
55db914151 fix(admin): Price input (#4530)
* initial fix for number inputs

* add changeset
2023-07-14 10:45:23 +02:00
Carlos R. L. Rodrigues
43427b8893 Feat(medusa) - Orchestrator builder (#4472)
* chore: Trasanction Orchestrator builder

* Feat(medusa): Workflow Manager (#4506)
2023-07-13 10:53:55 -03:00
Oliver Windall Juhl
fe6586e560 fix(medusa-plugin-sendgrid): Use correct SendGrid client (#4524)
* fix(medusa-plugin-sendgrid): Use correct SendGrid instance

* Create loud-fans-own.md

* Adds tests

* Use logger
2023-07-13 14:23:07 +02:00
Shahed Nasser
f61488f105 chore(oas): remove incorrect query parameter (#4526) 2023-07-13 10:56:22 +03:00
Philip Korsholm
56d1d326d4 Fix(medusa): Return correct region count (#4514)
* update method for listing regions

* add changeset

* fix unit tests

* fix nit

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-07-13 08:59:26 +02:00
Shahed Nasser
3ed6438486 chore(oas): fix cURL example for search product (#4520) 2023-07-12 21:01:01 +03:00
Shahed Nasser
0b84bd5764 chore: fix OAS for product search endpoint (#4490)
* chore: fix OAS for product search endpoint

* added build files
2023-07-12 09:52:33 +02:00
github-actions[bot]
04917d0721 chore: Version Packages (#4502)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-11 20:38:52 +02:00
Oliver Windall Juhl
708a55199a fix(medusa-js): Remove unused options from tsconfig (#4501)
* fix(medusa-js): Update ambigious type export

* Create ninety-hornets-drive.md

* Add to import too

* Revert + update tsconfig
2023-07-11 14:54:04 +02:00
Shahed Nasser
4b4296dc16 feat(create-medusa-app): remove .git directory in the project (#4493)
* feat(create-medusa-app): remove .git directory in the project

* reverted version changes

* remove version from package.json
2023-07-11 09:03:23 +02:00
Adrien de Peretti
d363da2b72 chore(create-medusa-app): Cleanup the main script for readability and maintanability (#4369)
* chore(create-medusa-app): Cleanup the main script for readability and maintanability

* update types

* cleanup

* Create polite-queens-kiss.md
2023-07-10 16:27:16 +02:00
Adrien de Peretti
4264302f21 feat(medusa, stripe, paypal): Add update payment session support to the abstract payment processor API (#4442)
* feat(medusa, stripe, paypal): Add update payment session support to the abstract payment processor API

* continue to add updatePaymentData

* feat: Add update payment data to paypal as well and add stripe tests

* fix stripe updatePaymentData returned object type

* fix tests

* Create three-ravens-raise.md

* fix paypal updatePayment data impl

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-07-10 15:59:19 +02:00
Abílio Soares Coelho
1903217705 docs: fix contentful URL (#4375)
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-07-10 16:21:36 +03:00
Oliver Windall Juhl
78a1f3943b chore(admin-ui): Remove new badges from inventory + categories (#4444)
* chore(admin-ui): Remove new badges from inventory + categories

* Create early-poets-drum.md
2023-07-10 12:23:27 +02:00
Adrien de Peretti
bdd9c5a7e9 fix(medusa): model loader with customizations (#4443)
* fix(medusa): model loader with customizations

* fix plugin models loader

* Create late-insects-punch.md

* Address pr feedback

* remove unnecessary bits

* remove unnecessary bits

* fix

* remove unnecessary changes

* rm duplicate param jsdoc
2023-07-04 11:34:19 +02:00
josetr
417debfe7d fix(medusa-react): fix wrong admin reservations query key (#4441)
* Fix react admin reservations query key

* Create quiet-gifts-kick.md
2023-06-30 09:08:02 +02:00
Carlos R. L. Rodrigues
499c3478c9 feat: Remote Joiner (#4098) 2023-06-29 15:29:01 +02:00
Adrien de Peretti
9dcdc0041a fix(medusa, utils): fix the way selects are consumed alongside the relations (#4389)
**What**
There is actually an issue with using the `fields` query params with the way the repositories are using our custom query strategy. This pr aims to fix this issue by reworking the strategy.

What we had to do was to rework the way the selects are built for each subquery in order to follow the aliasing convention and to be taken into consideration. Alongside these changes, the join used to always select everything, this needed to be changed so that if there are any selects provided for a join, the join should not select everything and let the query select the fields that are requested.

Another notable change is that all the repositories are now using the repository util in order to centralize the customization and to have a single place to update when this kind of issue arises. This means that the eager relations when using the query builder are not necessarily taken into account. For that reason, I have removed the `shipping_option` eager option in favor of explicitly asking for the relations like we started to do it in some places.

FIXES CORE-1413
2023-06-29 13:26:41 +00:00
Riqwan Thamir
9760d4a96c feat(medusa, types): Improve DX of model extensions (#4398) 2023-06-29 13:45:16 +02:00
Adrien de Peretti
6f1fa244fa chore(medusa-cli): Cleanup plugin setup (#4420)
* chore(medusa-cli): Cleanup plugin setup

* fix: logger types

* fix event bus local

* fix event bus redis

* Create late-dragons-collect.md

* move to ts

* remove unused command

* env

* fix
2023-06-28 16:37:25 +02:00
Lacey Pevey
fe25c8a91f feat(medusa-react,medusa-js): Allow custom headers (#4409)
* add support for passing custom headers to backend through medusa-js and medusa-react

* switch order of override of headers

* Create gentle-teachers-greet.md

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-06-28 15:04:58 +02:00
Adrien de Peretti
5a4580b6a8 chore(medusa-dev-cli): Cleanup plugin setup (#4421)
FIXES CORE-1420

does not include ts migration
2023-06-28 11:32:05 +00:00
Adrien de Peretti
627bdb689f chore(gatsby-source-medusa): Cleanup plugin setup (#4419)
* chore(gatsby-source-medusa): Cleanup plugin setup

* fix process-node

* Create gentle-cups-crash.md
2023-06-27 14:00:11 +02:00
Oliver Windall Juhl
85eb12883e feat(medusa): Improve error messaging in plugin loader (#4410)
* feat(medusa): Improve error messaging in plugin loader

* Create fair-kids-tease.md

* pr comments

* pr comments
2023-06-26 13:33:40 +02:00
Adrien de Peretti
01245ac89e feat(medusa): Improve DX of validators extensions (#4397)
* feat(medusa): Allow to register extended validators seemlesly

* Create happy-points-yawn.md

* comment
2023-06-26 11:05:23 +02:00
Lacey Pevey
f65a501da5 feat(medusa-plugin-sendgrid): Add error messages (#4384)
* add error messages to SendgridService.sendNotification

* add event name to msg for no template set for event

* Create violet-clocks-study.md

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-06-26 10:33:03 +02:00
Oliver Windall Juhl
14bfe6d514 add @medusajs/product readme (#4368) 2023-06-21 11:28:54 +02:00
Adrien de Peretti
7bf7d2adef chore(medusa): Concurrently get entities and count (#4367)
* chore(medusa): Concurrently get the items and count instead of sequentially

* Create tidy-sloths-sit.md
2023-06-21 11:28:28 +02:00
olivermrbl
ce4e83b2aa chore: Release 2023-06-20 14:41:59 +02:00
github-actions[bot]
8db03619b5 chore: Version Packages (#4364)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-20 11:50:33 +02:00
Shahed Nasser
6d5da9166f feat(create-medusa-app): support admin onboarding experience (#4339) 2023-06-20 11:43:40 +02:00
github-actions[bot]
e2bb65d160 chore: Version Packages (#4354)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-19 16:31:15 +02:00
Riqwan Thamir
dc120121c1 fix(product, types): correct path for migration files + fix types on products service module (#4348)
* chore: correct path for migration files

* chore: resolve the path for migrations to be picked up

* chore: fix types on product service interface

* chore: update changeset to reflect type changes

* chore: changed changeset to the correct format
2023-06-19 16:12:47 +02:00
github-actions[bot]
bf4f5e7147 chore: Version Packages (#4346)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-18 21:18:41 +02:00
olivermrbl
d88a57fd9c chore: Release 2023-06-18 13:26:47 +02:00
github-actions[bot]
5d7877ded6 chore: Version Packages (#4223)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-18 13:14:20 +02:00
Adrien de Peretti
13294fff3f fix(medusa): medusa develop does not take execArgv into account properly (#4338) 2023-06-17 15:43:05 +02:00
Shahed Nasser
e1f43fd207 chore(create-medusa-app, product, utils, medusa-cli): Resolve string-width dep issue (#4328) 2023-06-16 11:31:23 +02:00
Philip Korsholm
0bfdc33a0b fix(admin-ui): Inventory nitpicking (#4316)
* minor fixes

* add changeset

* add search by sku placeholder
2023-06-16 08:28:07 +02:00
Shahed Nasser
5ad7347408 fix(create-medusa-app): disable opening browser (#4321) 2023-06-15 21:15:19 +02:00
Adrien de Peretti
30d89044f1 fix(product): The bin scripts should include a shebang and import in the body (#4296) 2023-06-15 19:42:49 +02:00
Philip Korsholm
1d91fa4e08 fix(medusa-plugin-brightpearl): External ref split (#4295)
* order should be first part of external_ref

* add changeset

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-06-15 19:41:44 +02:00
Shahed Nasser
f98ba5bde8 feat(create-medusa-app,medusa-cli): Allow clearing project (#4273)
- Added build step
- Added `--no-boilerplate` option to `create-medusa-app` to allow clearing onboarding files
- Clear project files by default in medusa-cli
2023-06-15 17:31:30 +00:00
Philip Korsholm
f8643361cd feat(admin-ui, medusa): Remove feature flag (#4267) 2023-06-15 16:55:29 +00:00
olivermrbl
c95b485a1e chore: Use specific typeorm versions 2023-06-15 18:30:58 +02:00
Oliver Windall Juhl
9b42387fd3 chore: Add missing deps (#4317) 2023-06-15 18:27:31 +02:00
Derek Wene
81dfeb43ea feat(medusa): add redis_prefix in configModule.projectConfig (#4268) 2023-06-14 16:24:35 +02:00
Liam Cooper
ca477c86af feat(medusa): Preserve node flags in develop command (#1860) 2023-06-14 15:26:16 +02:00