Commit Graph

3782 Commits

Author SHA1 Message Date
github-actions[bot] 0887e5007f chore(docs): Removed Docs Announcement Bar (automated) (#4752)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-08-13 07:39:59 +00:00
Sebastian Rindom 9d8f87b03b fix(medusa): ignore region_id update w/o value change (#4751) 2023-08-13 09:26:32 +02:00
Josip Matić 803aca0689 feat(medusa-plugin-restock-notifications): Multi-warehouse support (#4718)
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-12 12:02:39 +00:00
Simons d8a908bd8e fix(medusa): removal of shipping methods on addOrUpdateLineItems (#4725)
* added removal of shipping methods on addOrUpdateLineItems

* Create lovely-beds-design.md

---------

Co-authored-by: Thijs Simons <thijs@careeraim.nl>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-12 12:44:35 +02:00
Pedro Tigre 6dd3056776 fix: Update algolia.md (#4734)
## Fix bug where products are not added to Algolia index

Previously, the id property was used as the unique identifier for products in the Algolia index. However, Algolia requires the use of the objectID property as the unique identifier. 

This commit updates the transformer function for the products index to use the objectID property instead of the id property, ensuring that products are properly added to the Algolia index.
2023-08-11 21:45:19 +00:00
Oli Juhl 1d2637572b chore: Remove rimraf from prepare (#4741) 2023-08-11 22:55:59 +02:00
Oli Juhl 9469063f64 fix(medusa-js): return type of collection hook + export (#4747) 2023-08-11 13:37:54 +02:00
Sebabrata Kundu 410ac86ae1 fix: Spelling medusa in desc of package.json of Stripe and PayPal package (#2454)
Fix the incorrect spelling of medusa in package.json file of paypal and stripe packages.

Closes #2453
2023-08-11 08:47:16 +00:00
Shahed Nasser 324c9d62ef docs: fix method names in complete checkout code block (#4746)
Closes #4744
2023-08-11 09:47:24 +03:00
Adrien de Peretti a268d2cb0b feat(workflows): Data aggregation (#4732)
* apply the aggregator automatically

* add comment

* apply aggregate

* improve pipe aggregation

* improve test cases

* improvements

* clean tests

* renameing to merge

* fix merge apply

* move merge apply

* cleanup cart workflow and end point

* fixes and naming
2023-08-10 14:01:56 +02:00
Shahed Nasser 2363a5324e docs: general fixes across docs (#4737)
* docs: general fixes across docs

* added deploy button to railway

* fix eslint errors

* fixes
2023-08-10 11:44:20 +03:00
Adrien de Peretti f8d3d5f91a chore(product): remove decorator where it is not necessary and cleanup (#4731)
* chore(product): remove decorator where it is not necessary and cleanup

* Create twenty-gorillas-exist.md
2023-08-10 09:57:32 +02:00
Adrien de Peretti ac866ebb51 test(): Test the create product workflow compensation (#4716)
**What**
Integration tests to validate the workflow compensation.
Also, fix the transaction state when the workflow is compensating and some steps does not have any compensation
2023-08-09 14:33:04 +00:00
Oli Juhl 86c314eb2a chore: Update FUNDING.yml 2023-08-09 10:28:53 +02:00
Oli Juhl df3b0c673a chore: Update FUNDING.yml 2023-08-09 10:26:22 +02:00
Adrien de Peretti 3f3a84262c feat(types, product, utils, medusa): Include shared connection for modules (#4626) 2023-08-08 15:10:34 +00:00
Oli Juhl a2d7540e40 fix(medusa): Remove shipping on updates to cart.items (#4715)
* rm shipping on line item updates

* Add tests

* remove verbose flag

* Create real-items-rhyme.md
2023-08-08 14:53:47 +02:00
Didier Guyon 0cba4d647d fix(medusa): ExistingItems query in addOrUpdateLineItems (#4714) 2023-08-08 13:51:44 +02:00
Carlos R. L. Rodrigues c0ca002901 feat(orchestration,workflows): pipe oncomplete and workflow preparation (#4697)
* chore: pipe onComplete and workflow preparation step

* changeset

* fix: tests

---------

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-08 13:06:47 +02:00
Oli Juhl d1e298f5dc chore: Remove FlagRouter from core (#4710)
* Allow nested feature flags

* clean up

* Create loud-wombats-shave.md

* add warning

* Add more tests

* Address PR comments

* add back boolean check

* Replace core flag router with utils one

* lol - actually remove it

* Create eleven-doors-roll.md

---------

Co-authored-by: carlos-r-l-rodrigues <rodrigolr@gmail.com>
2023-08-08 13:05:50 +02:00
Riqwan Thamir 281b0746cf feat(medusa,workflows) Create cart workflow (#4685)
* chore: add baseline test for create cart

* chore: add basic paths into handlers + make first tests pass

* chore: move input alias to cart specific workflow

* chore: move data around into buckets

* chore: normalize handlers and introduce types

* chore: move aliases to handlers concern

* chore: add compensation step for create cart

* chore: merge with latest develop

* chore: handle error manually + type inputs

* chore: handle error manually

* chore: added types for each handler

* chore: remove addresses

* chore: added changset

* chore: undo package changes

* chore: added config settings to retreieve, cleanup of types

* chore: capitalize cart handlers

* chore: rename todo

* chore: add feature flag for workflow

* chore: reorder handlers

* chore: add logger to route handler

* chore: removed weird vscode moving around things

* chore: refactor handlers

* chore: refactor compensate step

* chore: changed poistion

* chore: aggregate config data

* chore: moved handlers to their own domain + pr review addressing

* chore: address pr reviews

* chore: move types to type package

* chore: update type to include config

* chore: remove error scoping
2023-08-08 12:10:27 +02:00
Riqwan Thamir a42c41e8ab chore: scope errors on workflow to invoke (#4709)
what:

Scopes the errors from the exported workflow to return only invoke errors. 

If an error occurs on the invoke level, it'll stop the invoke flow and begin the compensation flow. If another error shows up on the compensate level, it doesn't make sense to throw that error since the user won't be able to do anything about it.
2023-08-07 17:02:38 +00:00
Adrien de Peretti 8ae31aff4b feat(workflows):product handlers should be reusable in different context (#4703)
**What**
The listProducts handler should not be specific to the workflow.
Same for the product removal, shouldn't expect an entire DTO but just a collection of object that at least contains the id.
Same principle applied to other product handlers
2023-08-07 16:22:22 +00:00
github-actions[bot] b396168dfd chore(docs): Generated Services Reference (automated) (#4705)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-07 17:14:50 +03:00
github-actions[bot] 658339767b chore(docs): Generated API Reference (#4706)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-07 16:54:48 +03:00
github-actions[bot] efdea04963 chore(docs): Generated Docs Announcement Bar (automated) (#4704)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2023-08-07 16:20:13 +03:00
olivermrbl 755f9cf307 chore: Update lock file 2023-08-07 13:48:05 +02:00
github-actions[bot] 0deecf353f chore: Version Packages (#4643)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-07 13:43:54 +02:00
olivermrbl f2c854fc0d chore(medusa): Replace workspace version 2023-08-07 13:02:53 +02:00
Oli Juhl 5c60aad177 feat(medusa, utils): Allow object feature flags (#4701)
Feature flags can be set as follows:

**Environment variables**
```
MEDUSA_FF_ANALYTICS=true
MEDUSA_FF_WORKFLOWS=createProducts,addShippingMethods
```

**Project config**
```
{
  featureFlags: {
    analytics: true,
    workflows: {
      createProducts: true,
      addShippingMethods: true,
    }
  }
}
```
2023-08-07 09:38:25 +00:00
Lacey Pevey 03fb0479c0 feat(medusa): Allow logging to file (#4696)
* enable additional log transport to file if FILE_NAME env var is set

* change var declaration to const

* Create chilly-geckos-look.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-06 15:14:49 +02:00
Adrien de Peretti dc46927bc6 feat(medusa, types, utils, workflow): Migrate medusa workflow to the workflow package (#4682) 2023-08-05 16:03:45 +02:00
Shahed Nasser 433914ae01 docs: revamp plugin documentation pages (#4694)
* docs: revamp plugin documentation pages

* fix eslint errors

* change order of scripts
2023-08-04 17:26:39 +03:00
Riqwan Thamir 1260b1a806 chore: fix module test (#4693) 2023-08-04 14:38:07 +02:00
Riqwan Thamir 8af55aed87 feat(product, types, modules-sdk): added event bus events for products (#4654)
what:

- adds an eventbus dependency to product module.
- emits events on product, category and collection CUD

RESOLVES CORE-1450
2023-08-04 09:26:02 +00:00
Adrien de Peretti 43f34866c8 feat(workflows): Improve typings (#4689)
Just improve some typings for simpler usage
2023-08-04 08:11:44 +00:00
Adrien de Peretti ce3326c5fb feat(prduct, utils, types): Create soft delete pattern for link module (#4649)
* feat(prouct, utils, types): Create soft delete pattern for link module

* add comment

* add comment

* finalise

* remove linkable keys

* cleanup and tests

* cleanup

* add some comments and renaming

* re work

* fix tests

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2023-08-02 19:29:01 +02:00
zhangpengchen fc6c9df035 fix(medusa): Assign metadata when creating a draft order or creating a line item (#4662)
When creating a draft order or creating a line item via Postman, filled metadata is not saved, metadata remains null in the API response

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-02 16:02:29 +00:00
Lacey Pevey 9c682ce288 chore(medusa): Update request-ip dependency version (#4636)
This updates the request-ip package dependency in @medusajs/medusa.

This resolves the critical security warnings seen when creating a new medusa backend OTHER THAN medusa-admin related issues.  Because the admin is undergoing an extensive rewrite, I didn't address the older version of node-fetch that is at the root of those issues.

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-02 15:29:12 +00:00
Adrien de Peretti 8b67c676fa feat(workflow): Add pipe tests (#4675)
* feat(workflow): Add pipe tests

* improve tests
2023-08-02 16:46:30 +02:00
Shahed Nasser 738eac63aa docs: fixes to medusa-react (#4672)
* docs: fixes to medusa-react

* fixes to admin customization pages

* fix eslint errors

* added routes and settings props

* fixes to settings page

* small fix for settings
2023-08-02 15:27:32 +03:00
Adrien de Peretti e78c47b66f fix(workflows): Workflow types (#4673)
* fix(workflow): types and handlers

* add middleware pipe example

* Create nine-gorillas-collect.md
2023-08-02 13:50:06 +02:00
zhangpengchen dae34297eb feat(medusa): Expose some commonly used utils (#4630)
* feat(medusa): Expose some commonly used utils

* Create chilled-lions-raise.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-02 13:48:56 +02:00
Oli Juhl bb534e0453 fix(admin-ui): Customer Groups in Pricing + TIP (#4670)
* Use NextSelect

* Ensure boolean value of includes taxa

* Create thin-kings-grab.md
2023-08-02 13:45:27 +02:00
Adrien de Peretti 4b80ba8a35 fix(product, integration-tests): Fix integration tests (#4674)
* fix(product, integration-tests): Fix integration tests

* improve test

* Create dirty-eagles-shop.md
2023-08-02 13:44:53 +02:00
Minh Tu Ngo 7f1421c218 docs: fixes env variable name in next.js docs (#4665)
the SEARCH_INDEX_NAME variable should equal to  process.env.NEXT_PUBLIC_SEARCH_API_KEY  (as in the .env file) instead of NEXT_PUBLIC_INDEX_NAME.

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-02 11:47:59 +03:00
Shahed Nasser 84fe2a3837 docs: add missing code in create entity doc (#4669) 2023-08-02 10:45:04 +03:00
github-actions[bot] 82ceea7000 chore(docs): Removed Docs Announcement Bar (automated) (#4667)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2023-08-02 10:12:42 +03:00
Shahed Nasser c90191eb7e docs: revamped endpoints, services, and entities (#4660)
* revamp create endpoint docs

* docs: revamped endpoints, services, and entities

* eslint fixes

* fix metadata

* fix missing closing tag

* fixes to create migration doc

* fixes to create endpoint doc

* small fix in create service doc
2023-08-01 19:36:56 +03:00
Shahed Nasser 6c885ac2d6 docs: fixes to create entity docs (#4657) 2023-08-01 13:50:23 +03:00