import { Change, DataUnit, DataUnitAction, Filter, LoadDataRequest, LoadDataResponse, SavedRecord, UnitMetadata } from "@sankhyalabs/core";
import { AttachFetcherFacadeInterface } from "../../../../../lib";
export interface FetcherFacade {
  initLoaders(dataUnit: DataUnit, fetcher: AttachFetcherFacadeInterface, onSuccess: (data?: any) => void): any;
  metadataLoader(dataUnit: DataUnit): Promise<UnitMetadata>;
  dataLoader(dataUnit: DataUnit, request: LoadDataRequest): Promise<LoadDataResponse>;
  saveLoader(changes: Array<Change>, fetcher: AttachFetcherFacadeInterface): Promise<Array<SavedRecord>>;
  removeLoader(dataUnit: DataUnit, ids: string[], fetcher: AttachFetcherFacadeInterface): Promise<string[]>;
  getFilters(registerKey: string): Array<Filter>;
  getInterceptions(dataUnit: DataUnit, action: DataUnitAction, crudRef: HTMLSnkSimpleCrudElement): Promise<DataUnitAction>;
}
