import { GlobalLoaderService } from './../../resources/global-loader/global-loader-service';
import { BaseEntityWithId } from './../../model/common-model';
import { IMenuItem } from './../../ui/menu/ui-menus';
import { HttpClient } from 'aurelia-fetch-client';
export interface ValidateConfigResponse {
    isValid: boolean;
    errors: InputFieldError[];
}
export interface InputFieldError {
    fieldName: string;
    error: string;
}
export interface ImportRowError {
    propertyName: string;
    error: string;
    errorTranslationkey?: string;
    errorValue?: string;
}
export interface ImportRow {
    id: number;
    lineNr: number;
    isValid: boolean;
    serverErrors: ImportRowError[];
    actions?: ImportRowAction[];
    ignoreRow: boolean | null;
    edit?: boolean;
    menu?: IMenuItem[];
}
export interface ImportRowAction {
    actionId: number;
    labelTranslationKey: string;
    icon: string;
}
export interface ImportRowPatch {
    propertyName: string;
    propertyValue: string;
}
export interface ImportRowBatchPatch extends ImportRowPatch {
    importRowIdToUpdate: number[];
    saveAlias: boolean | null;
    oldValue: string | null;
}
export interface ImportResults {
    isFileValid: boolean;
    resultFileUri: string;
    linesTreatedCount: number;
    linesCount: number;
    linesImportedCount: number;
    importError: string;
}
export declare class ImportService {
    private httpClient;
    private globalLoader;
    url: string;
    constructor(httpClient: HttpClient, globalLoader: GlobalLoaderService);
    startSession(context: string, customParameter: number): Promise<ImportSession>;
    getSession(sessionId: number): Promise<ImportSession>;
    saveFileSession(id: number, fileSessions: ImportFileSessions, context: string): Promise<any>;
    saveSession(session: ImportSession): Promise<any>;
    getColumnMapping(id: number): Promise<Array<ImportColumnMapping>>;
    getSheetDtos(id: number): Promise<Array<SheetDTO>>;
    getHeaderLabel(id: number): Promise<Array<HeaderLabel>>;
    saveMapping(id: number, columnsMapping: ImportColumnMapping[]): Promise<any>;
    saveConfig(context: string, id: number, config: any): Promise<any>;
    validateConfig(context: string, id: number, mapping: ImportColumnMapping[], config: any): Promise<ValidateConfigResponse>;
    getErrors(context: string, id: number): Promise<ImportRow[]>;
    saveImportRowProperty(context: string, sessionId: number, id: number, propertyName: string, n: any): Promise<ImportRow>;
    saveImportRowBatch(context: string, sessionId: number, ids: number[], propertyName: string, n: any, saveAlias?: boolean, oldValue?: string): Promise<ImportRow[]>;
    executeAction(context: string, sessionId: number, id: number, actionId: number): Promise<ImportRow>;
    getPossibleValues(context: string, sessionId: number, propertyName: string): Promise<string[]>;
    process(context: string, id: number): Promise<ImportResults>;
}
export interface ImportFileSessions extends BaseEntityWithId {
    fileUri: string;
    fileName: string;
}
export interface ImportSession extends BaseEntityWithId {
    importFileSessionsId: number;
    importFileSessions: ImportFileSessions;
    headerLineRowNumber: number;
    firstDataLineRowNumber: number;
    sheetsIndex: number[];
    resultFileUri: string;
    linesTreatedCount: number | null;
    linesCount: number | null;
    linesImportedCount: number | null;
    currentUIStep: number;
    config: any;
    contextName: string;
}
export interface ImportColumnDefinition {
    id: number;
    propertyName: string;
    columnNames: string[];
    allowRange: boolean;
    isMandatory: boolean;
}
export interface ImportColumnMapping {
    id: number;
    columnDefinition: ImportColumnDefinition;
    columnStartIndex: number | null;
    columnEndIndex: number | null | string;
    columnStartHeader: string;
    columnEndHeader: string;
    importSessionId: number;
    importSession: ImportSession;
    defaultValue: string;
}
export interface SheetDTO {
    index: number;
    name: string;
}
export interface HeaderLabel {
    index: number;
    columnName: string;
    fullName: string;
}
export interface ImportConfig {
    id: number;
    importSessionId: number;
    importSession: ImportSession;
}
export interface ImportConfigMetering extends ImportConfig {
    separatorToInsert: string | null;
    separator: string | null;
}
export interface ImportConfigThirdParty extends ImportConfig {
    thirdPartyTypeId: number | null;
}
