import { BaseTransformer } from './BaseTransformer.js';
import { ArcExportObject, ExportArcProjects, ExportArcSavedRequest } from '../legacy/DataExport.js';
interface LegacyRequest {
    id: number;
    name: string;
    project: number;
    url: string;
    method: string;
    encoding: string | null;
    headers: string | null;
    payload: string | null;
    skipProtocol: boolean;
    skipServer: boolean;
    skipParams: boolean;
    skipHistory: boolean;
    skipMethod: boolean;
    skipPayload: boolean;
    skipHeaders: boolean;
    skipPath: boolean;
    time: number;
    driveId?: string | null;
}
interface LegacyProject {
    created: number;
    id: number;
    name: string;
}
interface LegacyProjectProcessing extends ExportArcProjects {
    originId: number;
}
/**
 * Tests if the data import is a single request export.
 *
 * @param data Imported data
 * @return True if `data` represents single request
 */
export declare function isSingleRequest(data: any): boolean;
/**
 * Transforms the first ARC data object to current schema.
 */
export declare class ArcLegacyTransformer extends BaseTransformer {
    /**
     * Transforms legacy ARC export object into current export data model.
     *
     * @return New data model object.
     */
    transform(): Promise<ArcExportObject>;
    /**
     * Returns a list of projects from a legacy export file.
     *
     * Each project will have newly generated ID to not make conflicts with
     * existing projects. Old project id is moved to the `originId` property.
     *
     * @param projects List of legacy project objects
     * @returns List of project object in current data model. It can be
     * empty array.
     */
    transformProjects(projects: LegacyProject[]): LegacyProjectProcessing[];
    /**
     * Transform the list of requests into new data model.
     */
    transformRequests(requests: LegacyRequest[], projects?: LegacyProjectProcessing[]): ExportArcSavedRequest[];
    /**
     * Transforms a single request object into current data model.
     *
     * Note that required properties will be default to the following:
     * -   `name` - "unnamed"
     * -   `url` - "http://"
     * -   `method` - "GET"
     *
     * @param item Legacy request definition
     * @param projects List of projects in the import file.
     * @return Current model of the request object.
     */
    transformRequest(item: LegacyRequest, projects?: LegacyProjectProcessing[]): ExportArcSavedRequest;
    /**
     * Finds a project in the list of projects.
     *
     * @param projectId A project ID to search for
     * @param projects List of project to look into. It compares the `originId` property of the list items.
     * @returns A project object or null if not found.
     */
    findProject(projectId: number, projects?: LegacyProjectProcessing[]): LegacyProjectProcessing | undefined;
}
export {};
//# sourceMappingURL=ArcLegacyTransformer.d.ts.map