import { AdditionalData, CreateCartDTO, CreateCartWorkflowInputDTO } from "@medusajs/framework/types";
import { WorkflowData } from "@medusajs/framework/workflows-sdk";
/**
 * The data to create the cart, along with custom data that's passed to the workflow's hooks.
 */
export type CreateCartWorkflowInput = CreateCartWorkflowInputDTO & AdditionalData;
/**
 * The data to prepare the cart to create.
 */
export interface PrepareCartToCreateStepInput {
    /**
     * The cart creation input.
     */
    input: CreateCartWorkflowInput;
    /**
     * The region the cart belongs to.
     */
    region: {
        id: string;
        currency_code: string;
        countries: {
            iso_2: string;
        }[];
    } | null;
    /**
     * The customer found or created for the cart, if any.
     */
    customerData: {
        customer?: {
            id: string;
            email: string;
        } | null;
    };
    /**
     * The sales channel the cart belongs to.
     */
    salesChannel: {
        id: string;
    } | null;
}
/**
 * This step prepares the data used to create a cart, resolving the cart's
 * currency, region, customer, sales channel, and a default shipping address
 * when the region has a single country. It throws an error if no region is
 * provided.
 */
export declare const prepareCartToCreateStep: import("@medusajs/framework/workflows-sdk").StepFunction<PrepareCartToCreateStepInput, CreateCartDTO>;
export declare const createCartWorkflowId = "create-cart";
/**
 * This workflow creates and returns a cart. You can set the cart's items, region, customer, and other details. This workflow is executed by the
 * [Create Cart Store API Route](https://docs.medusajs.com/api/store/carts/create-cart).
 *
 * This workflow has a hook that allows you to perform custom actions on the created cart. You can see an example in [this guide](https://docs.medusajs.com/resources/commerce-modules/cart/extend#step-4-consume-cartcreated-workflow-hook).
 *
 * You can also use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around cart creation.
 *
 * @example
 * const { result } = await createCartWorkflow(container)
 *   .run({
 *     input: {
 *       region_id: "reg_123",
 *       items: [
 *         {
 *           variant_id: "var_123",
 *           quantity: 1,
 *         }
 *       ],
 *       customer_id: "cus_123",
 *       additional_data: {
 *         external_id: "123"
 *       }
 *     }
 *   })
 *
 * @summary
 *
 * Create a cart specifying region, items, and more.
 *
 * @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
 * @property hooks.cartCreated - This hook is executed after a cart is created. You can consume this hook to perform custom actions on the created cart.
 * @property hooks.setPricingContext - This hook is executed after the cart is retrieved and before the line items are created. You can consume this hook to return any custom context useful for the prices retrieval of the variants to be added to the cart.
 *
 * For example, assuming you have the following custom pricing rule:
 *
 * ```json
 * {
 *   "attribute": "location_id",
 *   "operator": "eq",
 *   "value": "sloc_123",
 * }
 * ```
 *
 * You can consume the `setPricingContext` hook to add the `location_id` context to the prices calculation:
 *
 * ```ts
 * import { createCartWorkflow } from "@medusajs/medusa/core-flows";
 * import { StepResponse } from "@medusajs/workflows-sdk";
 *
 * createCartWorkflow.hooks.setPricingContext((
 *   { region, variantIds, salesChannel, customerData, additional_data }, { container }
 * ) => {
 *   return new StepResponse({
 *     location_id: "sloc_123", // Special price for in-store purchases
 *   });
 * });
 * ```
 *
 * The variants' prices will now be retrieved using the context you return.
 *
 * :::note
 *
 * Learn more about prices calculation context in the [Prices Calculation](https://docs.medusajs.com/resources/commerce-modules/pricing/price-calculation) documentation.
 *
 * :::
 */
export declare const createCartWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<CreateCartWorkflowInput, import("@medusajs/framework/types").CartDTO, [import("@medusajs/framework/workflows-sdk").Hook<"validate", {
    input: CreateCartDTO & import("@medusajs/framework/workflows-sdk").WorkflowDataProperties<CreateCartDTO> & {
        config(config: {
            name?: string;
        } & Omit<import("@medusajs/orchestration").TransactionStepsDefinition, "next" | "uuid" | "action">): WorkflowData<CreateCartDTO>;
    } & import("@medusajs/framework/workflows-sdk").StepFunctionReturnConfig<CreateCartDTO>;
    cart: WorkflowData<CreateCartDTO>;
}, unknown>, import("@medusajs/framework/workflows-sdk").Hook<"cartCreated", {
    cart: WorkflowData<import("@medusajs/framework/types").CartDTO>;
    additional_data: Record<string, unknown> | undefined;
}, unknown>, import("@medusajs/framework/workflows-sdk").Hook<"setPricingContext", {
    region: any;
    variantIds: WorkflowData<string[]>;
    salesChannel: import("@medusajs/framework/types").SalesChannelDTO & import("@medusajs/framework/workflows-sdk").WorkflowDataProperties<import("@medusajs/framework/types").SalesChannelDTO | null> & {
        config(config: {
            name?: string;
        } & Omit<import("@medusajs/orchestration").TransactionStepsDefinition, "next" | "uuid" | "action">): import("@medusajs/framework/types").SalesChannelDTO & import("@medusajs/framework/workflows-sdk").WorkflowDataProperties<import("@medusajs/framework/types").SalesChannelDTO | null> & /*elided*/ any;
    } & import("@medusajs/framework/workflows-sdk").StepFunctionReturnConfig<import("@medusajs/framework/types").SalesChannelDTO | null>;
    customerData: import("../steps").FindOrCreateCustomerOutputStepOutput & import("@medusajs/framework/workflows-sdk").WorkflowDataProperties<import("../steps").FindOrCreateCustomerOutputStepOutput> & {
        config(config: {
            name?: string;
        } & Omit<import("@medusajs/orchestration").TransactionStepsDefinition, "next" | "uuid" | "action">): WorkflowData<import("../steps").FindOrCreateCustomerOutputStepOutput>;
    } & import("@medusajs/framework/workflows-sdk").StepFunctionReturnConfig<import("../steps").FindOrCreateCustomerOutputStepOutput>;
    additional_data: Record<string, unknown> | undefined;
}, Record<string, any> | undefined>]>;
//# sourceMappingURL=create-carts.d.ts.map