@medusajs/core-flows
Version:
Set of workflow definitions for Medusa
43 lines • 2.08 kB
TypeScript
import { WorkflowData } from "@medusajs/framework/workflows-sdk";
import { CreateStockLocationInput } from "@medusajs/framework/types";
/**
* The data to create the stock locations.
*/
export interface CreateStockLocationsWorkflowInput {
/**
* The stock locations to create.
*/
locations: CreateStockLocationInput[];
}
export declare const createStockLocationsWorkflowId = "create-stock-locations-workflow";
/**
* This workflow creates one or more stock locations. It's used by the
* [Create Stock Location Admin API Route](https://docs.medusajs.com/api/admin#stock-locations_poststocklocations).
*
* You can use this workflow within your own customizations or custom workflows, allowing you
* to create stock locations in your custom flows.
*
* @example
* const { result } = await createStockLocationsWorkflow(container)
* .run({
* input: {
* locations: [
* {
* name: "European Warehouse",
* }
* ]
* }
* })
*
* @summary
*
* Create one or more stock locations.
*/
export declare const createStockLocationsWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<CreateStockLocationsWorkflowInput, import("@medusajs/framework/types").StockLocationDTO[], [import("@medusajs/framework/workflows-sdk").Hook<"stockLocationsCreated", {
stockLocations: (import("@medusajs/framework/types").StockLocationDTO | WorkflowData<import("@medusajs/framework/types").StockLocationDTO>)[] & import("@medusajs/framework/types").StockLocationDTO[] & import("@medusajs/framework/workflows-sdk").WorkflowDataProperties<import("@medusajs/framework/types").StockLocationDTO[]> & {
config(config: {
name?: string;
} & Omit<import("@medusajs/orchestration").TransactionStepsDefinition, "next" | "uuid" | "action">): WorkflowData<import("@medusajs/framework/types").StockLocationDTO[]>;
} & import("@medusajs/framework/workflows-sdk").StepFunctionReturnConfig<import("@medusajs/framework/types").StockLocationDTO[]>;
}, unknown>]>;
//# sourceMappingURL=create-stock-locations.d.ts.map