import { Condition, type ExpressionSource, ExpressionValue } from "./expression.js"; export type ConditionLike = Condition | ExpressionValue | string; export type ConfigValue = string | number | boolean | ExpressionValue; export interface StepConfig { readonly name?: string; readonly id?: string; readonly uses?: string; readonly run?: string | string[]; readonly with?: Readonly>; readonly env?: Readonly>; readonly if?: ConditionLike; readonly shell?: string; readonly workingDirectory?: string; readonly continueOnError?: boolean | string; readonly timeoutMinutes?: number; readonly outputs?: readonly O[]; } export declare function resetStepCounter(): void; export type StepLike = Step | StepRef | StepConfig; export declare class Step implements ExpressionSource { #private; readonly config: StepConfig; readonly outputs: { [K in O]: ExpressionValue; }; readonly _crossJobDeps: readonly Step[]; readonly children: readonly StepLike[]; constructor(config: StepConfig, crossJobDeps?: Step[]); constructor(children: readonly StepLike[]); get id(): string; dependsOn(...deps: StepLike[]): StepRef; comesAfter(...deps: StepLike[]): StepRef; if(condition: ConditionLike): StepRef; toYaml(effectiveIf?: Condition): Record; } export interface StepBuilder { (...args: (StepConfig | Step | StepRef)[]): StepRef; if(condition: ConditionLike): StepBuilder; dependsOn(...deps: StepLike[]): StepBuilder; comesAfter(...deps: StepLike[]): StepBuilder; } export interface StepFunction { (...args: (StepConfig | Step | StepRef)[]): Step; if(condition: ConditionLike): StepBuilder; dependsOn(...deps: StepLike[]): StepBuilder; comesAfter(...deps: StepLike[]): StepBuilder; } export declare const step: StepFunction; export declare class StepRef { readonly step: Step; readonly condition?: ConditionLike; readonly dependencies: readonly StepLike[]; readonly afterDependencies: readonly StepLike[]; constructor(step: Step, init?: { condition?: ConditionLike; dependencies?: readonly StepLike[]; afterDependencies?: readonly StepLike[]; }); get id(): string; get config(): StepConfig; get outputs(): { [K in O]: ExpressionValue; }; dependsOn(...deps: StepLike[]): StepRef; comesAfter(...deps: StepLike[]): StepRef; if(condition: ConditionLike): StepRef; } export declare function serializeConditionLike(c: ConditionLike): string; export declare function toCondition(c: ConditionLike): Condition; export declare function serializeConfigValues(record: Record): Record; /** Normalizes a StepLike to a Step or StepRef, auto-wrapping plain objects. */ export declare function normalizeStepLike(item: StepLike): Step | StepRef; /** Extracts the underlying Step from a StepLike (Step or StepRef). */ export declare function unwrapStep(item: StepLike): Step; /** Extracts all underlying leaf Steps from a StepLike (recursively for composites). */ export declare function unwrapSteps(item: StepLike): Step[]; //# sourceMappingURL=step.d.ts.map