Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/add additionl data to product categories hook #11226

Conversation

bouazzaayyoub
Copy link
Contributor

Add an additional_data property to the categoriesCreated hook, enabling users to extend the Product Category model.

@bouazzaayyoub bouazzaayyoub requested a review from a team as a code owner January 30, 2025 09:15
Copy link

changeset-bot bot commented Jan 30, 2025

🦋 Changeset detected

Latest commit: d55d455

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 65 packages
Name Type
@medusajs/medusa Patch
@medusajs/core-flows Patch
@medusajs/types Patch
integration-tests-http Patch
@medusajs/test-utils Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/customer Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/payment Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/framework Patch
@medusajs/js-sdk Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/utils Patch
@medusajs/workflows-sdk Patch
@medusajs/cli Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci Patch
@medusajs/telemetry Patch
@medusajs/admin-bundler Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/admin-vite-plugin Patch
@medusajs/dashboard Patch
@medusajs/icons Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
create-medusa-app Patch
medusa-dev-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jan 30, 2025

@bouazzaayyoub is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@carlos-r-l-rodrigues carlos-r-l-rodrigues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bouazzaayyoub
Copy link
Contributor Author

hello,
any updates about this PR.
Thanks

@bouazzaayyoub
Copy link
Contributor Author

hello,
any updates about this PR??
Thanks

Copy link
Contributor

@riqwan riqwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@riqwan
Copy link
Contributor

riqwan commented Feb 25, 2025

@bouazzaayyoub you're missing whitelisting the additional_data param in the http validators - packages/medusa/src/api/admin/product-categories/validators.ts. You can use the WithAdditionalData helper as used in other places like - packages/medusa/src/api/admin/products/validators.ts

If you can write a simple test for this, would be great!

@bouazzaayyoub
Copy link
Contributor Author

@bouazzaayyoub you're missing whitelisting the additional_data param in the http validators - packages/medusa/src/api/admin/product-categories/validators.ts. You can use the WithAdditionalData helper as used in other places like - packages/medusa/src/api/admin/products/validators.ts

If you can write a simple test for this, would be great!

thank you for your reply

Copy link
Contributor

@riqwan riqwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change @bouazzaayyoub, i've added a couple of comments on the new change.

@riqwan
Copy link
Contributor

riqwan commented Feb 26, 2025

Legend, thanks for the contribution @bouazzaayyoub!

@riqwan riqwan merged commit 93cbc6b into medusajs:develop Feb 26, 2025
14 of 23 checks passed
@github-actions github-actions bot mentioned this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants