/// <reference types="angular-mocks" />
import type { StateService } from '@uirouter/core';
import type { IQService, ITimeoutService } from 'angular';
import type { Application } from '../../application/application.model';
import type { ApplicationDataSource } from '../../application/service/applicationDataSource';
import type { IExecution } from '../../domain';
import type { IPipeline } from '../../domain/IPipeline';
import type { IRetryablePromise } from '../../utils/retryablePromise';
export declare class ExecutionService {
    private $q;
    private $state;
    private $timeout;
    get activeStatuses(): string[];
    private runningLimit;
    private ignoredStringValFields;
    constructor($q: IQService, $state: StateService, $timeout: ITimeoutService);
    getRunningExecutions(applicationName: string): PromiseLike<IExecution[]>;
    private getFilteredExecutions;
    /**
     * Returns a filtered list of executions for the given application
     * @param {string} applicationName the name of the application
     * @param {Application} application: if supplied, and pipeline parameters are present on the filter model, the
     * application will be used to correlate and filter the retrieved executions to only include those pipelines
     * @param {boolean} expand: if true, the resulting executions will include fully hydrated context, outputs, and tasks
     * fields
     * @return {<IExecution[]>}
     */
    getExecutions(applicationName: string, application?: Application, expand?: boolean): PromiseLike<IExecution[]>;
    getExecution(executionId: string, pipelineConfigs?: IPipeline[]): PromiseLike<IExecution>;
    transformExecutions(application: Application, executions: IExecution[], currentData?: IExecution[]): void;
    private getConfigIdsFromFilterModel;
    private cleanExecutionForDiffing;
    toggleDetails(execution: IExecution, stageIndex: number, subIndex: number): void;
    private removeInstances;
    startAndMonitorPipeline(app: Application, pipeline: string, trigger: any): PromiseLike<IRetryablePromise<void>>;
    waitUntilTriggeredPipelineAppears(application: Application, triggeredPipelineId: string): IRetryablePromise<any>;
    private waitUntilPipelineIsCancelled;
    private waitUntilPipelineIsDeleted;
    cancelExecution(application: Application, executionId: string, force?: boolean, reason?: string): PromiseLike<any>;
    pauseExecution(application: Application, executionId: string): PromiseLike<any>;
    resumeExecution(application: Application, executionId: string): PromiseLike<any>;
    deleteExecution(application: Application, executionId: string): PromiseLike<any>;
    waitUntilExecutionMatches(executionId: string, matchPredicate: (execution: IExecution) => boolean): PromiseLike<IExecution>;
    getSectionCacheKey(groupBy: string, application: string, heading: string): string;
    getProjectExecutions(project: string, limit?: number): PromiseLike<IExecution[]>;
    addExecutionsToApplication(application: Application, executions?: IExecution[]): IExecution[];
    mergeRunningExecutionsIntoExecutions(application: Application): void;
    removeCompletedExecutionsFromRunningData(application: Application): void;
    updateExecution(application: Application, updatedExecution: IExecution, dataSource?: ApplicationDataSource<IExecution[]>): void;
    /**
     * Fetches a fully hydrated execution, then assigns all its values to the supplied execution.
     * If the execution is already hydrated, the operation does not re-fetch the execution.
     *
     * If this method is called multiple times, only the first call performs the fetch;
     * subsequent calls will return the promise produced by the first call.
     *
     * This is a mutating operation - it fills the context, outputs, and tasks on the stages of the unhydrated execution.
     * @param application the application owning the execution; needed because the stupid
     *   transformExecution requires it.
     * @param unhydrated the execution to hydrate (which may already be hydrated)
     * @return a Promise, which resolves with the execution itself.
     */
    hydrate(application: Application, unhydrated: IExecution): Promise<IExecution>;
    getLastExecutionForApplicationByConfigId(appName: string, configId: string): PromiseLike<IExecution>;
    /**
     * Returns a list of recent executions for the supplied set of IDs, optionally filtered by status
     * @param {string[]} pipelineConfigIds the pipeline config IDs
     * @param {{limit?: number; statuses?: string; transform?: boolean; application?: Application}} options:
     *  transform: if true - and the application option is set, the execution transformer will run on each result (default: false)
     *  application: if transform is true, the application to use when transforming the executions (default: null)
     *  limit: the number of executions per config ID to retrieve (default: whatever Gate sets)
     *  statuses: an optional set of execution statuses (default: all)
     * @return {PromiseLike<IExecution[]>}
     */
    getExecutionsForConfigIds(pipelineConfigIds: string[], options?: {
        limit?: number;
        statuses?: string;
        transform?: boolean;
        application?: Application;
    }): PromiseLike<IExecution[]>;
    patchExecution(executionId: string, stageId: string, data: any): PromiseLike<any>;
    private stringifyExecution;
    private stringify;
}
export declare const EXECUTION_SERVICE = "spinnaker.core.pipeline.executions.service";
