import type { World } from '#compiled/@workflow/world/index.js';
import { Run } from './run.js';
export interface StartOptionsBase {
    /**
     * The world to use for the workflow run creation,
     * by default the world is inferred from the environment variables.
     */
    world?: World;
    /**
     * The spec version to use for the workflow run. Defaults to the latest version.
     */
    specVersion?: number;
}
export interface StartOptionsWithDeploymentId extends StartOptionsBase {
    /**
     * The deployment ID to use for the workflow run.
     *
     * By default, this is automatically inferred from environment variables
     * when deploying to Vercel.
     *
     * Set to `'latest'` to automatically resolve the most recent deployment
     * for the current environment (same production target or git branch).
     * This is currently a Vercel-specific feature.
     *
     * **Note:** When `deploymentId` is provided, the argument and return types become `unknown`
     * since there is no guarantee the types will be consistent across deployments.
     */
    deploymentId: 'latest' | (string & {});
}
export interface StartOptionsWithoutDeploymentId extends StartOptionsBase {
    deploymentId?: undefined;
}
/**
 * Options for starting a workflow run.
 */
export type StartOptions = StartOptionsWithDeploymentId | StartOptionsWithoutDeploymentId;
/**
 * Represents an imported workflow function.
 */
export type WorkflowFunction<TArgs extends unknown[], TResult> = (...args: TArgs) => Promise<TResult>;
/**
 * Represents the generated metadata of a workflow function.
 */
export type WorkflowMetadata = {
    workflowId: string;
};
/**
 * Starts a workflow run.
 *
 * @param workflow - The imported workflow function to start.
 * @param args - The arguments to pass to the workflow (optional).
 * @param options - The options for the workflow run (optional).
 * @returns The unique run ID for the newly started workflow invocation.
 */
export declare function start<TArgs extends unknown[], TResult>(workflow: WorkflowFunction<TArgs, TResult> | WorkflowMetadata, args: unknown[], options: StartOptionsWithDeploymentId): Promise<Run<unknown>>;
export declare function start<TResult>(workflow: WorkflowFunction<[], TResult> | WorkflowMetadata, options: StartOptionsWithDeploymentId): Promise<Run<unknown>>;
export declare function start<TArgs extends unknown[], TResult>(workflow: WorkflowFunction<TArgs, TResult> | WorkflowMetadata, args: TArgs, options?: StartOptionsWithoutDeploymentId): Promise<Run<TResult>>;
export declare function start<TResult>(workflow: WorkflowFunction<[], TResult> | WorkflowMetadata, options?: StartOptionsWithoutDeploymentId): Promise<Run<TResult>>;
//# sourceMappingURL=start.d.ts.map