import { Connection } from '@salesforce/core'; export type UndeployedWorkItemsResult = { undeployedWorkitemIds: string[]; }; export type ValidateDeployResult = { success: boolean; errorType: string | null; errorDetails: string | null; }; export type DeployStageResult = { requestId: string; status: string; message: string; promotedWorkitemIds: string[]; }; /** Maps a comma-separated list of work item names to the components they share. */ export type SharedComponentsList = Record; export type CombineDetails = { childWorkitemsId?: string[]; parentWorkitemId?: string; sharedComponentsList?: SharedComponentsList; } & Record; /** * Returns true when the combine details describe work items that share one or more components. * Shared components mean the work items can optionally be combined before promotion. */ export declare function hasSharedComponents(combineDetails: CombineDetails | null): boolean; export type ValidatePromotionResult = { success: boolean; errorType: string | null; errorDetails: string | null; combineDetails: CombineDetails | null; }; /** * GET /services/data/vXX.X/connect/devops/pipelines/{pipelineId}/stages/{stageId}/undeployedWorkitems */ export declare function getUndeployedWorkItems(connection: Connection, pipelineId: string, stageId: string): Promise; /** * POST /services/data/vXX.X/connect/devops/pipelines/{pipelineId}/validatePromote */ export declare function validateDeploy(connection: Connection, pipelineId: string, workItemIds: string[], targetStageId: string): Promise; export declare function formatValidationDetails(raw: string | null): string; /** * POST /services/data/vXX.X/connect/devops/pipelines/{pipelineId}/validatePromote * Full variant that accepts checkCombineDetails and returns combineDetails. */ export declare function validatePromotion(connection: Connection, pipelineId: string, workItemIds: string[], targetStageId: string, checkCombineDetails?: boolean, allWorkItemsInStage?: boolean): Promise; /** * POST /services/data/vXX.X/connect/devops/pipelines/{pipelineId}/promote * When workItemIds are provided, targets those specific items (allWorkItemsInStage: false). * When omitted, lets Core fill IDs from undeployed/external-merge state (allWorkItemsInStage: true). */ export declare function executeDeploy(connection: Connection, pipelineId: string, targetStageId: string, fullDeploy?: boolean, testLevel?: string, runTests?: string[], workItemIds?: string[]): Promise;