import { Connection } from '@salesforce/core'; import { PipelineStageRecord } from './types.js'; export declare function getPipelineIdForProject(connection: Connection, projectId: string): Promise; export declare function fetchPipelineStages(connection: Connection, pipelineId: string): Promise; export declare function computeFirstStageId(stages: PipelineStageRecord[]): string | undefined; export declare function resolveTargetStageId(currentStageId: string | undefined, stages: PipelineStageRecord[]): string | undefined; export declare function findStageById(stages: PipelineStageRecord[], stageId: string | undefined): PipelineStageRecord | undefined; export declare function getBranchNameFromStage(stage: PipelineStageRecord | undefined): string | undefined; /** * Returns the IDs of all stages upstream (to the left) of the given stage, i.e. every stage * whose promotion path eventually reaches it by following NextStageId. The target stage itself * is not included. Order is nearest-to-farthest from the target. * * Branches are configured right-to-left (a stage can only have a branch once the stage to its * right does), so removing a branch must cascade to every upstream stage to keep the pipeline valid. */ export declare function computeUpstreamStageIds(stages: PipelineStageRecord[], stageId: string): string[];