import { Interfaces } from '@oclif/core'; import { SfCommand } from '@salesforce/sf-plugins-core'; import { PipelineStage, PromoteOptions } from '../index.js'; import type { AsyncOperationResultJson } from '../../common/index.js'; import { AsyncCommand } from './abstractAsyncOperation.js'; export type Flags = Interfaces.InferredFlags<(typeof QuickPromotionCommand)['baseFlags'] & T['flags']>; export default abstract class QuickPromotionCommand extends AsyncCommand { static readonly enableJsonFlag = true; static baseFlags: { async: Interfaces.BooleanFlag; concise: Interfaces.BooleanFlag; verbose: Interfaces.BooleanFlag; wait: Interfaces.OptionFlag; 'devops-center-username': Interfaces.OptionFlag; 'job-id': Interfaces.OptionFlag; 'use-most-recent': Interfaces.BooleanFlag; 'flags-dir': import("@oclif/core/interfaces").OptionFlag; }; protected flags: Flags; private targetStage; private deployOptions; init(): Promise; /** * * Knows how to perform a quick promotion and watch its progress. */ executeQuickPromotion(): Promise; protected getTargetStage(): PipelineStage; /** * * Build a promotion request for a quick promotion and send it to the target org. * * @param projectId ID of the project. * @param sourceStageId ID of the source stage. * @param deploymentId ID of the validate deployemnt to use for quick deploy. */ private requestPromotion; /** * * Obtain the deployment ID to use for quick promotion. */ private getDeploymentResultForQuickDeploy; /** * * Build the promote options for a quick promotion. */ private buildPromoteOptions; /** * Knows how to compute the target pipeline stage Id based on the type of promotion. * * @returns: string. It is the source stage Id. */ protected abstract getSourceStageId(): string; /** * Returns the specific promote options specific for every concrete implementations. * * @returns: Partial. */ protected abstract getPromoteOptions(): Partial; }