import { DeclarativeLdm, ImportCsvRequest } from "@gooddata/api-client-tiger";
import { ITigerSpecificFunctions } from "../../lib/tigerSpecificFunctions";
import { IDataSourceApiResult, IDataSourceConnectionInfo } from "@gooddata/sdk-backend-tiger";
import { IAnalyzedData, IProvisioningWorkspace } from "../types/types";
import { IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
import { IWorkspaceDescriptor } from "@gooddata/sdk-backend-spi/esm/workspace";
import { IDatasetColumn } from "../PreviewDialog/types";
export declare const DEFAULT_FIRST_WORKSPACE_NAME = "Your First Workspace";
export declare const findExistingGdStorageDataSource: (tigerSpecificFunctions: ITigerSpecificFunctions) => Promise<IDataSourceApiResult>;
export declare const findExistingGdStorageWorkspace: (backend: IAnalyticalBackend) => Promise<IWorkspaceDescriptor>;
export declare const createStorageDataSource: (tigerSpecificFunctions: ITigerSpecificFunctions, dataSourceName: string) => Promise<IDataSourceApiResult>;
export declare const uploadFileToStagingLocation: (uploadUrl: string, file: File) => Promise<void>;
export declare const analyzeFile: (tigerSpecificFunctions: ITigerSpecificFunctions, dataSourceId: string, location: string, fileName: string) => Promise<IAnalyzedData>;
/**
 * Lookup if a dataset in LDM with all fields are mapped to the CSV columns.
 * If so, users will edit the dataset existing fields (change fact/attribute/date title, but keep ID) instead of creating new fields.
 * Return IProvisioningWorkspace with existing ldm/dataset.
 */
export declare const enrichWithExistingLdm: (dataSource: IDataSourceConnectionInfo, analyzedData: IAnalyzedData, ldm: DeclarativeLdm | undefined) => IProvisioningWorkspace;
export declare const buildCsvImportRequest: (analyzedData: IAnalyzedData, tableName: string, datasetColumns: IDatasetColumn[]) => ImportCsvRequest;
export declare const provisioningWorkspace: (tigerSpecificFunctions: ITigerSpecificFunctions, existingGdStorageWorkspace: IWorkspaceDescriptor | undefined, ldm: DeclarativeLdm) => Promise<void>;
/**
 * Check if the csv is re-load or new upload:
 * - If reupload, CSV table name should be same as in mapped dataset.
 * - If new upload, generate CSV table name from CSV filename
 * @param provisioningWorkspace
 */
export declare const buildCsvTableName: (provisioningWorkspace: IProvisioningWorkspace) => string;
