/// import fs from 'fs'; import type { Reducer } from 'redux'; import type { ProcessStatus } from '../constants/process-status'; import type { AcceptedFileType } from '../constants/file-types'; import type { Delimiter, Linebreak, CSVParsableFieldType, CSVField } from '../csv/csv-types'; import type { AnalyzeCSVFieldsResult } from '../import/analyze-csv-fields'; import type { ImportThunkAction } from '../stores/import-store'; export declare const STARTED: string; export declare const CANCELED: string; export declare const FINISHED: string; export declare const FAILED: string; export declare const FILE_TYPE_SELECTED: string; export declare const FILE_SELECTED: string; export declare const FILE_SELECT_ERROR: string; export declare const OPEN: string; export declare const CLOSE: string; export declare const OPEN_IN_PROGRESS_MESSAGE: string; export declare const CLOSE_IN_PROGRESS_MESSAGE: string; export declare const SET_PREVIEW: string; export declare const SET_DELIMITER: string; export declare const SET_GUESSTIMATED_TOTAL: string; export declare const SET_STOP_ON_ERRORS: string; export declare const SET_IGNORE_BLANKS: string; export declare const TOGGLE_INCLUDE_FIELD: string; export declare const SET_FIELD_TYPE: string; export declare const ANALYZE_STARTED: string; export declare const ANALYZE_FINISHED: string; export declare const ANALYZE_FAILED: string; export declare const ANALYZE_CANCELLED: string; export declare const ANALYZE_PROGRESS: string; export type FieldFromCSV = { isArray: boolean; path: string; checked: boolean; type: CSVParsableFieldType; result?: CSVField; }; type FieldFromJSON = { path: string; checked: boolean; }; type FieldType = FieldFromJSON | FieldFromCSV; type ImportState = { isOpen: boolean; isInProgressMessageOpen: boolean; errors: Error[]; fileType: AcceptedFileType | ''; fileName: string; errorLogFilePath: string; fileIsMultilineJSON: boolean; useHeaderLines: boolean; status: ProcessStatus; fileStats: null | fs.Stats; analyzeBytesProcessed: number; analyzeBytesTotal: number; delimiter: Delimiter; newline: Linebreak; stopOnErrors: boolean; ignoreBlanks: boolean; fields: FieldType[]; values: string[][]; previewLoaded: boolean; exclude: string[]; transform: [string, CSVParsableFieldType][]; abortController?: AbortController; analyzeAbortController?: AbortController; analyzeResult?: AnalyzeCSVFieldsResult; analyzeStatus: ProcessStatus; analyzeError?: Error; namespace: string; }; export declare const INITIAL_STATE: ImportState; export declare const onStarted: ({ abortController, errorLogFilePath, }: { abortController: AbortController; errorLogFilePath: string; }) => { type: string; abortController: AbortController; errorLogFilePath: string; }; export declare const startImport: () => ImportThunkAction>; export declare const cancelImport: () => ImportThunkAction; export declare const skipCSVAnalyze: () => ImportThunkAction; export declare const toggleIncludeField: (path: string) => { type: string; path: string; }; export declare const setFieldType: (path: string, bsonType: string) => { type: string; path: string; bsonType: string; }; export declare const selectImportFileName: (fileName: string) => ImportThunkAction>; export declare const setDelimiter: (delimiter: Delimiter) => ImportThunkAction>; export declare const setStopOnErrors: (stopOnErrors: boolean) => { type: string; stopOnErrors: boolean; }; export declare const setIgnoreBlanks: (ignoreBlanks: boolean) => { type: string; ignoreBlanks: boolean; }; export declare const openImport: ({ namespace, }: { namespace: string; origin: 'menu' | 'crud-toolbar' | 'empty-state'; }) => ImportThunkAction; export declare const closeImport: () => { type: string; }; export declare const closeInProgressMessage: () => { type: string; }; export declare const importReducer: Reducer; export {}; //# sourceMappingURL=import.d.ts.map