import { BaseRecord, MapDataFn, CrudSorting, CrudFilters, MetaDataQuery } from "../../interfaces"; import { Options } from "export-to-csv-fix-source-map"; declare type UseExportOptionsType = { /** * Resource name for API data interactions * @default Resource name that it reads from route */ resourceName?: string; /** * A mapping function that runs for every record. Mapped data will be included in the file contents */ mapData?: MapDataFn; /** * Sorts records */ sorter?: CrudSorting; /** * Filters records */ filters?: CrudFilters; maxItemCount?: number; /** * Requests to fetch data are made as batches by page size. By default, it is 20. Used for `getList` method of `DataProvider` */ pageSize?: number; /** * Used for exporting options * @type [Options](https://github.com/alexcaza/export-to-csv) */ exportOptions?: Options; /** * Metadata query for `dataProvider` */ metaData?: MetaDataQuery; /** * If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use. */ dataProviderName?: string; /** * Callback to handle error events of this hook */ onError?: (error: any) => void; }; declare type UseExportReturnType = { isLoading: boolean; triggerExport: () => Promise; }; /** * `useExport` hook allows you to make your resources exportable. * * @see {@link https://refine.dev/docs/core/hooks/import-export/useExport} for more details. * * @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-references/interfaceReferences#baserecord `BaseRecord`} * @typeParam TVariables - Values for params. * */ export declare const useExport: ({ resourceName, sorter, filters, maxItemCount, pageSize, mapData, exportOptions, metaData, dataProviderName, onError, }?: UseExportOptionsType) => UseExportReturnType; export {}; //# sourceMappingURL=index.d.ts.map