import { Field } from '../../provider/dataSource/DataSourceContext';
export declare type ListResult = {
    data: any[];
    count: number;
    page: number;
    pageSize: number;
};
export declare type UseFormatParams = {
    dataSourceKey: string;
    fields: Field[];
};
export declare type ApiListResult = {
    list: any[];
    count: number;
    size: number;
} & ({
    page: number;
} | {
    skip: number;
});
export declare type FormatListResultParams = ApiListResult | {
    data: any[];
    meta: {
        count: number;
        page: number;
        pageSize: number;
    };
};
export declare type FilterValue = {
    [key: string]: any;
};
export declare type FilterOperator = '$includes' | '$dateAfter' | '$dateBefore' | '$eq' | '$in' | '$isTruly' | '$and';
export declare type SimpleFilterValue = {
    [key in Exclude<FilterOperator, '$and'>]?: any;
};
export declare type AndFilterValue = {
    $and: FilterCondition[];
};
export declare type FilterConditionValue = SimpleFilterValue | AndFilterValue;
export declare type FilterCondition = {
    [key: string]: FilterConditionValue;
} | AndFilterValue;
declare const useFormat: ({ dataSourceKey, fields }: UseFormatParams) => {
    formatListResult: (res: FormatListResultParams) => ListResult;
    formatListParams: (params: any) => any;
    formatCreateUpdateParams: (params: any) => any;
};
export default useFormat;
