import { EditorAPI } from '../types/CommonTypes'; import { ConnectorInstance } from '../next'; import { DataItem } from '../types/DataConnectorTypes'; import { DataItemMappingTools } from '../utils/DataItemMappingTools'; /** * The DataSourceController is responsible for all communication regarding data source. * Methods inside this controller can be called by `window.SDK.dataSource.{method-name}` * * A data source is a data connector selected to be used in the document. * Only one data source can be defined per template, this controller manages this * data source. * */ export declare class DataSourceController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI, dataItemMappingTools: DataItemMappingTools); /** * Sets the data source by id. * @param connectorId the id of your data connector * @returns */ setDataSource: (connectorId: string) => Promise>; /** * Gets the data source. * @returns the connector object */ getDataSource: () => Promise>; /** * Removes the data source if defined. * @returns */ removeDataSource: () => Promise>; /** * Maps the data row values to variables by names (data row keys). * Variables must exist. * @param dataRow DataItem to set * @returns */ setDataRow: (dataRow: DataItem) => Promise>; }