import { ComputedRef, Ref } from "vue";
import { IDataImporter, ImportDataPreview, ImportProfile, ImportPushNotification, ImportRunHistory, ISearchImportRunHistoryCriteria, IImportPushNotification, ISearchImportProfilesCriteria } from "@virtocommerce/import-app-api";
export type INotificationHistory = IImportPushNotification | ImportRunHistory;
export interface IImportStatus {
    notification?: INotificationHistory & {
        created?: Date;
        createdDate?: Date;
        errorCount?: number;
    };
    jobId?: string;
    inProgress: boolean;
    progress?: number;
    estimatingRemaining?: boolean;
    estimatedRemaining?: string;
    fileName?: string;
}
export interface IUploadedFile {
    contentType?: string;
    createdDate?: string;
    name?: string;
    relativeUrl?: string;
    size: number | string;
    type?: string;
    url?: string;
}
export type ExtProfile = ImportProfile & {
    importer?: IDataImporter;
    inProgress?: boolean;
    jobId?: string;
};
export interface ISearchProfile extends ISearchImportRunHistoryCriteria {
    results?: ExtProfile[];
}
interface IUseImport {
    readonly loading: Ref<boolean>;
    readonly profilesLoading: Ref<boolean>;
    readonly uploadedFile: Ref<IUploadedFile | undefined>;
    readonly importStatus: Ref<IImportStatus | undefined>;
    readonly isValid: Ref<boolean>;
    readonly importHistory: Ref<ImportRunHistory[] | undefined>;
    readonly dataImporters: Ref<IDataImporter[]>;
    readonly importProfiles: ComputedRef<ExtProfile[] | undefined>;
    readonly profile: Ref<ExtProfile>;
    readonly modified: Ref<boolean>;
    readonly totalHistoryCount: Ref<number | undefined>;
    readonly historyPages: Ref<number>;
    readonly currentPage: Ref<number>;
    readonly importHistoryLoading: Ref<boolean>;
    readonly dataImportersLoading: Ref<boolean>;
    readonly previewDataLoading: Ref<boolean>;
    profileDetails: Ref<ImportProfile>;
    readonly updateImportProfileLoading: ComputedRef<boolean>;
    readonly errorMessage: Ref<string>;
    setFile(file: IUploadedFile): void;
    setImporter(typeName: string): void;
    fetchDataImporters(): Promise<IDataImporter[]>;
    previewData(): Promise<ImportDataPreview>;
    startImport(extProfile?: ExtProfile): Promise<void>;
    cancelImport(): Promise<void>;
    clearImport(): void;
    fetchImportHistory(query?: ISearchImportRunHistoryCriteria): Promise<void>;
    fetchImportProfiles(args?: ISearchImportProfilesCriteria): Promise<void>;
    loadImportProfile(args: {
        id: string;
    }): Promise<void>;
    createImportProfile(details: ImportProfile): Promise<void>;
    updateImportProfile(details: ImportProfile): Promise<void>;
    deleteImportProfile(args: {
        id: string;
    }): Promise<void>;
    updateStatus(notification: ImportPushNotification | ImportRunHistory): void;
    getLongRunning(args: {
        id: string;
    }): void;
    setErrorMessage(message: string): void;
    clearErrorMessage(): void;
    init(args: {
        profileId?: string;
        importJobId?: string;
    }): Promise<void>;
    getTasks(args: {
        profileId?: string;
        importJobId?: string;
    }): void;
}
declare const _default: () => IUseImport;
export default _default;
//# sourceMappingURL=index.d.ts.map