Commit Graph

2429 Commits

Author SHA1 Message Date
Specture X
1d70b46bb9 docs: fix create fulfillment parameter descriptions (#4653)
Co-authored-by: daniel99k <dk99@divcodes.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-01 12:15:15 +03:00
Adrien de Peretti
4073b73130 feat(product): Move mikro orm utils to the utils package (#4631)
Move utils to the utils package as much as possible

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-07-31 11:30:43 +00:00
Adrien de Peretti
58d4c230e2 chore: include rimraf as part of the build for most of the packages (#4615)
* chore: include rimraf as part of the build for most of the packages

* cleanup

* revert medusa interface

* missing script update
2023-07-31 09:23:27 +02:00
Shahed Nasser
75f2f9ad62 chore(oas): fix tag names (#4622) 2023-07-28 10:41:47 +03:00
github-actions[bot]
0885e13aa6 chore: Version Packages (#4624)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-27 17:13:39 +02:00
Riqwan Thamir
107ae23a3f fix(utils, types, medusa-plugin-meilisearch, medusa-plugin-algolia): move SoftDeletableFilterKey, variantKeys, indexTypes from types to utils (#4623)
* chore: move SoftDeletableKey from types to utils

* chore: move variantkeys, indextypes
2023-07-27 16:42:26 +02:00
github-actions[bot]
5a569c4a20 chore: Version Packages (#4591)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-27 13:19:14 +02:00
Adrien de Peretti
379c83933e fix(module-sdk): Shared modules loading (#4611)
* WIP

* tests wording

* Create nasty-files-type.md

* cleanup
2023-07-27 12:53:31 +02:00
Shahed Nasser
8d0ce0af06 chore(oas): add link for additional info on metadata (#4613) 2023-07-27 12:44:16 +03:00
zhangpengchen
f18f1b9bfe feat(medusa): Expose error handler from middlewares (#4609)
* feat: Expose error handler from middlewares

* Create unlucky-fireants-talk.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-07-27 10:03:19 +02:00
Riqwan Thamir
131477faf0 feat(product, types, utils): tags, types, options, categories and collections for product module (#4535)
* 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)

* chore: added tags and types methods for product module

* chore: remove console log

* chore: fork managers on every repository call

* chore: add forked manager decorator

* chore: rename to inject manager from inject forked manager

* chore: added product tag and type create/update/delete

* chore: added collection create/update/delete

* chore: fix naming

* update injectManager and related behaviour

* simplify get active manager

* chore: reset package.json

* makes the base repository methods related to manager generic

* makes some wrapper generic enough

* add some todos

* chore: added options CRUD

* clean up

* chore: fix issue with deleted_at not being updated

* wip

* chore: added categories write operations

* chore: remove async nature of injection decorator

* chore: added changeset

* chore: reset package.json

* chore: add manager injection to all contextable methods

* chore: fix unit tests

---------

Co-authored-by: adrien2p <adrien.deperetti@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-27 09:52:17 +02:00
Oli Juhl
f561601bf6 fix(admin): Exclude prices from PriceLists overview (#4536)
* fix(admin): Exclude Prices from PriceLists overiew

* Create polite-vans-hide.md
2023-07-27 08:45:54 +02:00
Shahed Nasser
8a1aac028e chore(oas): improvements to examples and descriptions (#4545)
* improve curl examples in OAS

* update tags

* fix oas errors

* update tags and their descriptions

* updated oas of endpoints

* improved oas of all admin endpoints

* improved store OAS comments

* improved models OAS comments

* small change
2023-07-26 20:13:44 +03:00
Riqwan Thamir
caea44ebfd feat(types, product): added product module update (#4504)
* 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

* chore: added product module update

* chore: use status enum type from common types

* chore: remove flushing at repo level, pass in relation instead of ID

* chore: update error message for missing id

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

* move serializisation to the DAL

* rename template args

* chore: address feedback

* chore: wip

* 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>

* chore: added categories, collections and other relations to update

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

* chore: handle variant update, create and delete through products update

* chore: cleanup types, self review

* chore: remove relations that are not present in collection

* chore: address reviews p1

* chore: add test for incorrect ID + remove extra check on variant id existance

* chore: cleanup + add changeset

* chore: wip

* chore: add todos for getter method

---------

Co-authored-by: adrien2p <adrien.deperetti@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-26 15:18:35 +02:00
Adrien de Peretti
585ebf2454 fix(product): Serialize typings (#4602)
What:
Fix the serializer
2023-07-26 08:08:36 +00:00
Oliver Windall Juhl
aab890174d fix(admin-ui): Add missing SO relation (#4594)
* fix(admin-ui): Add missing SO relation

* Create hungry-carrots-bathe.md
2023-07-25 17:28:21 +02:00
Adrien de Peretti
9129ca08a7 fix(medusa): Allowed properties expand (#4600)
What:
The expand allowed properties should allow all the segments whereas the allowed fields should be specific
2023-07-25 14:37:44 +00:00
Carlos R. L. Rodrigues
f12299deb1 Feat: @medusajs/workflows (#4553)
feat: medusa workflows
2023-07-25 10:13:14 -03:00
Adrien de Peretti
ae33f4825f fix(medusa): Removing the line items should remove the tax lines as well (#4595)
Fixes https://github.com/medusajs/medusa/issues/4531
2023-07-25 08:41:01 +00:00
Carlos R. L. Rodrigues
f174bb6fa1 fix(modules-sdk): remote query get loaded modules (#4596) 2023-07-24 16:20:30 +00:00
Adrien de Peretti
d2a8cf0378 feat(medusa): Continue create product workflow changes (#4473) 2023-07-24 13:30:24 +02:00
Shahed Nasser
15e87a8100 feat(create-medusa-app): add stable option + add URI encoding to database string (#4567)
* feat(create-medusa-app): added stable option

* add new function

* changed open url

* switch condition

* fix open url for stable

* add URI encoding

* modified db error message
2023-07-24 13:33:14 +03:00
Philip Korsholm
c9989529ed fix(medusa): Price selection strategy bug with customer groups without customers (#4578)
* change up condition for joining price lists

* add changeset

* naming

* update tests
2023-07-24 11:10:17 +02:00
Riqwan Thamir
a0a041e5c9 fix: correct the type of initializer for modules (#4590) 2023-07-24 10:10:39 +02:00
Carlos R. L. Rodrigues
5a8a889c6d feat(modules-sdk): Remote Query (#4463)
* feat: Remote Query
2023-07-19 15:35:36 -03:00
github-actions[bot]
db68a94e57 chore: Version Packages (#4557)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-07-19 18:04:12 +02:00
github-actions[bot]
2a181bc564 chore: Version Packages (#4527)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-19 18:00:56 +02:00
Erik Engervall
2f283996f8 feat(medusa): Add metadata to StorePostCartsCartLineItemsItemReq (#4230) 2023-07-19 17:51:49 +02:00
Frane Polić
bfc0ea5695 feat(admin-ui): Bulk Editor (#4516)
* wip: initial commit

* wip: modal layout

* wip: regions

* refactor: restructure, drag to fill logic wip

* fix: currency input, optimise table rendering on input change

* fix: pass edited amount to local cell state

* wip: cell based algo

* wip: row based algo

* feat: convert prices to human format initially

* feat: column fill

* fix: decimal formating

* feat: currency symbol, tax incl. indicator, formatting dropdown, drag indicator positioning

* fix: load all currencies

* wip: highlighting range selection

* feat: more optimal highlighting algo

* fix: coordinate click handlers, selection reset

* fix: resetting pointers on close

* feat: prefill regional prices

* feat: keypress features, persisting price change between edits

* fix: undo feature, add saving waring

* feat: update prices

* feat: notifications and prompts

* feat: use only store currencies

* feat: tax. incl tooltip

* fix: decimal formatting

* fix: correct decimal formatting when multiedit

* feat: save prompt with hidden columns check

* chore: changesets

* fix: push icon

* fix: feedback changes v1

* fix: remove span placeholder

* fix: simplify and optimise selection algo

* fix: scroll z index

* fix: truncate region headers

* feat: calculate first col width

* fix: don't show delete notification

* fix: utils check conditions

* fix: typo

* feat: new selection behaviour

* refactor: currency cell

* refactor: save prompt

* chore: changesets

* chore: cleanup

* chore: Update changeset

* fix: don't calculate first col with but rather cut product title to the longest variant if needed

* feat: add loader on save

* fix: very last cell setting undefined on first render

* fix: show confirmation exit prompt on "x" click

* Update packages/admin-ui/ui/src/components/organisms/product-variants-section/edit-prices-modal/utils.ts

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

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-07-19 15:38:04 +02:00
Shahed Nasser
f325881227 fix(create-medusa-app): improved error messages (#4543)
* fix error messages

* format docs url based on current OS

* added changeset
2023-07-19 14:23:54 +02:00
Oliver Windall Juhl
221f62dc4c fix(admin-ui): Omit PriceList prices from variant update (#4552)
* fix(admin-ui): Omit PriceList prices from variant update

* Create poor-insects-complain.md
2023-07-19 13:44:15 +02:00
Philip Korsholm
1304657133 fix(medusa-plugin-brightpearl): stacking reservations (#4383)
**What**
- Change the way we create reservations in brightpearl

Previously we would create reservations 1 to 1 from medusa to brightpearl. This causes issues due to brightpearl collapsing reservations causing occasional double reservations. 
i.e. this update would allocate 4 stock for the order row
```
{
	"products": [
		{
			"productId": "2713",
			"salesOrderRowId": "224688",
			"quantity": "2"
		},
		{
			"productId": "2713",
			"salesOrderRowId": "224688",
			"quantity": "2"
		}
	]
}
```

Instead what we do now is create the rows with reservation quantity based on total quantity reserved in medusa. This means that a reservation creation acts as a trigger to update the reservation in brightpearl, but not with any specific amount. Instead we calculate how much total is reserved and create that in brightpearl.
2023-07-19 07:38:29 +00:00
josetr
3e6cee2846 fix(medusa-react): Add missing query keys to inventory hooks (#4467)
* Add missing adminInventoryItemsKeys.lists() to inventory hooks

* Create gentle-points-cover.md
2023-07-19 09:20:55 +02:00
josetr
e3a8565213 fix(medusa-react): admin user mutation hooks invalidating wrong keys (#4538)
* fix(medusa-react): fix admin users invalidating wrong keys

* Create orange-zoos-float.md

---------

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2023-07-19 09:18:42 +02:00
Philip Korsholm
aae4b3ad37 feat(admin-ui): Always show currencies overview (#4541)
* move around featureflags

* add changeset
2023-07-18 17:05:10 +02:00
Philip Korsholm
d184d23c63 Feat/bulk operations for inventory service (#4503)
* initial push

* bulk delete reservations by location ids

* add method to interface (not implemented yet)

* bulk update

* delete reservations by location id bulk

* add create bulk for inventory item

* refactor attach inventory item method

* add changeset

* verbose false

* method override instead of multiple methods

* change up method signature

* redo changes when updating interface

* update createInventoryLevel method

* rename variables

* fix feedback

* return correct string array when emitting event

* refactor inventory service

* redo order changes

* snapshot

* move prep methods
2023-07-18 11:17:57 +02:00
Philip Korsholm
950a581690 fix(medusa-file-minio): Minio private bucket default (#4540)
* default "getUploadDescriptor" to private (similar to aws + digital ocean)

* add changeset
2023-07-17 10:50:06 +02:00
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