import './polyfills';
import { FLOW_STATUS } from './utils';
export = Loadmill;
declare function Loadmill(options: Loadmill.LoadmillOptions): {
    run(config: Loadmill.Configuration, paramsOrCallback?: Loadmill.ParamsOrCallback, callback?: Loadmill.Callback): Promise<string>;
    wait(testDefOrId: string | Loadmill.TestDef, callback?: Loadmill.Callback): Promise<Loadmill.TestResult>;
    runTestPlan(testPlan: Loadmill.TestPlanDef, params: Loadmill.Params): Promise<Loadmill.TestDef | undefined>;
    runLoadTestFromFlow(flowLoad: Loadmill.FlowLoadDef): Promise<Loadmill.TestDef>;
    junitReport(testResult: Loadmill.TestResult, path?: string | undefined): Promise<void>;
    mochawesomeReport(testResult: Loadmill.TestResult, path?: string | undefined): Promise<void>;
};
declare namespace Loadmill {
    export interface LoadmillOptions {
        token: string;
    }
    export interface TestDef {
        id: string;
        type: TYPES;
    }
    export interface TestSuiteDef {
        id: string;
        description?: string;
        options?: TestSuiteOptions;
    }
    export interface TestPlanDef {
        id: string;
        description?: string;
        options?: TestPlanOptions;
    }
    export interface FlowLoadDef {
        suiteId: string;
        flowId: string;
        loadTestOptions?: any;
    }
    export interface TestSuiteOptions {
        additionalDescription?: string;
        labels?: string[] | null;
        failGracefully?: boolean;
        pool?: string;
        parametersFile?: string;
    }
    export interface TestPlanOptions {
        additionalDescription?: string;
        labels?: string[] | null;
        labelsExpression?: string;
        fetchFlowRuns?: boolean;
        pool?: string;
        tags?: string[] | null;
        parallel?: number | string;
        branch?: string;
        overrideSuites?: string[] | null;
        maxFlakyFlowRetries?: number | string;
        parametersFile?: string;
        inlineParameterOverride?: boolean;
        apiCatalogService?: string;
        turboParallel?: boolean;
    }
    export interface TestResult extends TestDef {
        url: string;
        passed: boolean;
        description: string;
        flowRuns?: Array<FlowRun>;
        testSuitesRuns?: Array<TestResult>;
        status?: string;
        startTime: string;
        endTime: string;
        error?: SuiteError;
    }
    export interface FlowRun {
        id: string;
        status: string;
        description: string;
        flowStatus: FLOW_STATUS;
        duration: number;
        retries?: number;
    }
    type SuiteError = {
        message: string;
    };
    export type Configuration = object | string | any;
    export type Params = {
        [key: string]: string;
    };
    export type ParamsOrCallback = Params | Callback;
    export type Callback = {
        (err: Error | null, result: any): void;
    } | undefined;
    export type Histogram = {
        [reason: string]: number;
    };
    export type TestFailures = {
        [reason: string]: {
            [histogram: string]: Histogram;
        };
    };
    export type Args = {
        verbose: boolean;
        colors?: boolean;
    };
    export enum TYPES {
        LOAD = "load",
        SUITE = "test-suite",
        TEST_PLAN = "test-plan"
    }
    export {};
}
