-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat: add hooks to product module's workflows #8389
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
Heads up @olivermrbl @adrien2p. This is approach I am planning to take. |
LGTM, however, I would argue we should start with Products specifically. Collections, types, tags, categories are less important compared to the two former. But perhaps, this was more for demonstration purposes? |
I thought by product we mean, every workflow related to products inside the
|
packages/core/core-flows/src/product/workflows/create-collections.ts
Outdated
Show resolved
Hide resolved
packages/core/core-flows/src/product/workflows/update-collections.ts
Outdated
Show resolved
Hide resolved
packages/core/core-flows/src/product/workflows/create-collections.ts
Outdated
Show resolved
Hide resolved
packages/core/core-flows/src/product/workflows/update-collections.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool to support this, I think this should solve 80% of people's customization needs 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, excited about this! 🔥
There is real excitement for this 🔥 |
@thetutlage, should we merge this? 🙏 |
Yeah. Have to update the PR description to list all hooks. I can do that post merging too |
Fixes: FRMW-2641
In this PR we have introduce hooks within the product module's workflows. Following is the collection of workflows and hooks they expose.
Create action workflows
collectionsCreated
{ collections: ProductCollectionDTO[], additional_data?: AdditionalData }
productOptionsCreated
{ product_options: ProductOptionDTO[], additional_data?: AdditionalData }
productTagsCreated
{ product_tags: ProductTagDTO[], additional_data?: AdditionalData }
productTypesCreated
{ product_types: ProductTypeDTO[], additional_data?: AdditionalData }
productVariantsCreated
{ product_variants: ProductVariantDTO[], additional_data?: AdditionalData }
productsCreated
{ products: ProductDTO[], additional_data?: AdditionalData }
Update action workflows
collectionsUpdated
{ collections: ProductCollectionDTO[], additional_data?: AdditionalData }
productOptionsUpdated
{ product_options: ProductOptionDTO[], additional_data?: AdditionalData }
productTagsUpdated
{ product_tags: ProductTagDTO[], additional_data?: AdditionalData }
productTypesUpdated
{ product_types: ProductTypeDTO[], additional_data?: AdditionalData }
productVariantsUpdated
{ product_variants: ProductVariantDTO[], additional_data?: AdditionalData }
productsUpdated
{ products: ProductDTO[], additional_data?: AdditionalData }
Delete action workflows
collectionsDeleted
{ ids: string[] }
productOptionsDeleted
{ ids: string[] }
productTagsDeleted
{ ids: string[] }
productTypesDeleted
{ ids: string[] }
productVariantsDeleted
{ ids: string[] }
productsDeleted
{ ids: string[] }