import { Connection } from '@salesforce/core'; export type PromoteStageParams = { connection: Connection; pipelineId: string; workItemIds: string[]; targetStageId: string; fullDeploy?: boolean; testLevel?: string; runTests?: string[]; }; export type PromoteStageResult = { requestId: string; status: string; message: string; promotedWorkitemIds: string[]; }; /** * Promotes work items to a target pipeline stage via the Connect API. * POST /services/data/v{version}/connect/devops/pipelines/{pipelineId}/promote */ export declare function promoteStage(params: PromoteStageParams): Promise; /** * DevopsPipelnStgProm.Status values that indicate a promotion has been submitted * but has not yet finished (i.e. is still in flight). */ export declare const IN_FLIGHT_PROMOTION_STATUSES: readonly ["NEW", "IN_PROGRESS", "FINALIZING"]; export type InFlightPromotion = { id: string; requestToken: string; status: string; }; /** * Returns any in-flight promotions targeting the given pipeline stage. * * DevopsPipelnStgProm (Pipeline Stage Promotion) records the target stage of a promotion * (PipelineStageId) and links to its DevopsRequestInfo, so the check is scoped to the * specific target stage — and therefore its pipeline — rather than the whole org. Used to * block a duplicate promotion to the same stage while one is already running, without * affecting promotions in other stages or pipelines. */ export declare function findInFlightPromotions(connection: Connection, targetStageId: string): Promise;