interface FetcherConfig {
    /** 单条数据查询 */
    fetchOne?: (id: string, params: RequestParams) => Promise<any>;
    /** 批量数据查询 */
    fetchMany?: (ids: string[], params: RequestParams) => Promise<any[]>;
    /** 下拉列表查询 */
    fetchDataList?: (params: RequestParams) => Promise<FetchResult>;
    /** 选项转换器 */
    transformers?: {
        toOption?: (item: any) => Option;
        toOptions?: (items: any[]) => Option[];
    };
    /** 接口缓存前缀 */
    cachePrefix?: string;
    /** 接口数据缓存时长 */
    cacheTTL?: number;
}
interface RequestParams {
    modelKey?: string;
    fieldKey?: string;
    refModelKey?: string;
    pageNo?: number;
    pageSize?: number;
    queryData?: Record<string, any>;
    exp?: string;
    isRdo?: boolean;
    needDataLink?: boolean;
    isLinkQuery?: boolean;
    [key: string]: any;
}
interface FetchResult {
    data: any[];
    totalPage?: number;
    totalCount?: number;
}
interface Option {
    label: string;
    value: string | number;
    disabled?: boolean;
    _item?: any;
}
interface OptionResult {
    options: Option[];
    totalPage?: number;
    totalCount?: number;
}
declare class APIFetcher {
    private config;
    private cachePrefix;
    private cacheTTL;
    constructor(config: FetcherConfig);
    /** 通过 id 获取单条数据 */
    getOne(id: string, params: RequestParams): Promise<any>;
    /** 通过 ids 获取多条数据 */
    getMany(ids: string[], params: RequestParams): Promise<any[]>;
    getDataList(params: RequestParams): Promise<FetchResult>;
    /** 通过 id 获取 options */
    getOptionById(id: string, params: RequestParams): Promise<Option>;
    /** 通过 ids 获取 options */
    getOptionByIds(ids: string[], params: RequestParams): Promise<Option[]>;
    /** 获取下拉列表选项 */
    getOptions(params: RequestParams): Promise<OptionResult>;
    /** 单条转 Option  */
    protected toOption(item: any): Option;
    /** 多条转 Options */
    protected toOptions(items: any[]): Option[];
}
export declare const apiFetchers: {
    /** 部门列表 */
    dept: APIFetcher;
    /** 人员列表 */
    user: APIFetcher;
    /** 引用数据列表 */
    ref: APIFetcher;
    /** Lot/SN 列表 */
    lot2sn: APIFetcher;
    /** redo引用数据列表 */
    rdo2ref: APIFetcher;
};
/** 清除指定类型的缓存 */
export declare function clearApiFetcherCache(type: 'dept' | 'user' | 'ref' | 'lot2sn' | 'all'): void;
export type { FetcherConfig, RequestParams, OptionResult, Option };
