import { InputSpec } from './input/builder';
import { ExtractInputSpecType } from './input/builder/inputSpec';
import * as T from '../types';
import { InitScript } from '../inits';
export type Run> = (options: {
effects: T.Effects;
input: A;
spec: T.inputSpecTypes.InputSpec;
}) => Promise<(T.ActionResult & {
version: '1';
}) | null | void | undefined>;
export type GetInput> = (options: {
effects: T.Effects;
prefill: T.DeepPartial | null;
}) => Promise>;
export type MaybeFn = T | ((options: Opts) => Promise);
export interface ActionInfo> {
readonly id: Id;
readonly _INPUT: Type;
}
export declare class Action> implements ActionInfo {
readonly id: Id;
private readonly metadataFn;
private readonly inputSpec;
private readonly getInputFn;
private readonly runFn;
readonly _INPUT: Type;
private prevInputSpec;
private constructor();
static withInput>>(id: Id, metadata: MaybeFn>, inputSpec: MaybeFn, getInput: GetInput>, run: Run>): Action>;
static withoutInput(id: Id, metadata: MaybeFn>, run: Run<{}>): Action;
exportMetadata(options: {
effects: T.Effects;
}): Promise;
getInput(options: {
effects: T.Effects;
prefill: T.DeepPartial | null;
}): Promise;
run(options: {
effects: T.Effects;
input: Type;
}): Promise;
}
export declare class Actions>> implements InitScript {
private readonly actions;
private constructor();
static of(): Actions<{}>;
addAction>(action: A): Actions;
init(effects: T.Effects): Promise;
get(actionId: Id): AllActions[Id];
}