import { Session } from "@zowe/imperative";
import { IElementActionReport, IElementBasicData } from "@broadcom/endevor-for-zowe-cli/lib/api";
import { IWorkArea } from "../doc/IWorkArea";
import { IMappingMetadata } from "../doc/IMappingMetadata";
/**
 *
 * @export
 * @class BuildUtils
 */
export declare class BuildUtils {
    static readJSONFileAsObject(filePath: string, filename: string): any;
    /**
     * Reads the work areas file (last version takes precedence)
     * @param gitLocation
     */
    static getWorkAreasFromFile(gitLocation: string): IWorkArea[];
    static getWorkAreaByIDFromWorkAreas(workAreas: IWorkArea[], workAreaId: string): IWorkArea;
    static getWorkAreaByIDFromFile(gitLocation: string, workAreaID: string): IWorkArea;
    /**
     * Get the IElementBasicData information of the lock element. Throw error if any field is missing
     *
     * @static
     * @param {IWorkArea} workArea
     * @param {string} instance
     * @returns {IElementBasicData}
     * @memberof BuildUtils
     */
    static getLockElementSpec(workArea: IWorkArea, instance: string): IElementBasicData;
    /**
     * Read the metadata file from git working directory gitLocation (last version takes precedence)
     *
     * @static
     * @param {string} gitLocation
     * @returns {IMappingMetadata}
     * @memberof BuildUtils
     */
    static readMappingMetadata(gitLocation: string): IMappingMetadata;
    /**
     * Download listing for element "elm", if elm's return code >= listingRC.
     * Downloaded output will be put into listingDir.
     * When there's any error happened during print, error report will be written into endvReportsDir.
     * An error will be thrown with message of the error report location. (when there's no error report, err msg will be rest api err msg),
     * and causeErrors as the return code
     *
     * @static
     * @param {Session} endevorSession
     * @param {string} instance
     * @param {IElementActionReport} elm
     * @param {string} listingDir
     * @param {number} listingRC
     * @param {string} endvReportsDir
     * @returns {Promise<string>}
     * @memberof BuildUtils
     */
    static downloadListings(endevorSession: Session, instance: string, elm: IElementActionReport, listingDir: string, listingRC: number, endvReportsDir: string): Promise<string>;
    private static validateMappingMetadata;
}
