UNPKG

@medusajs/core-flows

Version:

Set of workflow definitions for Medusa

38 lines 1.62 kB
import { WorkflowData } from "@medusajs/framework/workflows-sdk"; /** * The data to delete one or more product variants. */ export type DeleteProductVariantsWorkflowInput = { /** * The IDs of the variants to delete. */ ids: string[]; }; export declare const deleteProductVariantsWorkflowId = "delete-product-variants"; /** * This workflow deletes one or more product variants. It's used by the * [Delete Product Variants Admin API Route](https://docs.medusajs.com/api/admin#products_deleteproductsidvariantsvariant_id). * * This workflow has a hook that allows you to perform custom actions after the product variants are deleted. For example, * you can delete custom records linked to the product variants. * * You can also use this workflow within your own custom workflows, allowing you to wrap custom logic around product-variant deletion. * * @example * const { result } = await deleteProductVariantsWorkflow(container) * .run({ * input: { * ids: ["variant_123"], * } * }) * * @summary * * Delete one or more product variants. * * @property hooks.productVariantsDeleted - This hook is executed after the variants are deleted. You can consume this hook to perform custom actions on the deleted variants. */ export declare const deleteProductVariantsWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<DeleteProductVariantsWorkflowInput, never, [import("@medusajs/framework/workflows-sdk").Hook<"productVariantsDeleted", { ids: (string[] | WorkflowData<string[]>) & string[]; }, unknown>]>; //# sourceMappingURL=delete-product-variants.d.ts.map