feat(workflows-sdk): Allow when then in parallelize (#11756)

**What**
Update typings to allow using when then inside parallelize
This commit is contained in:
Adrien de Peretti
2025-03-06 13:23:37 +00:00
committed by GitHub
parent 3b470f4142
commit 84f991192e
5 changed files with 92 additions and 16 deletions
@@ -19,19 +19,20 @@ import { updateProductsWorkflow } from "./update-products"
/**
* The products to manage.
*/
export interface BatchProductWorkflowInput extends BatchWorkflowInput<
CreateProductWorkflowInputDTO,
UpdateProductWorkflowInputDTO
> {}
export interface BatchProductWorkflowInput
extends BatchWorkflowInput<
CreateProductWorkflowInputDTO,
UpdateProductWorkflowInputDTO
> {}
export const batchProductsWorkflowId = "batch-products"
/**
* This workflow creates, updates, or deletes products. It's used by the
* [Manage Products Admin API Route](https://docs.medusajs.com/api/admin#products_postproductsbatch).
*
*
* You can use this workflow within your own customizations or custom workflows to manage products in bulk. This is
* also useful when writing a [seed script](https://docs.medusajs.com/learn/fundamentals/custom-cli-scripts/seed-data) or a custom import script.
*
*
* @example
* const { result } = await batchProductsWorkflow(container)
* .run({
@@ -68,11 +69,11 @@ export const batchProductsWorkflowId = "batch-products"
* }
* ],
* delete: ["prod_321"]
* }
* }
* })
*
*
* @summary
*
*
* Manage products in bulk.
*/
export const batchProductsWorkflow = createWorkflow(