UNPKG

@medusajs/core-flows

Version:

Set of workflow definitions for Medusa

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