import type { Command } from "../Command.js";
import { CommandRegistry } from "../CommandRegistry.js";
import type { Event } from "../Event.js";
import { EventRegistry } from "../EventRegistry.js";
import type { Operation } from "../Operation.js";
import { OperationRegistry } from "../OperationRegistry.js";
import type { MapsLike } from "../common.js";
interface ExecuteWorkflowArgs {
    /**
     * The ID of the workflow item in app config.
     */
    id: string;
    /**
     * The title of the workflow.
     */
    title?: string;
    /**
     * An icon to display for the workflow.
     */
    icon?: string;
    /**
     * The inputs to be passed into the workflow.
     */
    inputs?: {
        [index: string]: unknown;
    };
    /**
     * The workflow input that the command's context will map to.
     */
    commandArgumentInput?: string;
    /**
     * A unique Id to identify an instance of this workflow running.
     */
    instanceId?: string;
    /**
     * The map to target, if omitted Web will attempt to choose the best map for
     * you. Web only.
     *
     * @webOnly
     */
    maps?: MapsLike;
    /**
     * The layout ID of the workflow component to use for any workflow forms, or
     * the ID of a container component like taskbar, panel, stack, etc. In the
     * latter case, a new workflow component will be created dynamically as a
     * child of the targeted container, and removed when the workflow finishes
     * running.
     */
    target?: string;
}
/**
 * Arguments for the workflow.run command.
 */
export interface RunWorkflowArgs extends ExecuteWorkflowArgs {
    /**
     * Whether or not the workflow should be executed asynchronously. If this
     * property is true, the workflow will be executed but the command will not
     * wait for it to finish. Defaults to false. Web only.
     *
     * @webOnly
     */
    async?: boolean;
}
/**
 * Arguments for the workflow.evaluate command.
 */
export interface EvaluateWorkflowArgs extends ExecuteWorkflowArgs {
}
interface WorkflowModel {
}
/**
 * Base arguments for various Workflow-related events.
 */
export interface WorkflowEventBase {
    /**
     * The workflow pertaining to the event.
     */
    workflow: WorkflowModel;
}
/**
 * Arguments for the "workflow.workflow-error" event.
 */
export interface WorkflowErrorEventArgs extends WorkflowEventBase {
    /**
     * The human readable error message.
     */
    errorMessage?: string;
    /**
     * The Error object containing detailed information about the error.
     */
    exception?: Error;
}
/**
 * Arguments for the "workflow.workflow-started" event.
 */
export interface WorkflowStartedEventArgs extends WorkflowEventBase {
}
/**
 * Arguments for the "workflow.workflow-starting" event.
 */
export interface WorkflowStartingEventArgs extends WorkflowEventBase {
}
/**
 * Arguments for the "workflow.workflow-finished" event.
 */
export interface WorkflowFinishedEventArgs extends WorkflowEventBase {
}
export declare class WorkflowCommands extends CommandRegistry {
    protected readonly _prefix = "workflow";
    /**
     * Runs a workflow with the given arguments. See the `workflow.evaluate`
     * operation if you want to run a workflow and expect output values to be
     * returned.
     */
    get run(): Command<RunWorkflowArgs>;
    /**
     * Refreshes (i.e. cancels and reruns) a workflow with the specified ID
     * (corresponding to the workflow ID as configured in app.json, not the
     * workflow's portal item ID). Mobile only.
     *
     * @mobileOnly
     */
    get refresh(): Command<string>;
    /**
     * Cancels a workflow with the given ID. Mobile only.
     *
     * @mobileOnly
     */
    get cancel(): Command<string>;
    /**
     * Cancels all running workflows. Mobile only.
     *
     * @mobileOnly
     */
    get cancelAll(): Command;
}
export declare class WorkflowOperations extends OperationRegistry {
    protected readonly _prefix = "workflow";
    /**
     * Runs a workflow with the given arguments and returns the workflow's
     * output as the result of the operation. The output in the workflow is set
     * using the "Set Workflow Output" activity. See the "workflow.run" command
     * if you want to run a workflow without any output values.
     */
    get evaluate(): Operation<EvaluateWorkflowArgs, Record<string, unknown>>;
}
export declare class WorkflowEvents extends EventRegistry {
    protected readonly _prefix = "workflow";
    /**
     * Raised when a workflow has started running. Web only.
     *
     * @webOnly
     */
    get workflowStarted(): Event<WorkflowStartedEventArgs>;
    /**
     * Raised when a workflow is about to start. Mobile only.
     *
     * @mobileOnly
     */
    get starting(): Event<WorkflowStartingEventArgs>;
    /**
     * Raised when a workflow finishes running.
     */
    get workflowFinished(): Event<WorkflowFinishedEventArgs>;
    /**
     * Raised when an error occurs while running a workflow.
     */
    get workflowError(): Event<WorkflowErrorEventArgs>;
}
export {};
